cancel
Showing results for 
Search instead for 
Did you mean: 

Recipes getting Looped

borre842
Deputy Chef II
Deputy Chef II

Hello, 

Having an issue i can't figure out how to resolve the next escenario:

I have 2 Recipes updating the Customer Contact information, one form Salesforce and one from Epicor Kinetic but as there is not really a master record, by that i mean all changes can occur either on Salesforce or Epicor Kinetic, and both systems should have the same information, when either the Salesforce or Epicor Kinetic  have changes, so when one run it trigger ana update on the other system, which trigger back the update to the first system and it get loop

1 ACCEPTED SOLUTION

mppowe
Executive Chef I
Executive Chef I

If you can't go off the user and the "past X minutes" won't work, some other ideas to toss out there...

- Use a custom flag on the affected records like "just updated by sync".  When Workato updates the target system it sets that to Yes, and then the triggered recipe checks for that.  If it's Yes, it just updates it to No and exits out.  Will consume 1 more Task, so that's a negative.

- I think the most robust, enterprise-level syncs like this would involve a 3rd system that serves as the "canonical" DB, but it might not be worthwhile if your needs aren't that strict.

View solution in original post

3 REPLIES 3

gjames
Deputy Chef I
Deputy Chef I

There may be more elegant ways, but we had a similar situation and ended up examining the user_id that made the change and then ignored changes made by the Workato integration user_id. The idea being that we would only capture changes made by the users. Perhaps something like this could work for you?

rachelnatik
Deputy Chef III
Deputy Chef III

@gjames Is correct. There is no out of the box way to handle this. Typically, you would have a designated API user, and thus exclude records updated by that user. In one scenario, I excluded record that has been updated in the past X minutes since I couldn't use the API user.

mppowe
Executive Chef I
Executive Chef I

If you can't go off the user and the "past X minutes" won't work, some other ideas to toss out there...

- Use a custom flag on the affected records like "just updated by sync".  When Workato updates the target system it sets that to Yes, and then the triggered recipe checks for that.  If it's Yes, it just updates it to No and exits out.  Will consume 1 more Task, so that's a negative.

- I think the most robust, enterprise-level syncs like this would involve a 3rd system that serves as the "canonical" DB, but it might not be worthwhile if your needs aren't that strict.