batchInventoryItemLevelsWorkflow - Medusa Core Workflows Reference

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

This workflow creates, updates and deletes inventory levels in bulk.

You can use this workflow within your own customizations or custom workflows, allowing you to manage inventory levels in your custom flows.

Source Code

Examples#

Steps#

Input#

BatchInventoryItemLevelsWorkflowInputBatchInventoryItemLevelsWorkflowInput
The data to manage the inventory levels in bulk.
forcebooleanOptional
If true, the workflow will force the deletion of the inventory levels, even if they have a non-zero stocked quantity. If false, the workflow will not delete the inventory levels if they have a non-zero stocked quantity. Inventory levels that have reserved or incoming items at the location will not be deleted even if the force flag is set to true.
The inventory levels to create.
The inventory levels to update.
deletestring[]Optional
The IDs of inventory levels to delete.

Output#

BatchInventoryItemLevelsWorkflowOutputBatchInventoryItemLevelsWorkflowOutput
The result of managing inventory levels in bulk.
The inventory levels that were created.
The inventory levels that were updated.
deletedstring[]
The IDs of the inventory levels that were deleted.
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