inventory_items/update does not fire when updating cost?

Solved

Hi There,

We've been working on deprecating our Apps COGs field in favor of Shopify's new Cost field.  To my surprise after subscribing to inventory_items/update and changing the cost on Shopify's side I only received a webhook for products/update, and not inventory_items/update.

Has anyone else experienced this behaviour? 


0 Likes
Highlighted

Success.

Shopify Staff
Shopify Staff
419 56 65

Hey @PriceMole_Kevin ,

 

I can verify that if you are subscribed to "inventory_item/update" webhook, you will receive a notification when the "cost" field changes on an inventory item. So it definitely not expected behaviour, and I have not been able to reproduce it on my end. 

 

You will also receive a notification if you are subscribed to the "product/update" webhook, but that is because products in Shopify contain references to inventory_items and will therefore be automatically updated when inventory items are updated. 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

1 Like
Highlighted

Hi Hassain, 

Thanks for confirming that behaviour, I thought something was up.  

Tried again today and it seems to be firing in development as expected when saving on the product page ( I get both webhooks as you described ) so I'm going to go ahead and assume my webhooks just got delayed due to failures or rails was caching an old config or something funny in development. 

0 Likes