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.
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[]
CreateOrderClaimDTO[]
CreateOrderClaimDTO[]order_id
stringThe associated order's ID.
order_id
stringtype
OrderClaimTypeThe type of the claim.
type
OrderClaimTypereturn_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
stringOptionaldescription
stringOptionalThe description of the action.
description
stringOptionalinternal_note
stringOptionalThe internal note of the action.
internal_note
stringOptionalreference
stringOptionalThe name of the data model the action
references. For example, return
.
reference
stringOptionalreturn
.reference_id
stringOptionalThe ID of the record of the data model
specified in reference.
For example, if reference
is return
, the
value is return_123
.
reference_id
stringOptionalreference
is return
, the
value is return_123
.metadata
null | Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
null | Record<string, unknown>OptionalThe items of the claim.
The items to be sent to the customer in replacement, if the
claim's type is replace
.
replace
.The shipping methods used to send the additional items to the customer,
if the claim's type is replace
.
replace
.The shipping methods used to send the items to be returned from the customer,
if the claim's type is replace
.
replace
.The amount to be refunded.
no_notification
booleanOptionalWhether the customer should receive notifications related to updates
on the claim.
no_notification
booleanOptionalcreated_by
null | stringOptionalThe id of the user that creates the order claim
created_by
null | stringOptionalOutput#
OrderClaimDTO[]
OrderClaimDTO[]
OrderClaimDTO[]
OrderClaimDTO[]id
stringThe claim's ID.
id
stringtype
OrderClaimTypeThe claim's type.
type
OrderClaimTypeorder_id
stringThe ID of the associated order.
order_id
stringorder_version
numberThe version of the order when the claim is applied.
order_version
numberdisplay_id
numberThe claim's display ID.
display_id
numberclaim_items
any[]The items to be received from the customer.
claim_items
any[]additional_items
any[]The items to be sent to the customer
if the claim's type is replace
.
additional_items
any[]replace
.metadata
null | Record<string, unknown>Holds custom data in key-value pairs.
metadata
null | Record<string, unknown>The associated order.
The associated return, if the claim's type is replace
.
replace
.return_id
stringOptionalThe ID of the associated return, if the claim's type is replace
.
return_id
stringOptionalreplace
.no_notification
booleanOptionalWhether the customer should receive notifications related
to updates on the claim.
no_notification
booleanOptionalThe refund amount of the claim.
The raw refund amount of the claim.
created_by
null | stringOptionalThe id of the user that created the order claim
created_by
null | stringOptionalThe shipping methods used to send the additional items.
The claim's transactions if additional payment is required.
created_at
string | DateOptionalThe creation date of the claim.
created_at
string | DateOptionalupdated_at
string | DateOptionalThe update date of the claim.
updated_at
string | DateOptionaldeleted_at
string | DateOptionalThe deletion date of the claim.
deleted_at
string | DateOptionalcanceled_at
string | DateOptionalThe cancelation date of the claim.
canceled_at
string | DateOptionalWas this page helpful?