Hi guys, i am trying to work in a custom app where updating custom field
Our app requirement is that when a custom field is updated, an API call must happen.
Tried ways: onTicketUpdate(serverless app) and ticket.propertiesUpdated(first app)
no where can see details of the custom field updated in the ticket.
i can only update default fields that Information.
Could you please help me to find out where I got info about custom field updating details?
Currently, custom field updates are not captured in onTicketUpdateHandler or ticket.propertiesUpdated events method. But In the events method, ticket.propertiesUpdated will return if the ticket update has custom field changes in it.
function eventCallback(event) {
let changes = event.data.changedAttributes;
console.log(changes);
}
client.events.on('ticket.propertiesUpdated', eventCallback, {
intercept: true
});
if any of the custom fields is updated, then the changes object will have isCustomFieldsChanged and its value is a boolean
If you need to do this on the serverless side you can create an automation to change a default field when the custom field changes. This will trigger onTicketUpdate. Its not a perfect solution but I found found its good enough workaround for most use cases.