Listening to product metafield updates

So I’m not too sure on this, but if I setup a webhook using the PRODUCTS_UPDATE topic, and then specify metafieldNamespaces, will I only receive webhooks for when any metafields against a product with the passed namespaces are updated? Or will this webhook be sent for an update of a product in general?

`mutation webhookSubscriptionCreate {
  webhookSubscriptionCreate(
    topic: PRODUCTS_UPDATE
    webhookSubscription: {
      callbackUrl: "${process.env.APP_URL}/shopify/metafield"
      metafieldNamespaces: ${JSON.stringify([...currentNamespaces])}
      format: JSON
    }
  ) {
    webhookSubscription {
      id
    }
    userErrors {
      field
      message
    }
  }
}`

Hey @Luke,

When you add the metafield namespaces to a products/update webhook you’ll receive updates whenever:

  • A product field is updated
  • A product metafield in one of those namespaces is updated
  • A variant field of that product is update

One thing to note is that updates to variant metafields in those namespaces will not trigger the products/update webhook. I wish it were possible but it’s not the case right now.

Best,
Daniel