Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi,
The product/update webhook doesn't seem to be triggering when changing the order of option values on a product (which has the effect of reordering the variants themselves).
For example, when reordering the "Color" options on a product, no webhook is triggered, but if a "Color" option is renamed instead, the webhook is triggered. I'd expect a webhook to be triggered in both cases, since changing any of the options or their order changes the variant-level data. When options are reordered, the product variant list also gets reordered and the "position" property of each affected variant is changed.
Any help with this would really help our team, which is using the product/update webhook to keep our variant data up-to-date and ordered correctly.
Thank you!
Hey @nbennett21
I just tested this and received a notification after re-ordering (and hitting save) with the updated order.
Can you DM me store/product details if you're still stuck?
Payload example:
Before:
"options": [
{
"name": "Color",
"id": 9695811403832,
"product_id": 7608002183224,
"position": 1,
"values": [
"Black"
]
},
{
"name": "Size",
"id": 9695811371064,
"product_id": 7608002183224,
"position": 2,
"values": [
"Small",
"Medium"
]
}
],
After:
"options": [
{
"name": "Size",
"id": 9695811371064,
"product_id": 7608002183224,
"position": 1,
"values": [
"Small",
"Medium"
]
},
{
"name": "Color",
"id": 9695811403832,
"product_id": 7608002183224,
"position": 2,
"values": [
"Black"
]
}
],
Scott | Developer Advocate @ Shopify
Hi @SBD_ ,
Thanks so much for taking a look at this!
I just realized that my explanation of the issue was a little confusing, sorry about that. To clarify, re-ordering the options themselves (eg. "Color", "Size" -> "Size", "Color") is correctly triggering the product/update webhook for me. So, that piece is working great!
However, we also need the webhook to be triggered when re-ordering the values within an option. Using the "Color" option as an example, I'd expect the webhook to be triggered if its values of "Red", "Blue" are re-ordered to be "Blue", "Red", since that change reorders the list of variants on the product (all of the "Blue" variants move to the beginning of the variant list instead of the end).
Hopefully that makes more sense! Thanks for your help 🙂
Ah, got you! and able to replicate. Will pass along the details to the product/webhook folks.
Scott | Developer Advocate @ Shopify
Amazing, thank you so much!
Hey @nbennett21
Sounds like this should be happening but isn't. A ticket has been created to look into the issue.
Scott | Developer Advocate @ Shopify
Thanks for the update! I'll stay tuned.
Any news to this one? I'm facing the same issue.
When reordering options within a variant (like reordering blue -> red to red -> blue) it does not trigger the products/update webhook.
Thanks for the attention