- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
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 CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
BatchInventoryItemLevelsWorkflowInput
BatchInventoryItemLevelsWorkflowInputThe data to manage the inventory levels in bulk.
BatchInventoryItemLevelsWorkflowInput
BatchInventoryItemLevelsWorkflowInputforce
booleanOptionalIf 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.
force
booleanOptionalThe inventory levels to create.
The inventory levels to update.
delete
string[]OptionalThe IDs of inventory levels to delete.
delete
string[]OptionalOutput#
BatchInventoryItemLevelsWorkflowOutput
BatchInventoryItemLevelsWorkflowOutputThe result of managing inventory levels in bulk.
BatchInventoryItemLevelsWorkflowOutput
BatchInventoryItemLevelsWorkflowOutputcreated
InventoryLevelDTO[]The inventory levels that were created.
created
InventoryLevelDTO[]updated
InventoryLevelDTO[]The inventory levels that were updated.
updated
InventoryLevelDTO[]deleted
string[]The IDs of the inventory levels that were deleted.
deleted
string[]Was this page helpful?