Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Get product update webhook only if body_html is updated

Solved

Get product update webhook only if body_html is updated

kevin_mittal
Shopify Partner
10 0 7

Hello,

 

I am subscribing to `product/update` webhook, and is it possible to configure the webhook to only fire if certain fields on the product are changed? For example, body_html?

 

Furthermore, is it possible to not receive any webhooks when the metafields of products are changed?

 

Essentially, I need to listen to only changes made to body_html, and not anything else.

 

Thanks!

Accepted Solution (1)

DanAtBonify
Shopify Partner
57 4 42

This is an accepted solution.

This is not possible. The webhook system is very basic unfortunately. You will also receive product/update webhooks when orders are placed.

 

You will need to code your own solution that receives all webhooks and determines if the body_html field has been changed.

View solution in original post

Replies 2 (2)

DanAtBonify
Shopify Partner
57 4 42

This is an accepted solution.

This is not possible. The webhook system is very basic unfortunately. You will also receive product/update webhooks when orders are placed.

 

You will need to code your own solution that receives all webhooks and determines if the body_html field has been changed.

DoodleNoodle
Shopify Partner
4 0 4

"How can I use webhook filters in Shopify to receive notifications only for price changes, and what is the correct format for setting up the filter? I am not familiar with webhook filters and would appreciate any guidance or resources to help me understand how to set up a webhook filter to monitor changes in product prices.

 

found this, but do not really get it:

To set up a webhook filter to be notified only of price changes, you need to specify the price changes you want to receive.

 

Here is an example of how you can do that:

  • In the webhook creation form, click the "Add Filter" button.
    Select "Variations" from the drop-down menu.
    In the "Path" field, specify the path to the price variation. For the default price of a product, the path is "variants/price". If you want to specify the price of a specific variant, you need to change the path accordingly. You can use the Shopify API documentation to find the path that meets your requirements.
    In the "Operator" drop-down menu, select the "changed" operator.
    In the "Value" field, enter the value "true".

With this filter, the webhook will be triggered only if the price of the product changes. If you want to monitor other changes such as title, description or inventory status, you can add additional filters specified according to your requirements.