CreateCreditMemoForRevisedOrder
Rule
Changed on:
8 Aug 2025
Overview
The rule creates a CreditMemo for the BillingAccount using the supplied revised order details and the old order as well.| Plugin Name | Order Reference Module |
|---|---|
| Namespace | [[account.id]].order |
UI Description
Creates a CreditMemo for the BillingAccount using the supplied revised order details and the old order as well.
Accepts
- ORDER
- BILLING ACCOUNT
Actions
- This rule produces a createAction mutation that creates a credit memo
Rule parameters
| Parameter | Description |
| creditMemoType | The credit memo type, default value = CREDIT_MEMO. |
| creditMemoItemType | The credit memo item type, default value = CREDIT_MEMO_ITEM. |
Event attributes
| Parameter | Description | Data Type | Required? |
| entityReference | The order reference | EntityReference object | Required |
Exceptions
This rule will throw an IllegalArgumentException
- if the
`accountId/retailerId/entityRef/entityReference`in event attributes property is not provided - if the revised order with ref and its items not found or invalid
- if the old order with ref and its items not found or invalid
- if failed to set up the taxType
- if failed to handle the money
Configuration example
1{
2 "name": "<ACCCOUNTID>.order.CreateCreditMemoForRevisedOrder",
3 "props": {
4 "creditMemoType": "CREDIT_MEMO",
5 "creditMemoItemType": "CREDIT_MEMO_ITEM"
6 }
7}