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

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

2 Likes