Webhooks and variant metafields

Just gonna throw my two cents in here, along with everyone that’s done it in the last couple of years.

At the moment, the behaviour of the products/update-webhook is so that if a product has variants, even if only one, the act of updating a variant metafield triggers the webhook. I don’t think the actual metafield data is in the payload, but I can query graphql for the updated variant metafield based on the fact that I got a notice that the product was updated. It’s noisy as all hell, but it works.

If a product doesn’t have any variants though, the act of editing a variant metafield doesn’t fire a single webhook. Just none. That’s just really poor design, if you ask me.

People all over Shopify are using variant metafields for tracking stuff like bin/shelf-numbers, ingredients, etc, and the fact that there is no webhook support for tracking updates in these fields is just not very fun to work with at all. And this has been reported for years and years.

Is there any plan to change/fix this? Is anything being done about it, or atleast looked at?

Hey @Deathmelon :waving_hand:, thanks for flagging this. I do know this is a fairly common feature request, but I’m happy to see if we can share any more info on this or confirm if it’s on the product roadmap. I can’t confirm anything specific on my end at the moment, but I’m happy to dig into this for you for sure.

I’ll loop back here when I have some more info to share :slight_smile:

Hey @Deathmelon, just following up on this! I was able to speak with our product team for you here and I can’t share too many specifics, but did want to let you know that we agree the way variant metafield updates interact with webhook triggers isn’t ideal at the moment.

I can’t guarantee exactly what a fix will look like or if/when it would be implemented, but they have opened an issue internally to look into improving the behaviour. Just wanted to share an update with you to let you know it’s on our radar.

Hope this helps a little bit!

Hey @Alan_G , thanks for much for looking into it for me.

I guess in this case any news is good news, and while I was hoping for a bit more I understand these things take time.

Any chance you’d drop in an update if anything more detailed pops up regarding this in the future? :slight_smile:

Thank you so much :slight_smile:

1 Like

Hey @Deathmelon, no worries, happy to share what I can! I don’t have a committed ETA to share still, but any changes will show up in the changelog: Recent changes to Shopify’s platform

Also, happy to update this thread if I hear more. If you don’t see anything in a few months, feel free to ping me here and I’ll follow up for you :slightly_smiling_face:

@Deathmelon you mentioned that

If a product doesn’t have any variants though, the act of editing a variant metafield doesn’t fire a single webhook. Just none. That’s just really poor design, if you ask me.

I don’t fully understand what you meant to say. How can you update the metafield of a variant if the product does not have a variant?

Even if a product has no variant(s) added to it, it still has a default, hidden variant under the hood called “Default Title”.

Because of this, all products without variants have a default variant, and thus, variant metafields.