Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Does the PRODUCTS_UPDATE graphql webhook only trigger when fields in includeFields have changed?

Kalen_Jordan
Shopify Partner
320 11 46

Trying to determine if the includedFields in webhook subscription control whether webhooks fire only for those fields changing (on an a product update trigger for example).

 

From some tests I've done, I'm definitely seeing that to be the case, but not consistently.

 

I have A set up with includedFields = tags, B with title, body_html, and C with price.

 

I think price was probably an invalid field to use since it's on the variant.

 

When I change a tag and save, only A fires.

 

Changing price caused B and C to fire.

 

Changing body content causes only B to fire.

Kalen Jordan
Platform Advocate
MESA - Shopify Automation You've Love
Replies 3 (3)

Liam
Shopify Staff
2677 288 732

Hi Kalen,

 

Thanks for flagging this - it does appear to be the case that webhooks will fire only for those fields which are specified - as you've found, and it's important to note that the payload of the webhook will still include the entire record, not just the fields specified in includeFields. I've gotten in touch with the events product team to confirm this and to look at the inconsistencies you've highlighted, and determine if the docs should be updated to clarify the behaviour you've noted. 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

Kalen_Jordan
Shopify Partner
320 11 46

Nice! Thanks man!

Kalen Jordan
Platform Advocate
MESA - Shopify Automation You've Love
Kalen_Jordan
Shopify Partner
320 11 46

Hey Liam - do you know which fields it looks at? Have done some tests with title, tags that have worked. But I tried publishedOnPublication and it didn't seem to work.

Kalen Jordan
Platform Advocate
MESA - Shopify Automation You've Love