Hey @Abhisek_Roy - definitely happy to look into this. Could you share the API calls you’re making to request SKU count and if possible, share a shop ID?
If you’re also able to share the name of the app you’re using as it appears in the merchant’s admin that would be super helpful as well - can help us narrow down what the issue might be in our logs on our end here.
Webhook Subscription Topic to receive inventory update: INVENTORY_ITEMS_UPDATE
Our goal is that when there is any delta (+ or -) update of SKU’s inventory count, then we will receive a push to our webhook for Order fulfillment and cancellation.
Hey @Abhisek_Roy thanks for sharing that info! Just clarifying here - you’re not seeing the webhook trigger when you expect it to? If you’re able to share an example Order ID where you didn’t see the webhook trigger when expected, I can definitely take a closer look to see if we can narrow down a specific reason for this - are you just not seeing the webhook trigger at all? Does it trigger if you manually update inventory/stock levels in the admin (https://help.shopify.com/en/manual/products/inventory/managing-inventory-quantities/track_inventory)?
Hey @Abhisek_Roy - thanks for sharing that example there, I think I have an answer for you after doing some testing on my end. For tracking inventory quantity level changes, you would actually want to use the INVENTORY_LEVELS_UPDATE webhook topic: Webhooks
I tested this on my end, and when an inventory item is assigned to a order, the Inventory_Item_Update webhook isn’t triggered like we’re seeing here, but the INVENTORY_LEVELS_UPDATE is and includes a payload like this:
I think this is what you’d be looking for here. Can you let me know if this works and if when you use this topic, you’re still seeing the inventory count itself not be reduced?
Hey @Abhisek_Roy - no worries, thanks for confirming your set up there too.
Right now, inventory is usually deducted at payment time, not upon fulfilment, so you wouldn’t see inventory move when the fulfillment is confirmed, only when the inventory is initially assigned to the order. This is meant to to prevent selling out-of-stock items, but restock operations definitely should trigger that webhook though, provided the item is tracked and the location matches. To track specific fulfillments, you can use the fulfillments/updated webhook.
If the SKU/inventory item is tracked, the restocks and changes in the admin itself should be triggering though. If you still see the available value jump in the Admin/API but never get a payload, could you share the approximate timestamp for when you made the product inventory adjustment in the admin and we can try to trace it?
Hope this helps - let me know if I can clarify anything as always here!
As you said, inventory will be deducted when the order is fulfilled + Payment is done, I tried with a PREPAID order, did fulfillment, but no changes reflected on inventory, and didn’t get any response from INVENTORY_LEVELS_UPDATE webhook.
In addition, in the case of order cancellation, can you please tell us which combination will restock the inventory? We tested the following cases when no changes happened on the inventories.
Unpaid (COD) order + Not fulfilled + Cancelled → ?
Prepaid Order + Fulfilled → Cancelletion not possible → No Change (expected)