Syncing from Zendesk to Jira Cloud, I want to set up some conditions in case of which no Jira ticket is created but the Zendesk ticket is updated to note that the Jira ticket creation was not possible. For that I would include the followoing in the Jira incoming script : (modification of the replica, syncing back after processing and stoping the current synchronization)
I have bidirectional connection (there are incoming and outgoing scripts on both directions), but I experience that even if the Jira incoming script is running into this condition, the Zendesk incoming script is not started.
Am I understanding the documentation of syncBackAfterProcessing right, that the Zendesk incoming script should be started even if there is no Jira ticket pair of the Zendesk ticket?
If not, how can I achieve to notify the Zendesk agents if the Jira incoming script is running to a “return” (no Jira ticket is created due to insufficient info)?
You’re on the right track with using syncHelper.syncBackAfterProcessing(), but there’s an important detail in how it works: according to the documentation, syncBackAfterProcessing() triggers a sync event back to the source (Zendesk in your case) only after the destination (Jira) has processed the incoming sync. However, this mechanism assumes that a destination issue (Jira ticket) was actually created and exists as a pair for the source issue.
If your Jira incoming script returns before creating a Jira issue (i.e., no issue is created), there is no Jira-Zendesk issue pair established. As a result, the syncBackAfterProcessing() call does not trigger the Zendesk incoming script, because there’s no destination issue to anchor the sync event. This is a limitation of how Exalate’s sync pairing works.
So, to answer your question: No, the Zendesk incoming script will not be triggered if the Jira issue is not created, even if you call syncBackAfterProcessing(). The documentation confirms that the sync event is processed as if the destination issue has changed, but if the destination issue does not exist, there’s nothing to trigger the sync back.
If you want to notify Zendesk agents when a Jira ticket is not created, you’ll need to handle this outside of the standard Exalate sync flow. Some options:
Use a custom field or comment in Zendesk and update it directly from the outgoing script (before the sync is attempted), or
Use an automation or webhook in Zendesk to detect when a sync attempt fails or when a specific custom field is set.
For more details, see the documentation:
In summary: syncBackAfterProcessing() only works when a destination issue exists. For your use case, you’ll need a workaround outside the standard sync-back mechanism to notify Zendesk when Jira ticket creation is skipped.