PRODUCTS_UPDATE webhook received instead of COLLECTIONS_UPDATE

maria_millerm
Shopify Partner
2 0 4

Screenshot 2023-06-12 at 15.41.47.png

Hey

I tried to find the reason why some clients' collections are not synced in our application. And after some research, I figured out that if you use a bulk operation on the products page (bulk 'Add collection' in my case, see the screenshot for reference), it fires the  products_update webhook (without any reference to the collections in the payload) instead of collections_update. So we have to make an extra API call to get the collects object to get a list of collections on every product!

 

The second problem is that if many products have been selected this way, you will get a lot of webhooks - one for each product.For example, if you add 15 products to a collection, you will get 15 products_update webhooks instead of one collections_update.


It makes no sense 😞 And makes us to do extra API calls (just to reminder that Shopify has a limit for 2 calls per second)

Reply 1 (1)

Liam
Shopify Staff
2731 299 769

Hi Maria!

 

Thanks for flagging this with us. I've been in touch with the product team responsible for this area and this is a known issue and the team is actively working on addressing this. Will update here once it's resolved.

Liam | Developer Advocate @ 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