Trigger 'product/update' webhook when variant metafields are updated.

Trigger 'product/update' webhook when variant metafields are updated.

pd-camille
Shopify Partner
2 0 2

Hey, I saw a lot of conversations regarding similar questions, most of them are from 3 years ago.

 

I would like to know how / if possible at all, I can receive a webhook for when a product's variant's metafields are updated.

 

basically when `product.variants[0].metafields` changes. 

 

If that is not possible, then what's the best way to keep that data within my system in sync with shopify's state in a near/real-time ? 

 

Thanks,

Camille

Replies 2 (2)

toesknees
Shopify Partner
1 0 0

I'd like to know the answer to this as well.

 

I've tried subscribing to webhook with all metafields & private metafields namespaces but when I update a variant's metafield it doesn't send any notifications.

 

Jason_T
Shopify Partner
23 0 4

Hi, did anyone managed to figure out why?

 

I'm also trying to trigger product/update webhook when updating variant's metafield. But it doesn't seems to work.

 

I tried all sort of registration and nothing seems to work.

 

 

[
  "id" => ....
  "address" => "https://mydomain.com/webhook/products-update"
  "topic" => "products/update"
  "metafield_namespaces" => array:1 [
    0 => "pos"
  ]
  "api_version" => "2023-01"
  "private_metafield_namespaces" => array:1 [
    0 => "pos"
  ]
]

 

 

I tried various combination of namespaces and nothing works.

"pos", "variant.metafields.pos", "variant.metafields.pos.title"

Any help will be greatly appreciated!

*UPDATES*
I tried to create a metafield in product level using the same namespace "pos" and the webhook was triggered when metafield in product level is updated!

Seems like there is no way to trigger the webhook when variant level metafield is updated 😞

Linkcious automatically generates related products, up-sells, and cross-sells your entire catalog across your sites much like Amazon's related products. The best part is Linkcious can be used on external sites as well. Use Linkcious on your blog and you will see "Amazon like" related products from your ecommerce store on your blog.