Development discussions around Shopify APIs
We have a headless shop selling digital products that do not track inventory, while static builds (it's a Gatsby website) are triggered when a product is updated. However, every time a product is sold, it triggers an unneeded webhook that eat through the build minutes pretty quickly.
Anyone have some technical insight into what causes a product update webhook to fire?
The other option for us would be to create an app that intercepts the webhook, determines if any info about the product has been updated that requires a rebuild, then trigger Netlify to build & deploy.
Thanks
Hello @fallen-domino,
products/update webhooks do also trigger on inventory level changes, which has caused similar confusion for other apps in the past. We are thinking about how to provide more granular webhooks (i.e. so that you can only be notified on changes that your app cares about), but there's a lot of design and technical discussion that still needs to happen in order to get there.
In the meantime, creating an app that performs custom de-duplication based on only the fields your app would care about to do your build & deploy sounds like safe route to take to me.
james-langille | Developer @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks for the clarification @james-langille. I'm a little confused then when it comes to digital products. These products aren't tracking inventory, but webhooks are still firing for every purchase. Is there a resource I can take a look at which outlines everything that would trigger the webhook?
I did a comparison of two product update webhook events for the same product and the only difference was the "updated_at" property. Do you know if this is intentional?
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023