orderClaimItemValidationStep - Medusa Core Workflows Reference

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

This step validates that claim items can be added to a claim. If the order or claim is canceled, or the order change is not active, the step will throw an error.

Note: You can retrieve an order, order claim, and order change details using Query, or useQueryGraphStep.

Example#

Code
1const data = orderClaimItemValidationStep({2  order: {3    id: "order_123",4    // other order details...5  },6  orderChange: {7    id: "orch_123",8    // other order change details...9  },10  orderClaim: {11    id: "claim_123",12    // other order claim details...13  }14})

Input#

The order details.
idstring
The ID of the order.
versionnumber
The version of the order.
display_idnumber
The order's display ID.
The status of the order.
currency_codestring
The currency of the order
created_atstring | Date
When the order was created.
updated_atstring | Date
When the order was updated.
original_item_totalBigNumberValue
The original item total of the order.
original_item_subtotalBigNumberValue
The original item subtotal of the order.
original_item_tax_totalBigNumberValue
The original item tax total of the order.
item_totalBigNumberValue
The item total of the order.
item_subtotalBigNumberValue
The item subtotal of the order.
item_tax_totalBigNumberValue
The item tax total of the order.
original_totalBigNumberValue
The original total of the order.
original_subtotalBigNumberValue
The original subtotal of the order.
original_tax_totalBigNumberValue
The original tax total of the order.
The total of the order.
The subtotal of the order. (Excluding taxes)
The tax total of the order.
discount_subtotalBigNumberValue
The discount subtotal of the order.
discount_totalBigNumberValue
The discount total of the order.
discount_tax_totalBigNumberValue
The discount tax total of the order.
gift_card_totalBigNumberValue
The gift card total of the order.
gift_card_tax_totalBigNumberValue
The gift card tax total of the order.
shipping_totalBigNumberValue
The shipping total of the order.
shipping_subtotalBigNumberValue
The shipping subtotal of the order.
shipping_tax_totalBigNumberValue
The shipping tax total of the order.
original_shipping_totalBigNumberValue
The original shipping total of the order.
original_shipping_subtotalBigNumberValue
The original shipping subtotal of the order.
original_shipping_tax_totalBigNumberValue
The original shipping tax total of the order.
order_changeOrderChangeDTOOptional
The active order change, if any.
region_idstringOptional
The ID of the region the order belongs to.
customer_idstringOptional
The ID of the customer on the order.
sales_channel_idstringOptional
The ID of the sales channel the order belongs to.
emailstringOptional
The email of the order.
shipping_addressOrderAddressDTOOptional
The associated shipping address.
billing_addressOrderAddressDTOOptional
The associated billing address.
itemsOrderLineItemDTO[]Optional
The associated order details / line items.
shipping_methodsOrderShippingMethodDTO[]Optional
The associated shipping methods
transactionsOrderTransactionDTO[]Optional
The tramsactions associated with the order
credit_linesOrderCreditLineDTO[]Optional
The credit lines for an order
summaryOrderSummaryDTOOptional
The summary of the order totals.
is_draft_orderbooleanOptional
Whether the order is a draft order.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
canceled_atstring | DateOptional
When the order was canceled.
orderClaimOrderClaimDTO
The claim details.
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.
orderChangeOrderChangeDTO
The order change details.
idstring
The ID of the order change
versionnumber
The version of the order change
order_idstring
The ID of the associated order
return_idstring
The ID of the associated return order
exchange_idstring
The ID of the associated exchange order
claim_idstring
The ID of the associated claim order
The associated order
return_orderReturnDTO
The associated return order
The associated exchange order
The associated claim order
The actions of the order change
The status of the order change
requested_bynull | string
The requested by of the order change
requested_atnull | string | Date
When the order change was requested
confirmed_bynull | string
The confirmed by of the order change
confirmed_atnull | string | Date
When the order change was confirmed
declined_bynull | string
The declined by of the order change
declined_reasonnull | string
The declined reason of the order change
metadatanull | Record<string, unknown>
The metadata of the order change
declined_atnull | string | Date
When the order change was declined
canceled_bynull | string
The canceled by of the order change
canceled_atnull | string | Date
When the order change was canceled
created_atstring | Date
When the order change was created
updated_atstring | Date
When the order change was updated
change_type"return" | "exchange" | "claim" | "edit" | "transfer"Optional
The type of the order change
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