How to Get Salable Quantity Information After Product is Saved in Magento 2

Please note that you need to enable Magento MSI if you have used the method to disable Magento MSI.
Also, do share the post with Magento Community via social media.
Never miss Magento tips, tricks, tutorials, and news.
I’d be happy to help.

Method to Get Salable Quantity Information After Product is Saved in Magento 2

  1. Create Registration.php file at app/code/Vendor/Module/
  2. Create module.xml file at app/code/Vendor/Module/etc
  3. Create di.xml file at app/code/Vendor/Module/etc/
  4. Create GetSalableQuantityAfterProductSave.php file at app/code/Vendor/Module/Helper/ and use the below code:

Use the above code and get the salable quantity after product is saved in Magento 2.
In such a scenario, use the below code and perform further operations based on the detail of salable quantity information after a product is saved.
Something went wrong.
Salable quantity is the sum of all available items that allows you to handle all of your warehouses and get changed when the order is placed or the physical quantity in the warehouse changes.
Thank you for subscribing.
Any doubts in the above method can be mentioned in the Comments section below.
The concept of salable quantity is introduced with the release of Magento 2.3.3 with the multi-source inventory system.

Get Weekly Updates

For instance, you want to keep track of the changes in the salable quantity in the Magento 2 inventory report when product quantity gets changed from the product page.

Thank you.
You might have noticed the ‘salable quantity’ column in the product grid. However, what if you want to programmatically get salable quantity information after product is saved in Magento 2 to maintain the well-structured inventory grid?




(based on 0 Reviews)