The inventory service is a service that supplies information about stock ratios of products and may also manage reservations on those products, i.e. it combines the two aspects:
There are different use cases for inventory. Just to name a few:
Different scenarios may require different functionality, thus it may be necessary to add a different approach than the one implemented in the INTERSHOP platform's standard.
The diagram above shows a strongly simplified order process. There is a quantity request twice and the reservation part and finally the "order acceptance". While the "order acceptance" is not a part of the inventory service, the quantity request and the reservation are parts of the inventory service. Not shown is the rejection of a reservation which would be triggered if something in the automated checkout process will eventually result in not being able to actually place the order.
Terms that are not inventory-specific, but part of the Managed Service Framework, are described here. It is a good idea to read this documentanyway.
This glossary describes the terms used in this document:
Term | Description |
---|---|
Availability | The availability reflects if a product is generally available (which means it can be bought) |
Stock | The actual availability (amount of available pieces) of a product |
Inventory | A system that controls/manages product stocks, i.e. it reflects the actual quantities, back-order information and reservation capabilities |
Severity | Denotes quality-of-service for a request, i.e. the desired precision of the availability information. |
Reservation | A reservation locks a product in a stock, so that no other client of the stock is able to get the reserved pieces. |
Rejection | A reservation can be rejected. That means the locked products in the inventory are unlocked and thus available for other clients to be reserved |
Place an order | In contrast to a reservation a "placed order" may not be rejected. A "placed order" means the inventory may start processes to actually deliver the order to a customer. The only way to stop the delivery of the order would be a cancellation, but that process is out of focus here. |
Please also have a look at related questions in the cookbooks ( Cookbook - Inventory and Cookbook - Inventory (valid to 7.1) ).
As can be seen in the Simplified Order Process, there can be multiple quantity requests during the same order process. That's why it is possible to configure the request for speed or accuracy with the Inventory Request Severity. There are two possible values for this configuration:
The Inventory Request Severity is configured for the whole channel. It acts as a hint for the inventory service adapter and could be ignored, so that both Exact and Fast behave the same way.
This is the actual information about the quantity available for a product. If the product is not in stock, the stock amount is zero. Otherwise either the actual amount is given or a negative number (usually -1) indicating that there is an unspecified number of this product available (or the stock is not known at all for some reasons).
It is recommended that -1
be returned if there is an unspecified number of products available, but any negative value is permitted. There are some additional boolean values in the inventory status result that reflect the availability. It is preferred to use these to check for the availability.
An additional indicator organized as a traffic light:
It is up to the concrete inventory service adapter to determine the threshold at which the stock amount is considered sufficient.
Indicates if the product has to be back-ordered in case of an order.
Indicates the date at which the delivery is expected to start if the product is ordered at the current time. The inventory service adapter is not required to supply this information.
Booking a group of products locks the requested amounts, so that the requested stock is not available for other consumers. After booking is requested, the following information will be given by the inventory service:
It is possible to reject a specified quantity for given products. The rejection is done for quantity of products and is not explicitly related to a previous reservation. It is possible to reject only a part of a previous reservation.
A built-in "adapter" that does not require any external call, but only checks the availability flag of a product. Thus, it is neither able to provide quantity information nor does it support any reservation capabilities. Since the result values of the inventory service show quantity values, this "simple" implementation must provide any quantity. A simple rule defines the quantity which will be delivered:
isAvailable() | Quantity value |
---|---|
true |
|
false |
|
Here are some of the places where the inventory service is used in the Intershop reference application.
The inventory service is used to determine if the product is in stock.
The inventory service is used to adjust the product quantities in the cart according to the currently available stock.
The inventory service is used to adjust the product quantities that can be ordered according to the currently available stock.