Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi,
I am writing to bring to your attention an issue we are experiencing with product inventory updates on our Shopify store. Specifically, we have a product (Product A) that initially has a quantity of 15 in the store. We are attempting to update the quantity of Product A to 20 using the following query:
However, we have encountered a situation where two webhooks from Shopify are being triggered simultaneously:
This dual triggering of webhooks is leading to a mismatch in inventory quantities, as sometimes the webhook with 20 quantity is executed first, followed by the one with 15 quantity, which causes incorrect inventory records.
Could you please help us understand the reason behind this behavior? Any insights or guidance on how to prevent this issue from occurring would be greatly appreciated, as it is crucial for us to maintain accurate inventory levels.
Thank you for your assistance.
Best regards,
Khushi
Team Shipturtle