It’s very hard to get saleable qty when you enabled MSI in Magento and you have more than 1 source of inventory.
the below code will helpful for fetch qty from Source of inventoy.
$product_sku = 'SIMBEEZ00001'; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface'); $stockResolver = $objectManager->get('\Magento\InventorySalesApi\Api\StockResolverInterface'); $productSalable = $objectManager->get('\Magento\InventorySalesApi\Api\GetProductSalableQtyInterface'); $stockId = $stockResolver->execute(\Magento\InventorySalesApi\Api\Data\SalesChannelInterface::TYPE_WEBSITE, $storeManager->getWebsite()->getCode())->getStockId(); $stockQty = $productSalable->execute($product_sku, $stockId); echo $stockQty;