Stock information in IOM (Intershop Order Management) is used to check for the articles' availability and to create or refuse reservations in order to avoid overbooking. The stock visibility for each shop is driven by a list of configuration options which are discussed here. The target audience is consultants and developers.
Term | Description |
---|---|
IOM-ATP | Free product quantity that can be reserved (see Reference - IOM REST API - Inventory Service 2.0) |
Supplier stock amounts are imported per shop (see product import). The whole supplier product quantities can hence be split into different shops using separate imports.
A stock in IOM must be understood as a quantity assigned to a shop. Stock items are defined by the attributes supplier, shop, product, and quantity.
It is distinguished between the offering shop(s) to which the stock is imported, and the requesting shop consuming (e.g. reserving) the stock.
An active mapping between the requesting shop and the supplier (Shop2SupplierDO.active) must be defined.
When searching through a stock for a given product, there is a path lookup using the shop tree structure (ShopDO.parentRef).
The lowest available stock assignments are always consumed first.
Before IOM 4.6.0, the lookup did stop at the first found stock definition for the given product, even if the stock or IOM-ATP had a quantity of 0.
From IOM 4.6.0, the lookup can continue uptree as long as there is no Shop2SupplierDO with the (new) attribute allowParentStock=false
.
The new attribute allows to keep the previous behavior available. Its default is set to false ensuring a nonbreaking change in IOM 4.6.0.
That new possibility to see more than one stock assignment allows to define reserved quantities for shops.
Example
Shop AA creates a reservation with a quantity of 15, which requires 5 items of shop A and 10 of shop X.
Next, shop B has an availability of 1190 (200+1000-10).
If the Shop2SupplierDO at shop A had the attribute allowParentStock set to false
, the shop AA would only have an availability of 5, and the reservation could not be created.
This example is for one product and one supplier. It is possible to have the same product available from different suppliers, in which case a shop can see a list of availabilities (one per supplier)
but cannot combine them into a single reservation (beware of the warning in the detailed rules below).
The performance of the inventory service is often a sensitive aspect in IOM installations. Using hierarchical stocks requires a complex calculation to determine the product availability.
The response times of the inventory service are expected to be between 30% and 100% slower when using hierarchies.
The shop-side APIs (inventory and reservation services) use the shop article names. A first internal lookup is performed to map these names to the IOM internal article reference.
This mapping is done using the article fact data ("A"-file article import) or the name mapping ("N"-file article import). It is sufficient to import these fact data in any parent of the requesting shop. This first lookup is not restricted by the attribute allowParentStock.
When working with one fact data import in a top shop and different stock imports in some descendants, the fact file must be imported prior to the stock imports (batches of files are imported in their alphabetical orders).
One article can have different names, even within the same shop.
The stock information is not mapped to these shop article names but only to the internal article reference. Two aliases for a given product will hence have exactly the same stock visibility.
This configuration entity has two functions. Define the imports and allow the requesting shop to see the corresponding stocks. An active Shop2SupplierDO between the requesting shop(s) and the supplier(s) is required.
This attribute is only considered when a stock item (shop-supplier-product) for the given product is met. As this attribute is part of a Shop2SupplierDO for a given product, it can be different for each combination.
In this example, shop AA sees a stock quantity of 5 for product P1 and of 70 for P2.
For a given product offered by more than one supplier, the stock and availabilities are fully independent.
Shop AA sees a stock quantity of 210 for product Pr1.
Only the quantity of 100 from supplier S1 in shop X is hidden by the flag allowParentStock = false
in ShopA-Supplier1.
The shop can reserve at max 200 items as it is not possible to mix suppliers for a given product in one reservation.
Warning: API Break
Compared to the version before IOM 4.6, this can be seen as an API break: Until IOM 4.5, stocks from different suppliers were only visible when the stocks for a given product were in the same offering shop.
This separate lookup per supplier is only used when the hierarchical stocks feature is used, i.e. when there is any Shop2SupplierDO with the flag allowParentStock set to true
. Otherwise, the previous more restrictive lookup is still used and the shop AA would only see a quantity of 10.
It is hence possible to switch to this separate lookup for existing IOM installations just by setting the flag to true
, as suggested at shop X in the upper diagram.