Solved

inventory_items/delete webhook return item SKU not productID

shauno123
Tourist
5 0 2

Hi

 

We are busy building a private app which updates the status of item in the marketplace if it is deleted or made inactive in Shopify. The item delete webhook returns the product ID not the SKU.

 

Is there a workaround so we can return the SKU not the product id to the app?

 

Thanks

Accepted Solution (1)

_JB
Shopify Staff
836 100 223

This is an accepted solution.

Hey @shauno123,

 

All delete webhooks contain just the id of the asset that was deleted, so I can't think of a workaround that would include the SKU as well. 

 

Can you explain how you plan to use the SKU from this webhook? Your app should already be aware of the relation between inventory_item_id and SKU, and the inventory_item/delete webhook will only fire if a particular variant is deleted. If that SKU is used again in a different variant you will get that in the create or update webhook, so I'm not sure how the SKU would be useful in the delete webhook. Please let me know if I'm missing something here and I'd be happy to explore this further.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

_JB
Shopify Staff
836 100 223

This is an accepted solution.

Hey @shauno123,

 

All delete webhooks contain just the id of the asset that was deleted, so I can't think of a workaround that would include the SKU as well. 

 

Can you explain how you plan to use the SKU from this webhook? Your app should already be aware of the relation between inventory_item_id and SKU, and the inventory_item/delete webhook will only fire if a particular variant is deleted. If that SKU is used again in a different variant you will get that in the create or update webhook, so I'm not sure how the SKU would be useful in the delete webhook. Please let me know if I'm missing something here and I'd be happy to explore this further.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog