Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
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 |
---|---|
5 | |
5 | |
4 | |
4 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022