How do i a prevent infinite loop for updating customers (bidirectional sync)

New Member
3 0 0

I'm doing bidirectional sync between Revel systems and Shopify for customer data. If a customer is updated in Revel systems, I will update the customer in Shopify and if a customer is updated in Shopify, I will update the customer in Revel systems. 

For Revel systems, to prevent the infinite loop is to use the field "last_updated_by" (if the last_updated_by is the integration user, then we do not want to process this customer) but for Shopify, there is no field "last_updated_by". How can i prevent an infinite loop when the integration user updates customers in Shopify?


32 1 24


Are you currently building your own custom integration software between Shopify and Revel systems or are you using an integration service already?

There are a few ways you can "prevent" an update on Shopify customer to cause a reverse update on Revel:
1. Store a hash of the shopify customer object (which will be returned when you make an update API request), and you store this in your DB. then when you receive Shopify customer webhook, you check against this hash to see if this can be ignored

2. Another method using similiar principle is generate a random hash before you update Shopify customer, and add that as a special customer tag. Again, store this hash in your DB and check for this in the customer update webhook and decide if it should be ignored.

If you are currently looking to build a custom integration between Shopify & Revel system, you can take a look at our integration platform, Shypyard. We are designed as a development platform to make real-time integration & automation for Shopify merchants. If you are interested, let us know!