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.
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.
+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...
@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.
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.
Store the updated_at_min in your database at the time your sync starts.