How Does Salable Quantity Work in Magento 2?
Salable Quantity vs Product Quantity
Since Magneto version 2.3 a new value has been introduced that represents a stock level that sits between a physical stock count and a the virtual stock level of a product.
This new virtual stock level value is called Salable Quantity. It represents the stock level of a product that has been sold (and paid for) but has not yet shipped. Salable qty even has its own column on the back-end product grid:
Default stock and salable quantity are terms from Magento’s Multi Source Inventory(MSI). This article aims to highlight the differences between the two and what factors affect them.
Magento’s Multi Source Inventory(MSI)
Default stock is represented by Quantity, the physical stock available. With Magento MSI, it’s possible to link multiple inventory sources to one or multiple websites. The amount in which a product is available, is calculated based on the sources made available for that website. Grouping multiple sources and defining the relation between sources and web stores is done with a new concept: “stocks”. Sources are physical locations, and any location with available stock. This figure should only change in 2 circumstances. First if you are adding more stock to the to the product or second if a shipments being created. Not when an order is placed as with earlier versions of Magento.
Quantity Per Source
Quantity per source represents the physical stock at a location. We do not want to change this figure until a shipment has been created. Not when an order is placed, which is the case in previous versions of Magento. Meanwhile, the Salable Quantity is the sum of available resources, grouped in stocks.
Magento MSI uses the Source Selection Algorithm to do the work for you from tracking inventory saleable quantities across all sources. Whenever you change a salable quantity when a new order is placed and paid, the algorithm will run the following.
- Calculates the saleable quantity of all assigned sources per stock.
- Subtracts the Out-of-Stock Threshold amount from salable quantity.
- Reserves inventory quantities at checkout, deducting from in-stock inventory at order processing and shipment
- Supports back-orders with enhanced options for negative thresholds
Magento Stock Reservation on Check-out
Magento creates a reservation for each product when the following events occur:
- A customer or merchant places an order.
- A customer or merchant fully or partially cancels an order.
- The merchant creates a shipment for a physical product.
- The merchant creates an invoice for a virtual or downloadable product.
- The merchant issues a credit memo.
Fixing False Out-of-stock Messages
When you complete processing an order (Complete, Cancelled, Closed), all reservations in the scope of that order should resolve to 0. This clears all salable quantity holds. If this is not done that reservation with certain stock integration systems you may get false out of stock labels.
I hope this helps explain Salable Quantity and how it works in Magento 2.