Issue: Using the Admin GraphQL mutation draftOrderInvoiceSend, the email.body field does not appear in the sent invoice email; only email.customMessage is reflected. The sent email otherwise uses the default template/subject.
Findings: A Shopify staff member replicated the problem and confirmed email.body is in the schema by mistake and will be removed. There is currently no API-supported way to customize the invoice email body or subject; customization should be done in Admin > Notifications.
Workarounds/clarifications: customMessage works (including HTML) and is appended to the default email. Other fields like subject/from/to do not override the default template behavior via the API.
Recent updates: Another user initially saw similar behavior but later resolved part of their issue by correctly passing GraphQL variables in the request. However, this does not change the core limitation that email.body is unsupported. A request for example query/variables suggests ongoing troubleshooting, but the main outcome remains: rely on Admin > Notifications for template customization.
Summarized with AI on December 17.
AI used: gpt-5.
We wanted to send customized invoices against draft orders. That’s why we tried draftOrderInvoiceSend mutation.
According to the documentation, the draftOrderInvoiceSend mutation does accept an email body. But the provided body doesn’t reflect on the actual email that is sent! Although the email->customMessage does work! It even supports HTML.
I’ve tried passing simple HTML, LIquid(exact one from ‘/email_templates/draft_order_invoice/preview’ and modified one) to the email body. None of them works! It always sends the default email.
Here’s my sample passed variables:
{
"email": {
"customMessage": "This works, even html!",
"body": "This does not work, whatever I pass. Liquid or Html none of them works",
"from": "store_admin_emial",
"subject": "Email Body test",
"to": "customer_emial"
},
"id": "draft_order_gid"
}
I couldn’t find any restrictions stated in the Doc. If anyone has got any idea please help me out.
Thanks for reporting this. I’m able to replicate. I’ve checked in with the team who maintain this feature and they’ve said that field is there by mistake and will be removed shortly.
Thanks for checking. I understand that the field wasn’t expected to be there.
So, is there any other way we can send a customized Invoice to customers?
Any update on this issue? I’m trying to use the draftOrderInvoiceSend mutation and none of the “email” custom inputs seem to work. The draft order invoice emails are getting sent successfully via graphql api but only with the default subject and custom messages despite different definitions in my request.
Edit: never mind! I figured out that I forgot to specify the email variables in the actual request!