Stock balance calculation
This section describes stock balance calculation and how to change the implementation to fetch information from a third-party system.
The stock balance is calculated from the inventory in Litium. Each variant can have an inventory item in each inventory.
The inventory item contains information about the specific variant, for example, in-stock quantity, unit of measurement, inventory date, and time.
Unit of measurement defines the quantity of the inventory item, for example:
- 1 piece
- 10 pieces
- 100 pieces
Note: Litium will only handle one unit of measurement for each variant.
Stock balance calculator
The stock balance calculator is responsible for calculating and returning the currently available stock balance. The stock balance calculator is used from all places where the stock balance is needed.
Custom stock balance calculator
To implement a custom stock balance calculator you need to implement Litium.Products.StockStatusCalculator.IStockStatusCalculator.
Stock status message service
Stock status message service is responsible for filling the StockStatusCalculatorResult.Description with messages for the stock status, for example in stock or out of stock.
Custom stock status massages
To implement a custom stock status message service you need to implement Litium.Products.StockStatusCalculator.IStockStatusMessageService.