Hey folks,
I have a draft order admin extension that calls the Admin GraphQL API to set metafields on draft orders. The issue: when I convert the draft order to an order in Shopify Admin UI, those metafields don’t carry over to the order.
I’d expect the order to inherit the metafields from the draft order - similar to how metafields set on checkout via extensions automatically propagate to the order after checkout completion.
Can someone from Shopify confirm if this is a bug and whether there’s a timeline for a fix?
For workarounds, we could listen to the order create webhook, find the associated draft order, and manually copy the metafields. But in our case, we need those metafields to already be in the order create webhook payload, so that workaround won’t cut it.
Hi @Patrick_Jakubik,
I can confirm that this is expected behaviour, metafields added to a Draft Order do not automatically carry over to the Order created from the Draft.
You can create a metafield definition sync to pass a specific draft order metafield definition to the created order via the Admin, though it’s not currently available via the API at this time.
I have also discussed this behaviour further, along with some suggested workarounds to capture Draft Order metafields and create them on the created Order via webhooks, in the following thread for context:
Thanks Kellen, appreciate the response. Unfortunately this approach doesn’t work well for us since we’re not currently using metafield definitions for a few reasons. The lack of API support is also challenging for public apps like ours that need to configure this programmatically across different merchant stores.
Hi @Patrick_Jakubik,
Thank you for the extra context, I do understand the workaround provided may not be the most applicable for your use cases, and I have submitted feedback on this limitation already as mentioned in the previous thread I linked above. I’ll be adding to the feedback submitted that you are also asking for this feature to be added to the API in the future, as the more feedback we get for things like this, the more likely and quicker it would be added.