Skip to main content

sendSalesOrderPaymentReminder

Requires permission sales:sales_order:send.

Email the customer a payment reminder for an order. A valid customer email is required.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation SendSalesOrderPaymentReminder($customerEmail: String!, $salesOrderId: ID!) {
sendSalesOrderPaymentReminder(
customerEmail: $customerEmail
salesOrderId: $salesOrderId
) {
emailActivityId
error
message
messageId
replyToAddress
success
}
}

Variables:

{
"customerEmail": "string",
"salesOrderId": "id"
}

Response:

{
"data": {
"sendSalesOrderPaymentReminder": {
"emailActivityId": "string",
"error": "string",
"message": "string",
"messageId": "string",
"replyToAddress": "string",
"success": true
}
}
}
sendSalesOrderPaymentReminder(
customerEmail: String!
includePaymentDetails: Boolean = false
salesOrderId: ID!
): SendEmailResult!

Arguments​

sendSalesOrderPaymentReminder.customerEmail ● String! non-null scalar​

The recipient's email address.

sendSalesOrderPaymentReminder.includePaymentDetails ● Boolean scalar​

Add a "How to pay" block to the reminder: the amount still due, every active bank account in the order's currency (the default one first), the payment reference to write on the transfer, and where to send the proof of payment. Omitted or false sends the reminder exactly as before. Refused when no bank account matches the order's currency or nothing is left to pay.

sendSalesOrderPaymentReminder.salesOrderId ● ID! non-null scalar​

The ID of the sales order the reminder is about.

Type​

SendEmailResult object​

The result of sending an email.