Zendesk status not updating when multiple updates are sent

Hi Exalate team and community,

Here is our issue:
We are encountering a new problem related to status changes on the Zendesk side.

Here’s an example of what happens:

  • 1 comment added :white_check_mark:
  • 1 status change :white_check_mark:
  • 1 comment added :white_check_mark:
  • 1 status change :cross_mark:

When there are three consecutive updates, the last status change doesn’t get applied in Zendesk.

We have applied some conditions in the incoming sync ( Zendesk & Jira ) that check if we have a different status in the incoming payload and only trigger the change of status if the status of the replica is different from what it was before.

In our incoming sync, we check whether the status in the incoming payload differs from the previous one before applying a status change. However, we’ve observed that when multiple payloads with different statuses are received in quick succession, the previous?.status?.name doesn’t always reflect the correct earlier status. This leads to unreliable behavior in detecting real status changes.

This leads to wrong behavior, where the status change is not triggered as expected especially after sending more than 3 payloads, the system stops updating the status on Zendesk as we have noticed that the previous status = the current status which is not correct.

I would like also to check with you if we could do the same check for the outgoing fields ?

I hope my explanation is clear enough, and thank you for your help!

Hi @Esther_Ld ,

Thanks for posting your question.

One of the approach here could be to introduce a new custom field on Zendesk and store the last status value in the field instead of using previous variable.

This will help in tracking true last known state.

Example Adjustment:

// Assume we have a custom field storing the last known status name
def lastSyncedStatus = replica.customFields."Last Synced Status"?.value
def newStatus = replica.status?.name

if (lastSyncedStatus != newStatus) {
    issue.status = newStatus
    // Optionally, update this field post-change to store current status
    issue.customFields."Last Synced Status" = newStatus
}

You will need to:

  • Create a custom field in Zendesk (e.g., “Last Synced Status”).
  • Update it on every successful sync.
  • Avoid relying solely on previous?.status?.name.

Let me know if this works and you need any help here.

Also, can you please help me with your outgoing and incoming sync scripts.

Thanks, Dhiren