AI Reports

Guides › Database reference › Categories and stock

Magento 2 inventory_source_item table

Multi-Source Inventory: the quantity and stock status of each SKU in each source (warehouse or shop).

Key columns

ColumnWhat it means
source_codeThe source, linking to inventory_source.source_code. The built-in one is default.
skuThe product's SKU. MSI links by SKU, not by product ID.
quantityQuantity at that source.
status1 = in stock, 0 = out of stock at that source.

Good to know

Example: SKUs and total quantity per source

Works on Magento Open Source and Adobe Commerce.

SELECT source_code, COUNT(*) AS skus, SUM(quantity) AS quantity, SUM(status = 0) AS out_of_stock
FROM inventory_source_item
GROUP BY source_code
ORDER BY source_code;

Tested on Magento Open Source and Adobe Commerce 2.4.8. Read-only. If your tables have a prefix, add it to each table name.

This table has the same 5 columns on Magento Open Source and Adobe Commerce.

Foreign keys

All 5 columns (Magento Open Source)

Show all columns
ColumnTypeCan be emptyMagento's description
source_item_idint(10) unsigned
source_codevarchar(255)
skuvarchar(64)
quantitydecimal(12,4)
statussmallint(5) unsigned

Related tables

Gaurav Harsh

Gaurav Harsh is a Magento developer who works on large Adobe Commerce stores and builds AI Reports, a Magento extension for asking your store's data questions in plain English. LinkedIn