How do I make a one way sync into a two way to achieve functional objective?

Originally asked by Elisabeth Henderson on 10 November 2023 (original question)


Our objective is that when we solve a certain type of Zendesk ticket, we create a Jira Ticket. And when the Jira ticket is created, we update the Zendesk Ticket with the Jira Ticket number.

We were attempting to use the syncHelper.syncBackAfterProcessing() function and experiencing updates that weren’t expected. Was told by support “It seems your sync is setup as a one-way sync, this function requires a two-way sync to work correctly…would you be willing to modify the connection so it works as a two-way sync at least in a minimum capacity? Otherwise we would have to remove this function and the Jira ticket value could not be sent back.”

I’m not sure how to make our objective a ‘two way sync’. I can create a trigger on the Jira side and send back something when the ticket is assigned…but I’m not sure that achieves the ‘minimum capacity two way sync’?

We would prefer to not have to wait until a ticket in Jira is assigned to get the Jira ticket ID into Zendesk. If there’s anyone that can help, it’d be much appreciated.


Answer by Elisabeth Henderson on 11 November 2023

I found the answer by way of some of the information in https://docs.exalate.com/docs/custom-fields-are-randomly-updating

I may try using the synchBack function again in a test


Comments:

Javier Pozuelo commented on 14 November 2023

Hello Elisabeth,

Do you have the syncBackAfterProcessing() method inside the “firstSync” if statement? Also, do you have the method in both instance’s Incoming sync?

if(firstSync){
  syncHelper.syncBackAfterProcessing()
}
Elisabeth Henderson commented on 14 November 2023

Yes - we had it in the if firstsync statement. We didn’t (and still don’t) have it in both incoming sync statements – since we still are effectively a unidirectional sync… we’re just ‘faking it’ on the bidirectional to achieve the desired result.

As noted above, I found the answer to our issue by way of some of the information in https://docs.exalate.com/docs/custom-fields-are-randomly-updating