[Feature Request] Webhook filtering on field changes

The new webhook filtering is great, but it would make our lives so much easier if we were able to retrieve webhooks only if a certain field changes, not based on a fields value.

For example I only want to receive products/update when a variants inventory_quantity changes.

4 Likes

Agreed. The absolute filters that currently exist are useful only in some cases; but one thing they are already missing out on is updating an item it it leaves that segment. E.g. a filter ā€œvariant.price>10ā€ might seem useful, but I will miss out on knowing when a variant drops out of the segment because it’s price drops <10. It basically becomes stale in an invalid state.

I think this would be a really useful feature.

Just a questions for your example you could use the inventory webhooks though right?

Unfortunately that wouldn’t work for me because the inventory webhooks don’t contain the actual quantity in the payload, so I’d then need to make a request to the product variant to get it.

This one has available quantity :grin: Webhooks

Hmm are you sure? If is this not the full payload?

Yeah available is a number when there is available stock :grin:

I see, although I believe inventory levels is for locations no? Currently my app is just doing it all on a variant level so would get a bit messy doing this, but nonetheless switching to this would definitely reduce my webhooks!

Thanks Jordan!

Yeah, you could store this data and aggregate on a inventory item id, which at the moment is 1-1 with product variant id :grin:

Oh also I forgot to mention with the new product updates you do get a list of variant ids in the webhooks, with an updated at. Which might help you with some diffing of changes

Thanks for the feedback on filters! The ability to filter a webhook based on field changes makes perfect sense. This is something the team is already aware of and will be considered in the future.

4 Likes

This is pretty much needed. Especially for products/update webhook. My app is being used by 50 stores and I receive more then 300k products/update webhook in a week. I think you don’t have to consider it in the feature, you can handle it more quickly considering you already implemented a harder version of it .

Current webhook filtering solution is limited, difficult to setup, and does not include all types of cases, and all operators.

A better solution - would be to add an additional field to ALL webhooks that simply tells us which fields have CHANGED. I don’t care if the value has gone up or down. I just want to know if its different. I suspect most use cases for this idea would fall into this category. If you tell me what has CHANGED, i can reduce my API usage by 1 million calls per day, no problem.

For example the field could simply be called ā€œchanged_fieldsā€: [ā€˜images’,’handle’,’title’]. Something simple like this would be amazing. Maybe each variant can have its own ā€œchanged_fieldsā€ and it would be the same idea but targetting ā€œpriceā€, ā€œskuā€, etc…

I receive 300K every few hours. Its crazy. Then they need to each be parsed and processed because i have no idea what has changed and whether its just some useless webhook I should throw away.