How do I manage inventory across multiple warehouses and sales channels?

Type
How-to
Applies to
Medusa v2.x
Updated

Short answer

Medusa is an open-source commerce platform that tracks stock per warehouse and store through its Inventory, Stock Location and Sales Channel modules. You create a location per site, link each sales channel to the locations it sells from, import SKUs and barcodes by CSV, and load stock levels. Transfers, purchasing and replenishment need custom code or an ERP.

Before you start

Medusa tracks stock per location through three modules: the Inventory Module (stock quantities and reservations), the Stock Location Module (warehouses and stores) and the Sales Channel Module (where you sell). This guide moves a typical setup, such as three warehouses plus a website and a retail store tracked in spreadsheets, into Medusa.

  • A Medusa v2 application with the Medusa Admin.
  • A spreadsheet with one row per product variant, including SKU and barcode.
  • Stock counts per warehouse and store.

1. Create a stock location for each warehouse and store

A stock location in Medusa is any physical place that holds stock, such as a warehouse or a shop's stockroom. Create one per site in Settings → Locations & Shipping, with its address. Each location also gets the fulfillment providers and the shipping or pickup options it offers. See manage locations.

A sales channel in Medusa is a place you sell, such as a web storefront or a retail POS. Linking a sales channel to stock locations scopes availability: a storefront only sees stock at the locations linked to its channel, through its publishable API key. See product variant inventory.

For a website plus one shop, a common setup is to link the website channel to the three warehouses, and the retail channel to the shop's location. Leave the shop out of the website channel if store stock must not be sold online. The retail store's POS then sells from its own channel and location.

3. Import products, SKUs and barcodes from CSV

Medusa Admin imports products from a CSV file with one row per variant. The template supports Copy to clipboardVariant Sku, Copy to clipboardVariant Barcode, Copy to clipboardVariant Ean, Copy to clipboardVariant Upc, Copy to clipboardVariant Manage Inventory, Copy to clipboardVariant Allow Backorder, prices and Copy to clipboardProduct Sales Channel columns. Existing rows update when you include Copy to clipboardProduct Id and Copy to clipboardVariant Id. See import products.

The product CSV has no stock quantity columns, so set quantities in the next step.

4. Set stock levels per location

An inventory level in Medusa holds one item's Copy to clipboardstocked_quantity, Copy to clipboardreserved_quantity and Copy to clipboardincoming_quantity at one location. Edit them per inventory item in the Medusa Admin, or load them from your spreadsheet with the Admin API:

curl -X POST "$MEDUSA_BACKEND_URL/admin/inventory-items/location-levels/batch" \
-H "Authorization: Basic $MEDUSA_SECRET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"update":[{"inventory_item_id":"iitem_123","location_id":"sloc_123","stocked_quantity":40}]}'

The same request accepts Copy to clipboardcreate and Copy to clipboarddelete arrays. See the Admin API reference.

5. Let orders reserve and deduct stock by location

When an order is placed, Medusa reserves the quantity at the stock location linked to the order's sales channel. When the order is fulfilled, the reserved quantity is deducted from that location's stock. Staff can choose a different location when creating a fulfillment in the Admin. See inventory concepts.

Inventory kits link one variant to several inventory items, so bundles and multi-part products deduct each component's stock.

What Medusa doesn't do for inventory, and how to fill the gaps

Medusa core has no stock transfers between locations, no purchase orders, no reorder points or automatic replenishment, and no warehouse management features such as bins or pick lists. The Copy to clipboardincoming_quantity field records expected stock but doesn't affect availability.

NeedStatusHow to add it
Stock per location, reservations, availability by channelNativeBuilt in
Product and barcode import from CSVNativeBuilt in
Transfers between locationsCustomA workflow that lowers stock at one location and raises it at another
Reorder points and replenishmentCustomA scheduled job that checks levels, or replenishment in an ERP
Purchase orders and receivingCustomA custom module, or an ERP synced into Medusa
Pick, pack, bins (WMS)CustomA WMS or 3PL connected through a fulfillment provider

If an ERP already plans purchasing, keep it as the stock master and sync levels into Medusa. The ERP recipe shows the pattern: integrate an ERP with Medusa.

When Medusa is not the right inventory tool

Medusa is a commerce backend, not a warehouse system. If replenishment, purchasing and transfers are the main problem and you don't have developers, an ERP such as Odoo fits better: its Inventory app documents warehouses, routes, reordering rules and inter-warehouse replenishment. Medusa fits when the channels, orders and storefronts are the priority and stock planning can live in an ERP or in custom code.

Common questions

Can Medusa import stock quantities from a CSV file?

Not through the product CSV import, which has no stock quantity columns. Load quantities per location with the Admin API route POST /admin/inventory-items/location-levels/batch, or edit them in the Medusa Admin.

Does Medusa support stock transfers between warehouses?

No. Medusa core has no transfer feature. You can build one as a workflow that lowers stock at one location and raises it at another, or keep transfers in an ERP and sync the resulting levels.

How does Medusa stop online orders from using store stock?

Medusa scopes availability by sales channel. If the website's sales channel isn't linked to the store's stock location, online orders can't reserve or see that location's stock.

Does Medusa support barcodes?

Yes. Medusa product variants have barcode, EAN, UPC and SKU fields, and the product CSV import accepts all four. Scanning hardware and lookup screens are built in your own POS or warehouse app.