- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createAndCompleteReturnOrderWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createAndCompleteReturnOrderWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates and completes a return from the storefront. The admin would receive the return and process it from the dashboard. This workflow is used by the Create Return Store API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to create a return for an order in your custom flow.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
CreateOrderReturnWorkflowInput
CreateOrderReturnWorkflowInput
CreateOrderReturnWorkflowInput
CreateOrderReturnWorkflowInputorder_id
stringThe ID of the order to return items from.
order_id
stringitems
CreateReturnItem[]The items to return.
items
CreateReturnItem[]created_by
null | stringOptionalThe ID of the customer that's creating the return
created_by
null | stringOptionalreturn_shipping
objectOptionalThe shipping details of the returned items.
return_shipping
objectOptionalnote
null | stringOptionalMore details about the return.
note
null | stringOptionalreceive_now
booleanOptionalWhether to mark the return as received immediately.
receive_now
booleanOptionalrefund_amount
numberOptionalThe amount to refund the customer.
refund_amount
numberOptionallocation_id
null | stringOptionalThe ID of the location to return the items to.
If not provided, the return shipping option's location
is used.
location_id
null | stringOptionalWas this page helpful?