Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi there,
If a product is not tracked, we can change its quantity on edit product page without making it tracked. This basically changes variant's inventory_quantity but it doesn't trigger any webhook for product-update or inventory level update topic. How can we be notified for a change like that? What is the expected webhook behavior for products which haven't their quantity tracked?
Hey @Mete ,
I am not sure if I fully understand this question. If you turn off the ability for Shopify to track quantity on a Product or Product Variant, you lose the ability to edit the quantity of the product and/or product variant from the Admin -> Products -> Inventory page. And since Shopify is no longer tracking the inventory of this product and/or product variant, it will no longer be aware of inventory changes for these resources and therefore not be able to send any webhook notifications about this. The best way to get inventory information in this case would be to just use the Admin API to pull the "inventory_quantity" field of the Product Variant / Inventory Item.
To learn more visit the Shopify Help Center or the Community Blog.
@hassain wrote:Hey @Mete ,
I am not sure if I fully understand this question. If you turn off the ability for Shopify to track quantity on a Product or Product Variant, you lose the ability to edit the quantity of the product and/or product variant from the Admin -> Products -> Inventory page.
@hassain I was expecting the same. But there is one case that you can change quantity while variant is untracked.
Here are the steps to reproduce:
1- Make a variant untracked.
2- Click on tracked button but don't save it. Notice Save button at the topbar.
3- When you click on Track Quantity, You will be able to change quantities on locations. But variant is still untracked because we didn't click on save button at the topbar yet.
4- Adjust quantity will make an Ajax call and change the quantity on location. Variant is still untracked but shopify allows us to change the quantity.
5- Quantity has changed. Deselect track quantity checkbox. So we could change the quantity to 54 although we didn't change variant's state from untracked to tracked at any stage.
And since Shopify is no longer tracking the inventory of this product and/or product variant, it will no longer be aware of inventory changes for these resources and therefore not be able to send any webhook notifications about this. The best way to get inventory information in this case would be to just use the Admin API to pull the "inventory_quantity" field of the Product Variant / Inventory Item.
Actually shopify is tracking the inventory of this product/variant although its untracked but doesn't notify us at all when its untracked. I would expect at least a product update webhook to be triggered because the variant-> inventory_quantity field changes in database. Similarly quantity on a specific location changes as well which should trigger an inventory-level update webhook.
It has been more than 2 years. Shopify still has this bug. Can someone from the team look at it please?