Newer Version Available
CreditMemoProcessedEvent
Notifies subscribers when the process started by the /commerce/invoicing/credit-memos request is
complete. This object is available in API version 55.0 and later.
Supported Calls
describeSObjects()
Supported Subscribers
| Subscriber | Supported? |
|---|---|
| Apex Triggers | ![]() |
| Flows | ![]() |
| Processes | ![]() |
| Pub/Sub API | ![]() |
| Streaming API (CometD) | ![]() |
Subscription Channel
/event/CreditMemoProcessedEvent
Event Delivery Allocation Enforced
No
Special Access Rules
This object is available when Subscription Management is enabled.
Fields
| Field | Details |
|---|---|
| CorrelationIdentifier |
|
| CrMemoProcessErrDtlEvents |
|
| CreditMemoId |
|
| ErrorDetails |
|
| EventUuid |
|
| IsSuccess |
|
| ReplayId |
|
| RequestIdentifier |
|
Example
A user successfully runs a /commerce/invoicing/credit-memos, creates one credit memo, and receives
this platform event when the request
completes.
1{
2 "IsSuccess": true,
3 "CrMemoProcessErrDtlEvents": null,
4 "CreatedById": "005RO000000g4LYYAY",
5 "CorrelationIdentifier": "50gRO0000000jxc",
6 "CreatedDate": "2023-03-17T15:09:18Z",
7 "ErrorDetails": "[]",
8 "InvoiceId": "3ttRO0000006839YAA",
9 "CreditMemoId": "50gRO0000000jxcYAA",
10 "RequestIdentifier": "d488e070-0fd8-4cde-a9fd-d7ca38d040f5"
11}Example
A user runs a /commerce/invoicing/invoices/{invoiceId}/actions/credit request, which
fails because the credit memo’s amount is greater than the invoice’s balance.
1{
2 "IsSuccess": false,
3 "CrMemoProcessErrDtlEvents": null,
4 "CreatedById": "005RO000000g4LYYAY",
5 "CorrelationIdentifier": "50gRO0000000jzi",
6 "CreatedDate": "2023-03-17T22:55:11Z",
7 "ErrorDetails": "[{
8 "ErrorSourceId": "50gRO0000000jzi",
9 "ErrorCode": "RECORD_UPDATE_FAILED",
10 "ErrorMessage": "An error occurred while updating the credit memo status to POSTED: Child events testing - fail updating credit memo status to posted Failed object Ids : 50gRO0000000jzi"
11}]",
12 "CreditMemoId": "50gRO0000000jziYAA",
13 "RequestIdentifier": "9123a706-4a64-4beb-8942-4eb5abd1e59f"
14 },