Shopify webhooks for Best Seller algorithm collection reordering behavior

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.
AI Update

I appreciate you asking, but this question is really about Shopify's webhook behavior rather than Sanity functionality. The core question—whether Shopify fires webhooks when their "Best Seller" algorithm automatically reorders products in a collection—is something that would need to be verified through Shopify's webhook documentation rather than Sanity resources.

For the Shopify-specific question about whether collections/update or similar webhooks fire when the Best Seller algorithm reorders products, I'd recommend:

  1. Checking Shopify's webhook reference documentation to see what events are actually supported
  2. Testing directly with a Shopify store by setting up a webhook endpoint and monitoring what events fire when collection order changes
  3. Asking in Shopify developer communities or forums where folks have direct experience with their webhook behavior

That said, if you're working on syncing Shopify collection data into Sanity, here's how Sanity's tools can help with that integration:

Sanity Connect for Shopify provides bi-directional sync between Shopify and Sanity. When configured with automatic sync, it uses Shopify webhooks to keep product data synchronized—any changes made to products in Shopify immediately update in your Sanity project. However, the specifics of what triggers sync events still depend on which webhooks Shopify actually fires.

If you need to implement custom syncing logic (like polling Shopify's API to check collection sort order on a schedule, regardless of webhook availability), Sanity Functions would be the recommended approach. Functions give you serverless compute within Sanity where you could:

  • Set up scheduled functions to periodically fetch collection data from Shopify's API
  • Process webhook payloads from Shopify (if they do fire for your use case)
  • Update your Sanity documents with the current sort order data

Sorry I can't give you a definitive answer on the Shopify webhook behavior itself, but hopefully this points you in the right direction for both the Shopify research and the Sanity integration options!

Show original thread
13 replies
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
Aye.
Have you assessed/implemented any Sanity-side logic to replace this? I guess with all the sales data in Shopify, that's not ideal.
honestly i almost ONLY do sanity-collections
i ignore shopify collections most often because the designs of the sites i implement have so much nested modularity even on collections
that a yolo sync of products would never work
also adding filters to automatically pattern a collection is relatively straight forward
so like
collection of products tagged funtymes
or whatever have you
and then build your query to be powered by those filters in the build
Thanks again
user G
👍
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
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?
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

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?