FROM CACHE - en_header

Webhook for product's collection changing

ras2607
New Member
2 0 0

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

Replies 22 (22)
Alex
Shopify Staff
Shopify Staff
1561 81 323

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

Cheers.

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

ras2607
New Member
2 0 0

Sorry, I'm new in Shopify.

I mean collection of course

Alex
Shopify Staff
Shopify Staff
1561 81 323

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.

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

development_s57
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

FrankGooten
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?

raymmondxma
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.

Mets
Shopify Partner
12 0 4

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. 

fran5
Tourist
3 0 3

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

ivgalic
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.

Mete
Shopify Partner
124 0 27

@ivgalic wrote:

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.


@Alexdo you have any update here?

Co-Founder / Developer at: merchbees
Merchbees Low Stock Alert - Keep track of your low stock items by email and slack
Merchbees Inventory Value - Know your inventory value and quantity in real-time
Push Down & Hide Out of Stock - Move out of stock products to the bottom of the collection to improve SEO & hide/ unhide automatically
sravans
Shopify Partner
23 1 5

Seems it's still the case and no one knows how do we get webhook updates when a new product is added to a collection.

@Alex Would you please address this problem?

Jason27
Shopify Partner
83 1 29

I just tested using api 2020-07. 

Collections/Update works fine when products added or removed from a Custom Collection in the Edit Collection section of the Admin.

However with a Smart Collection, if a product is added or removed automatically it does not register - you have to catch the products/update webhook instead.

But if you modify the settings of the Smart Collection, it will generate a Collections/Update.

Here's the BUG: If you add or remove a collection from the Product Edit page in the right side box, it does not register a Collections/Update OR Products/Update

This issue needs to be escalated asap.

___END___
Excursionist
21 0 4

Yup it is a problem and unfortunately customers will probably take it out on app developers. Just when we thought collection handling had improved we have this big hole. 

Jason27
Shopify Partner
83 1 29

Everyone should go to their partner dashboards, click Support -> Email -> Topic choose API Development. And send them the details about the Product edit page right side collection box webhook error. Do it now!

Here's what I wrote:

Hello please fix this bug:

If you add or remove a collection from the Shopify admin Product Edit page in the right side box, it does not register a Collections/Update OR Products/Update webhook. Both webhooks are not firing when adding or removing collection and then pressing SAVE in top right corner (it should at least fire one of them).

I've thoroughly tested this - collections webhook is sent from changes in collection edit page, but NOT product edit page.

This is causing us to be unable to register changes in collections, and creating issues with merchants not understanding why.

 

Carlne
New Member
3 0 0


Do you know if there are any updates on this topic since you raised the case ?

Jason27
Shopify Partner
83 1 29

I got in touch with the app team support directly, and sent them a video showing them the bug (using a live recording of incoming webhooks). They confirmed the bug and said they would try to fix it. This was about 3 months ago or so.. around the time I last posted. I haven't heard back, and haven't checked to see if its fixed. I should probably do that...

Carlne
New Member
3 0 0

Yes, that would be great to know indeed. Can you keep us posted as soon as you get an answer from them ? Thanks 🙂

___END___
Excursionist
21 0 4

I spoke with support 3 months ago too and they basically told me to piss off. It is Shopify, I do not expect solutions only headaches. 

PaolaCastano
Shopify Partner
276 1 26