document.onreadystatechange = function init() {
if (document.readyState == 'interactive') renderApp();
function renderApp() {
var onInit = app.initialized();
onInit.then(getClient).catch(console.error);
}
};
function getClient(_client) {
window.client = _client;
client.events.on('app.activated', onAppActivate);
function onAppActivate() {
client.events.on('ticket.propertiesUpdated', onTicketPropUpdate, { intercept: false });
function onTicketPropUpdate(event) {
// your business logic
// To allow ticket property to be updated
event.helper.done();
// to prevent: event.helper.fail('error message') and {intercept: true} at the call site.
}
}
}
You need to develop a custom calendar page with a new desk ticket.
If the agent creates a new desktop ticket, it appears immediately on the Custom Calendar App page.
And another freshdesk tickets also show custom calendar app page.
And “event.helper.done();” is occurred warning message when fdk pack.
Expected rejection to be handled.
But for full page app, the event listener is registered after user clicks and opens full page app as opposed to ticket_background placeholder of above sample app.
In case if you want listener to be registered before user clicks on full page app icon and open the app, you will have to move ticket.propertiesUpdated listener inside of app.initialized() callback.
I don’t need information about the way listen ticket update event in full page app.
I thought it was difficult, so I had an internal discussion, and I decided to bring the information with api without listen ticket update event.