- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
beginOrderEditOrderWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the beginOrderEditOrderWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates an order edit request. It' used by the Create Order Edit Admin API Route.
To request the order edit, use the requestOrderEditRequestWorkflow. The order edit is then only applied after the order edit is confirmed using the confirmOrderEditRequestWorkflow.
You can use this workflow within your customizations or your own custom workflows, allowing you to create an order edit for an order in your custom flows.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
BeginorderEditWorkflowInput
BeginorderEditWorkflowInput
BeginorderEditWorkflowInput
BeginorderEditWorkflowInputorder_id
stringThe ID of the order to request an edit for.
order_id
stringcreated_by
stringOptionalThe ID of the user requesting the order edit.
created_by
stringOptionalinternal_note
stringOptionalA note viewed by admins only related to the order edit.
internal_note
stringOptionaldescription
stringOptionalDescribes the reason for the order edit.
description
stringOptionalmetadata
null | Record<string, unknown>OptionalCustom key-value pairs of data to store in the order edit.
metadata
null | Record<string, unknown>OptionalOutput#
OrderChangeDTO
OrderChangeDTOThe order change details.
OrderChangeDTO
OrderChangeDTOid
stringThe ID of the order change
id
stringversion
numberThe version of the order change
version
numberorder_id
stringThe ID of the associated order
order_id
stringreturn_id
stringThe ID of the associated return order
return_id
stringexchange_id
stringThe ID of the associated exchange order
exchange_id
stringclaim_id
stringThe ID of the associated claim order
claim_id
stringThe associated order
The associated return order
The associated exchange order
The associated claim order
The actions of the order change
status
OrderChangeStatusThe status of the order change
status
OrderChangeStatusrequested_by
null | stringThe requested by of the order change
requested_by
null | stringrequested_at
null | string | DateWhen the order change was requested
requested_at
null | string | Dateconfirmed_by
null | stringThe confirmed by of the order change
confirmed_by
null | stringconfirmed_at
null | string | DateWhen the order change was confirmed
confirmed_at
null | string | Datedeclined_by
null | stringThe declined by of the order change
declined_by
null | stringdeclined_reason
null | stringThe declined reason of the order change
declined_reason
null | stringmetadata
null | Record<string, unknown>The metadata of the order change
metadata
null | Record<string, unknown>declined_at
null | string | DateWhen the order change was declined
declined_at
null | string | Datecanceled_by
null | stringThe canceled by of the order change
canceled_by
null | stringcanceled_at
null | string | DateWhen the order change was canceled
canceled_at
null | string | Datecreated_at
string | DateWhen the order change was created
created_at
string | Dateupdated_at
string | DateWhen the order change was updated
updated_at
string | Datechange_type
"return" | "exchange" | "claim" | "edit" | "transfer"OptionalThe type of the order change
change_type
"return" | "exchange" | "claim" | "edit" | "transfer"OptionalWas this page helpful?