Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
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
webhook poroduct update version 2024-07 does not return the inventory_management field
https://shopify.dev/docs/api/admin-rest/2024-07/resources/webhook#event-topics-products-update
but
webhook poroduct update version 2024-04 does return the inventory_management field
https://shopify.dev/docs/api/admin-rest/2024-04/resources/webhook#event-topics-products-update
I ran into this too. Just spend hours debugging a problem in our app and it looks like I'm hitting the exact thing you refer to -- inventory_management missing in the latest webhook version. Would love to see this addressed.
-Jeff
We also need this field, or please return the availableForSale field in the webhook
We ran into this too. We need this property or at least a substitution for it. Since its value was based on the "Track quantity"-Checkbox in the shopify-Admin it was an indicator for our app to trust the inventory quantity we get with the webhook or not. Because it was removed our app doesn't work as expected anymore. Only solution so far is to switch back to version 2024-4.
We also have issues due to this change. We are a sales channel app and with this change, products are oversold, which already caused problems to our merchants. Also had to go back to webhooks version 2024-04 again... We want to go to 2024-07 as soon as possible though, so that we can enable discounts for the draft order that our sales channel creates. Please help us with this.
I went back to 2024-04 webhooks for now. I submitted a ticket about this to Shopify customer support yesterday. Will let you folks know if I here back with anything.
Yeah, we went back too...
That would be awesome, thank you, appreciate it!
woops. typo. Hear back not here back.
I received a response from Shopify tech support on this.
They basically said:
1) The inventory_management in the webhook was removed as part of the separation of products/variants and inventory in their object model.
2) Covered in this release note -- https://shopify.dev/changelog/product-variant-field-cleanup
3) They suggest using GraphQL rather than REST APIs in general going forward (no surprise).
4) We can use the products/update along with the inventory inventory_items/update webhooks, but they admit this might be complicated dance to coordinate the information for a variant.
5) They suggest instead a better approach may be to call the GraphQL API to get inventory info from the webhook callback to find out whether inventory is being tracked for a variant. It's unfortunate to have to make the call, but their claim is GraohQL calls are much cheaper/more performant than REST API calls
6) If all of this ends up being too painful and a blocker, then I should reach out to support again to see if there are other options to explore.
-Jeff
I think querying via Graphql is quite unnecessary, considering the huge amount of products/update webhook calls, it would be a huge waste of resources to have to query via Graphql every time
I agree, those API requests add up when you have a lot of users and many update/create events constantly getting triggered. We've rolled back to the 2024-04 version of the webhook for now as well. Hope Shopify reconsiders this change.
Hey all! This was documented in the changelog: https://shopify.dev/changelog/product-variant-field-cleanup. TLDR: you should subscribe to inventory_items/{} topics and use the `tracked` field in the webhook payload.
I've looked into doing that but it is really messy. Depending on which order the webhooks get fired/picked up by my code, I can end up with an inventory id that I don't yet have a product variant for (so I just have to store it in my local db expecting I'll get a variant later) or I can end up with an variant where I don't immediately know whether the inventory is tracked -- so I have to defer actions til I eventually get the inventory_items webhook. And I have to coordinate the timestamps of the product and the inventory_management webhooks to see who is more recent whether they correlate to the same change, etc. Probably possible, but definitely a royal pain to get consistently right
It used to be a piece of cake.
-Jeff
I have to agree to Jeff. We run an app that creates draft orders based on comments and DMs on Instagram, which is often highly time sensitive. We have thought of ways we could get around the latest changes. The only solutions we came up with would make the experience for merchants and their customers significantly worse.
@anitaShopify , do you already have an indication on how Shopify wants to proceed with this topic?
Thank you!