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, 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
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.
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?
This is a critical issue for some of the users of our app who have no variants on their products. Our app heavily relies on detecting when a product updates. Without that we’re missing many updates and merchants are waiting that things happen. We don’t have a good way to deal with this.
Hey @Soufiane_Ghzal and all - I still don’t have a concrete update, but I will see if there’s anything we can share on our side and loop back if I do have any new info. Thanks again for flagging this.
@Alan_G thank you, in the initial message Deathmelon mentioned that this issue has been reported for years.
I’m wondering if the dev team is considering fixing this some day?
It’s really a critical issue, affecting merchants and app developers. We have zero workaround - nothing triggers, the app receives 0 signals. The only alternative is polling. Which is realistically not doable and that’s what webhooks are designed to replace in the first place. That’s why it should be considered critical.
That’s the kind of thing for which we deserve more transparency.
I know you, Alan and the rest of the dev community team, do your best and I really appreciate your kindness and your patience. What follows is directed to the rest of the Shopify team, your managers:
I know that Shopify went into a wave of firing, and Tobias Lütke said that you should prove that AI can’t do the job to keep humans in the team. Isn’t it a good proof that AI can’t fix and you need more staff again to fix these issues?
Also as per my previous message that has not got any attention, I and many other “partners” are still requesting more transparency from Shopify on these things.
I wouldn’t treat Next Generation Events as a fix for this particular case just yet, but it’s a possibility for sure.
Right now, Events are currently in developer preview on the unstable API version, so they’re meant for testing and feedback rather than production replacement for webhooks. They also depend on supported field-level triggers. From what I’m seeing in the current Product Events reference, there are variant-level triggers like price and compare-at price, but I’m not seeing variant metafields exposed as a trigger yet (there are product option metafield triggers though)
That said, I can look into this to see if this is supported or on the road map. I still can’t guarantee anything, but I can definitely flag this specific case for you.
I’ll keep this thread updated if I get anything more concrete, and any shipped platform change should also show up in the developer changelog.
Hi @Alan_G We have an increasing number of users being affected by this issue.
We’d appreciate that Shopify gives some attention to this bug. As I mentioned earlier we do not have any workaround, it’s especially difficult to deal with as we’re working with large catalogs and we’re trying to optimize for the volume, so we can’t afford re-fetching the whole catalog every time.
Have you been able to take a look at whether this is fixed with the new events system? No worries if you haven’t I will experiment by myself as well.
We’re OK to use the new event system in production despite being a dev preview if it fixes this specific issue, as it has strong consequences for merchants relying on our app.
I definitely get why polling is not the most ideal answer here, especially for large catalogs. I’ve reached out internally again to see if I can get some more info on this to share with you. I still don’t have a timeline I can share, but I’ll keep this thread updated if I get anything more on my end. Really appreciate your patience on this.
@Alan_Git seems that the error is even deeper than it seems. Not only the webhook is not triggered. But also the product’s update_date is not refreshed. Which also causes issues when you cache the update date to figure out if a product changed when you fetch the whole catalog.
On the update date, it seems that I was wrong at first. I made additional tests and turned out that the update date is correctly updated. Not sure what I did wrong the first time, but I hope it was just me and there isn’t another condition that leads the update date to refresh or not
Hi @Alan_G - it seems that using the app flow + flow companion - variant level metafields are triggering the flow. Any idea how they can get it to work?
Events now support metafields as triggers for Product, Product Variants, Order, Customer, Collection and Location. Product Variant metafield triggers are available via the Product topic^