Skip to main content

sendCreditNoteEmail

Requires permission sales:credit_note:update.

Emails a credit note to the customer. A customerEmail you pass wins; otherwise the customer's email on record is used. A failure is returned as success false with a message rather than as an error. A user cannot email a note they cannot open.

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 SendCreditNoteEmail($creditNoteId: ID!) {
sendCreditNoteEmail(creditNoteId: $creditNoteId) {
emailActivityId
error
message
messageId
replyToAddress
success
}
}

Variables:

{
"creditNoteId": "id"
}

Response:

{
"data": {
"sendCreditNoteEmail": {
"emailActivityId": "string",
"error": "string",
"message": "string",
"messageId": "string",
"replyToAddress": "string",
"success": true
}
}
}
sendCreditNoteEmail(
creditNoteId: ID!
customerEmail: String
): SendEmailResult!

Arguments​

sendCreditNoteEmail.creditNoteId ● ID! non-null scalar​

The ID of the credit note.

sendCreditNoteEmail.customerEmail ● String scalar​

The email address to send to. Omit to use the customer on the record.

Type​

SendEmailResult object​

The result of sending an email.