confirmInventoryStep - Medusa Core Workflows Reference

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

This step validates that items in the cart have sufficient inventory quantity. If an item doesn't have sufficient inventory, an error is thrown.

Example#

Code
1confirmInventoryStep({2  items: [3    {4      inventory_item_id: "iitem_123",5      required_quantity: 1,6      allow_backorder: false,7      quantity: 1,8      location_ids: ["sloc_123"]9    }10  ]11})

Input#

ConfirmVariantInventoryStepInputConfirmVariantInventoryStepInput
The details of the cart items to confirm their inventory availability.
itemsobject[]
The items to confirm inventory for.
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