How to include variant metafields in webhook?

Topic summary

Core Issue:
Developers are trying to include variant-level metafields in Shopify’s products/update webhook. When configuring metafield_namespaces, these apply only to product-level metafields, not variant metafields.

Initial Workaround:
Early participants resorted to making additional API calls to fetch variant metafield data after receiving webhooks, as the metafields key in variant objects remained empty despite being present in the payload.

Proposed Solution:
One user (JohnWF) reported success by including the variant metafield namespace in the metafieldNamespaces array when creating the webhook subscription. They shared code showing a GraphQL mutation with includeFields: ['id', 'variants'] and metafieldNamespaces: ['loyalty'] to retrieve variant metafields like variant.metafields.loyalty.points.

Ongoing Problem:
A recent user reports this solution isn’t working for them—webhooks fire when updating variant properties (like SKU) but not when updating variant metafield values directly, suggesting the issue may not be fully resolved or implementation-dependent.

Status: Unresolved for some users; awaiting official Shopify team clarification.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

any update on this? Having the same issue.