App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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.
Any help would be greatly appreciated!
Thanks in advance.
Solved! Go to the solution
This is an accepted solution.
Hi @fitneshmaniaapp,
You can fetch a product ID for an inventory item ID with a graphql query like this:
query GetProductIdFromInventoryItemId {
inventoryItem(id: "gid://shopify/InventoryItem/30322695") {
id
variant {
product {
id
title
}
}
}
}
This is an accepted solution.
Hi @fitneshmaniaapp,
You can fetch a product ID for an inventory item ID with a graphql query like this:
query GetProductIdFromInventoryItemId {
inventoryItem(id: "gid://shopify/InventoryItem/30322695") {
id
variant {
product {
id
title
}
}
}
}