Hi everyone,
I’m working on a Shopify app that listens to restocking web-hooks. The web-hook triggers successfully, but the inventory-Item-Id from the web-hook payload doesn’t match the correct product-Id in my database.
Steps I’ve taken:- Checked web-hook response, which provides inventory-Item-Id, available, and location-Id.
- Stored product-Id and inventory-Item-Id in my Restocking-Event model.
- Queried inventory-Item-Id from Product-Variant using Graph-QL, but it doesn’t always return the correct product-Id.
- Verified in Shopify’s Graph-QL Explorer, but the mismatch still exists.
Issue:- The inventory-Item-Id from the web-hook does not map correctly to product-Id, preventing accurate restock notifications.
Need Help With:1. How to correctly fetch product-Id from inventory-Item-Id?
- Recommended Graph-QL query or REST API endpoint for accurate mapping?
- Has anyone else faced this issue, and how did you solve it?
Any help would be greatly appreciated!
Thanks in advance.