Showing results for 
Search instead for 
Did you mean: 

How does 'salable quantity' work?

How does 'salable quantity' work?


Using CE 2.3.2

I have products in my inventory with zero 'salable quantity' but that are still showing 'in stock'  and selectable with the dropdown menu on the product pages. Does Magento use 'salable quantity' as the variable by which to define in stock and out of stock products? If so, then why could mine be incorrect? I should add that these products have a 'quantity' of more than zero - i.e. I've sold them, but they haven't shipped yet.


Any help to make things clearer would be appreciated. Thank you.


Re: How does 'salable quantity' work?

Hi @darren_shipp,


Saleable qty is introduced in magento 2.3 with MSI.


Saleable qty is available qty for sell, ordered qty saved in reservation table.


For more info:


I hope it will help you!

Re: How does 'salable quantity' work?

Thanks for that, but if I have a 'salable quantity' of zero on a product, then that means I have zero to sell, so why could my products still be showing 'in stock'? Thanks.

Re: How does 'salable quantity' work?

Try once reindexing


php bin/magento indexer:reindex


Also make sure that you have disabled back order. 

Re: How does 'salable quantity' work?

Hi @darren_shipp 


If you have imported products then you can try below solution as well.



When you import database from your local or different server, the view won’t be there with your SQL dump and hence Magento won’t be able to calculate the salable qty.

As a result, the entire products will get disappeared from the shop front end after a re-index or cache flush.

To solve this issue, you will need to manually create the view in your new database by executing the below SQL.

CREATE ALGORITHM=UNDEFINED DEFINER=`{database_user}`@`localhost` SQL SECURITY INVOKER VIEW `inventory_stock_1` AS SELECT distinct `legacy_stock_status`.`product_id` AS `product_id`, `legacy_stock_status`.`website_id` AS `website_id`, `legacy_stock_status`.`stock_id` AS `stock_id`, `legacy_stock_status`.`qty` AS `quantity`, `legacy_stock_status`.`stock_status` AS `is_salable`, `product`.`sku` AS `sku` FROM ( `cataloginventory_stock_status` `legacy_stock_status` join `catalog_product_entity` `product` on ((`legacy_stock_status`.`product_id` = `product`.`entity_id`)) ) ; 

Note : Replace {database_user} with your actual database user with enough privileges.

Once you executed the query in your database, you may need to flush Magento Cache to update the salable qty in the products grid and on frontend.


I hope it will help you!

Re: How does 'salable quantity' work?

Thank you Vimal, I have reindexed a dozen times, and my back-orders are off.


Is Magento supposed to use 'saleable quantity' or 'quantity' to define when a product is out of stock?


One of my products went out of stock when all of them were shipped, and 'quantity' went to zero, but it seems ridiculous that Magento would use 'quantity' rather than 'salable quantity' to define whether a product is out of stock.

Re: How does 'salable quantity' work?

Thanks Vimal, I do already have the 'inventory_stock_1' table view. But, again that seems to use 'quantity' as the guide to whether 'is_salable' = 1, which seems odd.

Re: How does 'salable quantity' work?

Re: How does 'salable quantity' work?

So salable quantity threw me for a loop... then I played around and found out the if the configuration is set to manage stock then salable quantity is the amount that is available to the buys on the front end.  The key is to finish out the sales/shipping (order) workflow.


Scenario >>

Product qty =1 and saleable qty = 1.  Customer adds product to cart, then completes purchase. The saleable qty will go to 0, but qty is 1.  If configured correctly in the product and store the item will display on the site, but should be marked out of stock and cannot be added to the cart.  If you take the order through shipping process the qty will go to 0 and the salable qty is 0.  To bring the product back in stock you would need to edit the product with the new qty and mark as in stock.

Let me know if you need more info.

Re: How does 'salable quantity' work?

80% of our 7,000 product catalog is out of stock.. we just need to order it in for customers...


So why would I want to not allow them to add it to the basket?


I want them to be able to add it to the basket and order it... but I want accurate stock levels to be shown!


Impossible at the moment with magento!