orderFulfillmentDeliverablilityValidationStep - Medusa Core Workflows Reference

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

This step validates that the order fulfillment can be delivered. If the order is cancelled, the items to mark as delivered don't exist in the order, or the fulfillment doesn't exist in the order, the step will throw an error.

NoteYou can retrieve an order and fulfillment's details using Query, or useQueryGraphStep.

Example#

Code
1const data = orderFulfillmentDeliverablilityValidationStep({2  order: {3    id: "order_123",4    fulfillments: [5      {6        id: "ful_123",7        // other fulfillment details...8      }9    ]10    // other order details...11  },12  fulfillment: {13    id: "ful_123",14    // other fulfillment details...15  }16})

Input#

orderOrderDTO & object
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.
fulfillmentsFulfillmentDTO[]
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.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
canceled_atstring | DateOptional
When the order was canceled.
fulfillmentFulfillmentDTO
The fulfillment details.
idstring
The ID of the fulfillment.
location_idstring
The associated location's ID.
packed_atnull | Date
The date the fulfillment was packed.
shipped_atnull | Date
The date the fulfillment was shipped.
delivered_atnull | Date
The date the fulfillment was delivered.
canceled_atnull | Date
The date the fulfillment was canceled.
datanull | Record<string, unknown>
The data necessary for the fulfillment provider to process the fulfillment.
provider_idstring
The associated fulfillment provider's ID.
shipping_option_idnull | string
The associated shipping option's ID.
metadatanull | Record<string, unknown>
Holds custom data in key-value pairs.
shipping_optionnull | ShippingOptionDTO
The associated shipping option.
requires_shippingboolean
Flag to indidcate whether shipping is required
The associated fulfillment provider.
delivery_addressFulfillmentAddressDTO
The associated fulfillment address used for delivery.
The items of the fulfillment.
The labels of the fulfillment.
created_atDate
The creation date of the fulfillment.
updated_atDate
The update date of the fulfillment.
deleted_atnull | Date
The deletion date of the fulfillment.
marked_shipped_bynull | stringOptional
The id of the user that marked fulfillment as shipped
created_bynull | stringOptional
The id of the user that created the fulfillment
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