I am investigating how to use the admin api for creating draft orders, which will transition to orders when a customer uses the invoice_url to checkout.
When I create a normal order, I can set "send_receipt" to auto send a receipt on order completion to the customer.
In the POS app is a button to resend and receipt.
Is there a possibility to trigger the receipt sending for an order via the admin api?
Can I disable auto sending the receipt on checkout on a draft order like it is possible on a regular order?
You can't send receipts after the order has been created if that's what you mean, and you can't declare suppression of sent receipts on the draft order resource ahead of time.
The orders/create API is best interpreted as an import endpoint, so the thinking is that if you're importing thousands of orders, you want to be able to decide whether or not notifying customers fits your situation at the time of importing. You can resend the email via the admin as a merchant because this is control we intend to give them as merchants, but at this time it's not control we can give to apps safely (email notification spam/hijacking potential).
Draft orders on the other hand are not thematically seen as an importing mechanism, and email notifications are sent after the order completed as would be the case with a more traditional order.
Sorry, when complete the draft order using GraphQL draftOrderComplete mutation, the email is sending to the customer.
It seems there are few options to prevent on REST Admin API, but I couldn't find any way on GraphQL Admin API.
Is there any way to fix on GraphQL Admin API?
Thank you @Alex
Sorry. I am importing old orders using GraphQL Admin API.
draftOrderCreate & draftOrderComplete
But on draftOrderComplete mutation, the email is sending to customers.
That's why I want to prevent this.
|an hour ago|
|2 hours ago|
|4 hours ago|