A developer is experiencing issues with the draftOrderComplete mutation (API version 2022-10) that produces inconsistent results:
Core Problems:
Order confirmation emails are sent twice to customers despite draftOrderComplete being called only once
Two variants of orders appear after completion: one “successful” (subtitle: “APP NAME (via import)”, single email) and one “error” (subtitle: “APP NAME”, duplicate emails)
No errors appear in the userErrors property of the mutation response
Implementation Details:
Developer uses DRAFT_ORDERS_CREATE webhook to trigger draftOrderComplete (instead of calling it immediately after draftOrderCreate)
Waits for draft order “Ready” status via polling before completing
Forwards mutation results to debug email for verification
Current Status:
Developer provided X-Request-IDs for both errored and successful orders
Shopify support confirmed their development team is investigating
Similar issues with draft orders and email confirmations have been reported by others
No timeline or guaranteed resolution provided yet
The issue remains under investigation by Shopify’s development team.
Summarized with AI on November 24.
AI used: claude-sonnet-4-5-20250929.
please let me share a strange phenomenon while processing draft orders with draftOrderComplete mutation here and I need your help to solve this. Attachment is a figure explaining this problem.
I’m using API version 2022-10
[Problem]
Order confirmation mail sent to customer twice despite that draftOrderComplete was invoked just once.
Strangely, there are 2 variants of order after draftOrderComplete (successful and error).
Successful order has subtitle of “APP NAME (via import)” and sending order confirmation email just once.
Error order has subtitle of just APP NAME and sending duplicated order confirmation emails as mentioned above.
[Flow of my current code]
Invoke draftOrderCreate mutation
Catch DRAFT_ORDERS_CREATE topic in a webhook and wait for the draft order’s “Ready” status with polling loop
Once the draft order is ready, invoke draftOrderComplete mutation
Forward a result of draftOrderComplete mutation to my email address as debug information (that’s why I confirmed draftOrderComplete was surely called just once even though it send order confirmation email twice)
The reason why I use webhook catching DRAFT_ORDERS_CREATE instead of calling draftOrderComplete just after draftOrderCreate is, to guarantee my code calls draftOrderComplete just once. (but it seems using webhook doesn’t solve the trouble)
Let me share one result of draftOrderComplete which generating “error” order (sending duplicated order confirmation email as shown in the previously attached .pptx file).
I don’t see any errors at userErrors property though..
Hey @mktb , could you share a plain text X-Request-ID that would have been sent in the responses headers you received back from us for the draft order that errored?
We can use that to take a look into the exact API call in our logs and see if we can potentially track down what’s causing the draft order creation process to duplicate.
Thank for sending that info over @mktb - really appreciated! I wanted to get back in touch to confirm that our developers are currently looking into this. I can’t guarantee a turnaround time or an exact resolution at the moment, but did want to update you on this. I’ll reach back out once I have more information - just wanted to confirm that it does appear that similar issues relating to draft orders/email confirmations have been reported by others.
Thanks for bringing this to us - please keep an eye out for a response from me or one of my colleagues.