CreateReturnOrderFromOrder
Changed on:
12 June 2024
Overview
The rule creates a return entity. The return entity is then used to initiate the process of order items return.
Plugin Name | Order Reference Module |
---|---|
Namespace | [[account.id]].order |
The Order Reference Module is the foundation for order-related implementations. It provides reference workflows for click & collect, home delivery and mixed baskets and those needed to build your own. Extensible by design, use this Module as a base to build a solution to your customers' needs.
UI Description
Creates a return entity. The return entity is then used to initiate the process of returning order items
Accepts
- ORDER
Actions
- This rule produces an action which triggers a GraphQL createReturnOrder mutation
Rule parameters
This rule does not identify any input parameters.
Event attributes
Parameter | Description | Data Type | Required? |
returnItems | The list of return items | Array list | Required |
pickupLocation | The map of pickup address | Map | Optional |
lodgedLocation | The ref of lodged location | String | Optional |
type | The return order type | String | Required |
ref | The order ref | String | Optional |
returnAuthorisationKey | The return authorisation key. Metadata field | String | Optional |
returnAuthorisationKeyExpiry | The return authorisation key expiry. Metadata field | String | Optional |
returnAuthorisationDisposition | The return authorisation disposition. Example:
| JSON | Optional |
returnVerifications | The return verifications. Example:
| JSON | Optional |
destinationLocation | The destination location. | String | Optional |
currency | The currency. Example:
| JSON | Optional |
taxType |
| JSON | Optional |
subTotalAmount | Example:
| JSON | Optional |
totalTax | Example:
| JSON | Optional |
totalAmount | Example:
| JSON | Optional |
Exceptions
This rule will throw an IllegalArgumentException
- if the property is not provided
`accountId/retailerId/entityId/entityType/entitySubtype/entityStatus/event name/attributes`
- if the order not found
- if return settings not found or invalid
`DEFAULT_TAX_TYPE/DEFAULT_RETURN_DESTINATION_LOCATION`
- if GraphQL mutation parameters are calculated incorrectly
All generated exceptions will be wrapped with RubixException: 422
Configuration example
1{
2 "name": "<ACCOUNTID>.order.CreateReturnOrderFromOrder",
3 "props": {}
4}
Language: json
Detailed Technical Description
Settings
Setting Name | User Type | Setting Type | Value |
DEFAULT_TAX_TYPE | RETAILER or ACCOUNT | JSON | Example: |
DEFAULT_RETURN_DESTINATION_LOCATION | RETAILER or ACCOUNT | STRING | Example: |
Version History
v1.0.0
refers to plugin