Ticket tags updation, creation

We’ve developed a custom application for one of our clients, which operates as follows:

Upon certain product events, such as ticket creation, ticket updating, or conversation creation within the app,
The application retrieves existing tags by making an API call to the ticket.
It then identifies the formats of the attachments associated with the ticket, which may include PNG, ZIP, among others.
Subsequently, it updates the ticket tags accordingly.

However, we’ve encountered an issue:

During the process of ticket creation or updating, the application listens for and extracts attachments (such as PNG or ZIP files) from the tickets. It then proceeds to update the ticket tags. However, upon updating the tags, it appears that the application mistakenly adds and then removes the tag again, leading to unnecessary activity log entries.

We’ve provided attachments and a video demonstration illustrating this issue. Please review them for further clarification.

Hey @balanagendra,
Thanks for sharing and getting our attention about this, can you please share the snippet of code where the tags are added in the Serverless event handler for onTicketCreate?

Also, any ticket update via API where the properties are updated also triggers the Serverless event of onTicketUpdate which could be the reason for the multiple activities.

Hi @zach_jones_noel,


Yes, I have also faced this same issue, where the updates made by automation are not included in the product events payload since the payload for custom apps is already dispatched.

For now, we are using API inside the events to get the updated data (which makes the application less efficient & increases the API count) yet this work around doesn’t seem to work if another custom application updates the ticket data since the time window between the API fetch and the update performed by another application is too narrow.

@balanagendra, for now adding a delay by relying on the scheduler would fix the issue temporarily.

Note: Please be aware that the ticket update process will take approximately 6 minutes, as the schedule needs to be generated after the initial 5 minutes.

Many developers would appreciate it if this issue gets addressed.

Thank you.