Webhook filtering for changes on a resource

Webhook filtering for changes on a resource

rorz
Shopify Partner
18 0 7

We would like to use webhook event filtering (or some other mechanism) to listen only for _changes_ on a field. E.g. for when a `Product.title` changes.

 

Is this possible? Or can webhook filters only be used statically on properties?

 

I think given how voluminous `products/update` are — it would be awesome to say something like "Only ping me a webhook as the result of a product's title changing"...

Reply 1 (1)

anitaShopify
Shopify Staff
5 0 5

Hey @rorz, Yeah it's a great question. Today this isn't possible, however it's something we recognize is a gap in Shopify's webhooks.

 

In the meantime, the best path forward is:

1. Store down your webhooks

2. Compare the webhook previously received with the current webhook you have received, using eg. the header field `X-Shopify-Triggered-At`

3. Do a diff on the fields you are interested in, in order to know what has changed