createOrderClaimsStep - Medusa Core Workflows Reference

This documentation provides a reference to the createOrderClaimsStep. It belongs to the @medusajs/medusa/core-flows package.

This step creates one or more order claims.

src/workflows/my-workflow.ts
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { createOrderClaimsStep } from "@medusajs/medusa/core-flows"3
4const myWorkflow = createWorkflow(5  "my-workflow",6  () => {7    const data = createOrderClaimsStep([{8      "order_id": "order_123",9      "type": "replace"10    }])11  }12)

Input#

CreateOrderClaimDTO[]CreateOrderClaimDTO[]
order_idstring
The associated order's ID.
The type of the claim.
return_idstringOptional
The associated return's ID.
claim_idstringOptional
The associated claim's ID.
exchange_idstringOptional
The associated exchange's ID.
descriptionstringOptional
The description of the action.
internal_notestringOptional
The internal note of the action.
referencestringOptional
The name of the data model the action references. For example, return.
reference_idstringOptional
The ID of the record of the data model specified in reference. For example, if reference is return, the value is return_123.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
claim_itemsBaseOrderBundledItemActionsDTO & object[]Optional
The items of the claim.
additional_itemsBaseOrderBundledItemActionsDTO[]Optional
The items to be sent to the customer in replacement, if the claim's type is replace.
shipping_methodsstring[] | Omit<CreateOrderShippingMethodDTO, "order_id">[]Optional
The shipping methods used to send the additional items to the customer, if the claim's type is replace.
return_shippingstring | Omit<CreateOrderShippingMethodDTO, "order_id">Optional
The shipping methods used to send the items to be returned from the customer, if the claim's type is replace.
refund_amountBigNumberInputOptional
The amount to be refunded.
no_notificationbooleanOptional
Whether the customer should receive notifications related to updates on the claim.
created_bynull | stringOptional
The id of the user that creates the order claim

Output#

OrderClaimDTO[]OrderClaimDTO[]
idstring
The claim's ID.
The claim's type.
order_idstring
The ID of the associated order.
order_versionnumber
The version of the order when the claim is applied.
display_idnumber
The claim's display ID.
claim_itemsany[]
The items to be received from the customer.
additional_itemsany[]
The items to be sent to the customer if the claim's type is replace.
metadatanull | Record<string, unknown>
Holds custom data in key-value pairs.
orderOrderDTOOptional
The associated order.
returnReturnDTOOptional
The associated return, if the claim's type is replace.
return_idstringOptional
The ID of the associated return, if the claim's type is replace.
no_notificationbooleanOptional
Whether the customer should receive notifications related to updates on the claim.
refund_amountBigNumberValueOptional
The refund amount of the claim.
raw_refund_amountBigNumberValueOptional
The raw refund amount of the claim.
created_bynull | stringOptional
The id of the user that created the order claim
shipping_methodsOrderShippingMethodDTO[]Optional
The shipping methods used to send the additional items.
transactionsOrderTransactionDTO[]Optional
The claim's transactions if additional payment is required.
created_atstring | DateOptional
The creation date of the claim.
updated_atstring | DateOptional
The update date of the claim.
deleted_atstring | DateOptional
The deletion date of the claim.
canceled_atstring | DateOptional
The cancelation date of the claim.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break