adjustInventoryLevelsStep - Medusa Core Workflows Reference

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

This step adjusts the stocked quantity of one or more inventory levels. You can pass a positive value in adjustment to add to the stocked quantity, or a negative value to subtract from the stocked quantity.

Example#

Code
1const data = adjustInventoryLevelsStep([2  {3    inventory_item_id: "iitem_123",4    location_id: "sloc_123",5    adjustment: 10,6  }7])

Input#

AdjustInventoryLevelsStepInputAdjustInventoryLevelsStepInput
The data to adjust the inventory levels.
inventory_item_idstring
The ID of the associated inventory level.
location_idstring
The ID of the associated location.
adjustmentBigNumberInput
The quantity to adjust the inventory level by. If positive, the quantity will be added to the stocked quantity. If negative, the quantity will be subtracted from the stocked quantity.

Output#

InventoryLevelDTO[]InventoryLevelDTO[]
InventoryLevelDTOInventoryLevelDTO
The inventory level details.
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