Webhook for product's collection changing

Highlighted
New Member
2 0 0

What event triggers when I delete or attach new product's collection?
"Product update" don't triggers.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1555 81 282

What do you mean by product category? I don't see this field serialized on product resources. Can you be more specific?

Cheers.

0 Likes
Highlighted
New Member
2 0 0

Sorry, I'm new in Shopify.

I mean collection of course

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1555 81 282

Since collections a product belongs to aren't serialized on the product resource, products/update would not be dependable in determining changes to what collections a product is published to. The same is true in that products belonging to a collection are not serialized on collections. While collections/update would fire, it would not give you specifics about what product was added or removed from it.

The answer here I feel would be to listen for collections/update to get the ID of the collection, and then make a GET request to `/admin/collects.json?collection_id=57943621688` to see if there are any new or missing collects that were there before (you'd probably have to track the state of this list from your end.

Hope that helps a bit.

Cheers.

0 Likes
Highlighted
Shopify Expert
6 0 4

Hi Alex,

 

I did what you suggested to listen to collections/update webhook. however, when i add or remove products from the collection, i don't receive webhook message from collections/update. any idea why that could be? thanks

4 Likes
Highlighted
New Member
2 0 0

Following on this. Add product to collection not fire `collection/update` webhook. Can Shopify Stuff point to documentation or add explanation here?

0 Likes
Highlighted
Tourist
5 0 2

Running into this issue as well. Not sure which triggers should be fired when adding, or removing a product to a collection.

0 Likes
Highlighted
Shopify Partner
10 0 1

Same Issue here:

When adding/removing a product to a collection, the "collections/update" Webhook does NOT get triggered somehow...

Any ideas why?

Any solution?

This way I don't have a way to find out when particular collection was updated. 

0 Likes
Tourist
3 0 1

I have this problem too. At the moment seems there's no way to receive updates on collection - products relationships?

1 Like
Highlighted
New Member
1 0 0

Just following up on this as well.

 

The last reply from Shopify made it sound like it should work - i.e. we should be getting a trigger when a collection is updated - but that's not happening.

I'm not concerned about the hook not containing the details about the change - happy to fetch the products belonging to it when the hook is triggered. But I'm getting neither product nor collection hook triggers when you add a product to collection.

Just to be clear here, I'm talking about manual collections - for automated ones, the hook does get triggered because the collection object itself changes.

0 Likes