In Shopify, there is an inventory_quantity attribute tied to a variant that describes how much of an item is left in stock at any given point.
I noticed the following behavior that looks inconsistent to me:
The variant attribute inventory_quantity is updated when the value is modified directly form the Shopify admin, triggering a Product/update webhook.
However, when someone orders that item, Shopify automatically decrements the item's quantity but does not trigger a Product/update Webhook.
Is that a bug or the expected behavior? (In which case, what it the best way to stay in synch with inventory_quantity values?)
inventory_quantity
belongs to the ProductVariant (a separate object). But ProductVariant's don't support webhooks. As a workaround you could register to the order/created webhook. – hjblok