🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Webhooks for Shopify Collections

13 replies
Last updated: Mar 15, 2021
Does anyone know the behaviour of webhooks for Shopify collections that are governed by the
Best seller
algorithm?
ie/ whenever Shopify re-orders the products in one of these collections, does a webhook fire?

Trying to fathom a smooth way to get data-based sorting running.
Mar 15, 2021, 4:48 PM
so we discovered the collection webhook to be relatively unreliable and i believe instead trigger the collection sync after products are also updated because the collection wasn’t always updating in
expected behaviors
Mar 15, 2021, 4:50 PM
Aye.
Mar 15, 2021, 4:50 PM
Have you assessed/implemented any Sanity-side logic to replace this? I guess with all the sales data in Shopify, that's not ideal.
Mar 15, 2021, 4:51 PM
honestly i almost ONLY do sanity-collections
Mar 15, 2021, 4:52 PM
i ignore shopify collections most often because the designs of the sites i implement have so much nested modularity even on collections
Mar 15, 2021, 4:53 PM
that a yolo sync of products would never work
Mar 15, 2021, 4:53 PM
also adding filters to automatically pattern a collection is relatively straight forward
Mar 15, 2021, 4:53 PM
so like
collection of products tagged funtymes
or whatever have you
Mar 15, 2021, 4:54 PM
and then build your query to be powered by those filters in the build
Mar 15, 2021, 4:54 PM
Thanks again
user G
👍
Mar 15, 2021, 7:24 PM
you could also fetch best-seller or sale collections more live? as a possible best case, I actually have a client that I am fetching best-sellers collections from shopify and it’s like the ONLY thing i am fetching collection wise
Mar 15, 2021, 7:29 PM
user G
by "fetching" above, do you mean doing a scheduled pull from Shopify, like every night? So front end won't be up to the minute in sync, but it will be as of each morning?
Mar 15, 2021, 9:25 PM
i meant like on the best seller page you just use the buy-sdk to fetch the real shopify best seller products for the collection grid
Mar 15, 2021, 9:26 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?