createOrderChangeActionsWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createOrderChangeActionsWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates order change actions. It's used by other order-related workflows, such as requestItemReturnWorkflow to create an order change action based on changes made to the order.
You can use this workflow within your customizations or your own custom workflows, allowing you to wrap custom logic around creating an order change action.
Source CodeExamples#
Input#
CreateOrderChangeActionDTO[]
CreateOrderChangeActionDTO[]
CreateOrderChangeActionDTO[]
CreateOrderChangeActionDTO[]action
ChangeActionTypeThe type of action.
action
ChangeActionTypeorder_change_id
stringOptionalThe associated order change's ID.
order_change_id
stringOptionalorder_id
stringOptionalThe associated order's ID.
order_id
stringOptionalreturn_id
stringOptionalThe associated return's ID.
return_id
stringOptionalclaim_id
stringOptionalThe associated claim's ID.
claim_id
stringOptionalexchange_id
stringOptionalThe associated exchange's ID.
exchange_id
stringOptionalversion
numberOptionalThe version of the order change action.
Once the order change action is confirmed, this
becomes the order's version.
version
numberOptionalreference
stringOptionalThe name of the data model that this action
references. For example, return
.
reference
stringOptionalreturn
.reference_id
stringOptionalThe ID of the record references of the data model
specified in reference.
For example, if reference
is return
, the reference_id
is the ID of the return.
reference_id
stringOptionalreference
is return
, the reference_id
is the ID of the return.internal_note
null | stringOptionalThe internal note of the order change action.
internal_note
null | stringOptionalThe amount of the order change action.
details
Record<string, unknown>OptionalThe details of the order change action.
This could include the returned items or their changed
quantity, based on the type of this action.
details
Record<string, unknown>Optionalapplied
booleanOptionalWhether the action has been applied.
applied
booleanOptionalOutput#
OrderChangeActionDTO[]
OrderChangeActionDTO[]
OrderChangeActionDTO[]
OrderChangeActionDTO[]id
stringThe ID of the order change action
id
stringorder_change_id
null | stringThe ID of the associated order change
order_change_id
null | stringThe associated order change
order_id
null | stringThe ID of the associated order
order_id
null | stringreturn_id
null | stringThe ID of the associated return.
return_id
null | stringclaim_id
null | stringThe ID of the associated claim.
claim_id
null | stringexchange_id
null | stringThe ID of the associated exchange.
exchange_id
null | stringThe associated order
reference
stringThe reference of the order change action
reference
stringreference_id
stringThe ID of the reference
reference_id
stringaction
ChangeActionTypeThe action of the order change action
action
ChangeActionTypedetails
null | Record<string, unknown>The details of the order change action
details
null | Record<string, unknown>internal_note
null | stringThe internal note of the order change action
internal_note
null | stringcreated_at
string | DateWhen the order change action was created
created_at
string | Dateupdated_at
string | DateWhen the order change action was updated
updated_at
string | DateWas this page helpful?