Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
The webhook does get called when I use the "Sort" dropdown to switch from an automatic sort to manual sorting, but when I drag an individual product to manually re-order, the webhook doesn't get called.
Is this a bug? I want to know when the manual sort order of a collection has changed, but it doesn't seem to work.
Changing the sort_order property of the collection is updating the collection object itself, leading to a webhook being fired. Changing the order of the products in the collection manually when the sort_order is already manual does not lead to a change of the collection object itself, which is why you're not seeing webhooks firing. The value being changed (position in a collection) lives on the collect, which at this time does not have a corresponding webhook unfortunately.
Alex | 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 the Shopify Help Center or the Shopify Blog
Thanks for the response @Alex. I would expect both sorting methods to fire the webhook. What is the best way to make an API feature request?
Right here is just fine! If you have more to add to your use case feel free to do so. I'm cataloging that information on my end.
Alex | 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 the Shopify Help Center or the Shopify Blog
+1 on this feature request
It would also be nice to have the `updated_at` field respect sort order change as well. Maybe this is a given in order to generate the new webhook entry...
+1 — I'm also hoping for webhooks to fire when collection products are manually re-ordered.
@Alex , any update if we might be able to get the `collection/updated` webhook fired when a collection product sort order is changed?
It seems like the the Collect entries are 1:1, i.e. product to collection, so the only way to know if a sort order has changed in a collection, would be to monitor every single Collect for a collection. Am I misinterpreting this? If I'm reading it correctly, that's a massive amount of lifting in order to know if the product sort order of a collection has changed.
+1 we need to have a webhook here as well.
+ 1.
We are also looking for collection/update event should fire if we sort the products manually.
+1, It's 2024 now and still does not have this webhook 😐
Yes, Shopify does not trigger Webhook when the order of the products is changed.
But rather than pulling data for all the collections there is a smarter way to sync data.
This is useful when the store has several collections.
When you change the order of the products "updated_at" parameter of the Collection Object is updated. Use this to identify the collections that need to be synced.
Use- https://STORE/admin/api/2023-01/smart_collections.json?updated_at_min=2023-10-17T20:01:07-07:00
Store the updated_at_min in your database at the time your sync starts.