Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Shopify sends webhook of 'product-update' in both cases- Updating a product AND creating an Order. On creating orders, product quantity is deducted from 1st location which is mentioned as per location fulfillment priority. My problems are-
I want to differentiate 'product-update' webhook such that is it coming due to updating the product OR creating an order.
Is there any way in shopify REST API to get the locations as per fulfillment priorities?
Thanks,
Hi,
Just read the X-Shopify-Topic from http headers when you receive the webhook on your app. More info here
Thanks, But I have checked this. The 'X-Shopify-Topic' gives the value 'products/update' in both cases- on updating product and on product update for order creation. So, same value in both cases. Bad luck. 😞
Hi,
Yes, logically the product/update webhook will also fire after the order/created webhook has fired.
By the way, why do you want to differentiate between a 'normal' product/update and when product/update webhook occurs from order/created webhook?
Its my app requirement.