Stock Levels
1 Stock concepts
The definition of stock within Active Ants is 'a quantity of identical SKU having state at a location'. This definition focusses on the smallest unit of stock on which the processes operate.
1.1 Stock Properties
The definition of stock speaks about a quantity of identical SKU. That stock is about a quantity of a given SKU is self-evident, but the definition of identical SKU depends several properties. Note that these stock properties are static, and not subject to change under normal conditions.
Items of SKU are identical if their properties are the same. In other words: it should not make a difference if a single item is swapped for another if all their properties are identical, because for all intents and purposes the items are the same. To determine this sameness, we compare the following stock properties:
- SKU — The unique identification of a product as assigned by the customer
- Lot Number — The lot numbers (or lack thereof) indicate the production batch of the items. Lot numbers can be recalled and must remain separated.
- Expiration date — The expiration date (or lack thereof) play a role in the sell-by date of products
- Quality — The quality of the items which can be
OK,DAMAGEDorTO_SCRAP.
1.2 Stock Status
Stock status is a more dynamic aspect of stock which can change during the time that items remain in the care of Active Ant. Stock Status relate to processes within the warehouses. The following stock separate statuses are defined:
-
Quarantined — Quarantined is a flag used to temporarily exclude stock from all automated processes. There are numerous reasons why stock could be placed in quarantine, all of which are process related, but often exceptional. Quarantined is a separate 'stock status' because stock can have a quarantined inbound stock status.
-
Stock Status — The stock status field indicates at which stage of a certain process stock is at the moment. The following statuses are defined:
OK— Stock is not part of a process and can be used in accordance to the business rules.INBOUND— Stock is currently part of an inbounding process. It may be moved to other locations, but cannot be used for example for shipments until the inbound process has been completed.INBOUND_RECOUNT— Stock is currently part of an inbounding process and undergoing a recount. It may be moved to other locations, but cannot be used for example for shipments until the inbound process has been completed.RECOUNT_REQUESTED— Stock is assigned to be recounted as part of some inventory management process. It cannot be used for anything until it has been recounted.NOL_CHECK— A deviation in quantity has been detected and the stock must be recounted. It cannot be used for anything until it has been checked.BARCODE_NOT_SCANNABLE— Scanning of barcode(s) is not possible probably due to damaged packaging. It cannot be used for anything until it has been corrected.
1.3 Stock Location
There are many locations in the various warehouses of Active Ants and of various types and classes. The location, type and class all play a role in determining the various stock levels. Note that a location does not have to be unique to a stock, it is possible under certain conditions that different stock share the same location.
The following properties of locations are important for stock:
- Location Class — The class is the highest category of location. Each location type belongs to one specific class. Examples are
AUTOSTORE,DAMAGED,INBOUND,TRANSFER, etc. - Location Type — Location types are a subdivision of the classes, each location must have a single type. For example the
AUTOSTOREclass is divided into the following typesAS1,AS2,AS4,AS8andAS12. - Exclude from picking — Each location can be excluded from picking so that the stock at that location will not be used to pick from directly. However the stock remains shippable, but requires moving to a pickable location first.
1.4 Classes of stock levels
Another important concept when dealing with stock are the classes of stock levels. There are three classes of stock level: countable, declared and calculated, each differs in the manner it's determined as explained below.
-
Countable stock class — This is all stock that Active Ants could physically count, in theory at least. It concerns items that are in the physical care of Active Ants and therefore at some warehouse location of Active Ants.
-
Declared stock class — Declared stock is stock that receives a special status because of information provided by the customer. In certain cases this influences behaviour of Active Ants, but sometimes is only used to support the customer.
-
Calculated stock class — This is stock that is calculated by adding or subtracting various types of stock. This class of stock is more opinionated than objective.
2 Stock Levels
The stock levels that are available to customers are listed in this document. Each of these stock levels are provided per SKU and per warehouse through the GET v3/stockLevels and GET v3/stockLevels/{id} endpoint as well as the data warehouse. These levels with their class are the following.
- Physical stock level (counted)
- Quarantined stock level (counted)
- Damaged stock level (counted)
- To scrap stock level (counted)
- Expected stock level (declared)
- Economic stock level (calculated)
- Free stock level (calculated)
- Available stock level (calculated)
- Unavailable stock level (calculated)
Below are some formulas for calculating various stock levels. These formulas use set operators, not arithmetic operators. In other words + and – do not mean plus add and subtract of scalars, but union and subtraction of sets. For example consider the following scenario:
| row | sku | quantity | quarantined | quality |
|---|---|---|---|---|
| 1 | ABC | 15 | false | OK |
| 2 | ABC | 8 | true | DAMAGED |
Assume that the formula for the 'useful stock level' is as follows:
useful = physical – quarantined – damaged
If this formula is read as an arithmetic formula we get the incorrect result of 7:
useful = (15+8) – 8 – 8 = 7
This is because when calculating each individual level we count row 2 double. Instead the result should be 15 which is indeed the result when interpreting the formula as operations on sets:
Useful = {1,2} – {2} – {2} = {1} => 15
Here physical is the set of all rows, quarantined is the set of all rows having quarantined flag set to true and damaged is the set having all rows having quality DAMAGED. Since the sets quarantined and damaged are the same, we only subtract row 2 once from the set of all rows, thus yielding the correct result of 15.
2.1 Physical Stock Level
Physical stock of a SKU is the set of all stock records and can be calculated by a simple summation over all stock records. This summation does not look at the class of the location to which the SKU has been allocated or the state of stock or that warehouse location. Another way of looking at the physical stock is that it represents all items that are in the care of Active Ants.
2.2 Quarantined Stock Level
Quarantined is the set of all stock having the quarantined flag set. It can be calculated as the summation over all stock records where the stock has been flagged as quarantined, regardless of the status of the stock or its location. This flag is a property of stock and functions separately of the status and other stock properties. The quarantined flag supersedes the stock status field, meaning that in the situation where the stock has quality DAMAGED, the stock will be counted as quarantined, regardless.
2.3 Damaged stock level
The damaged stock level is the set of all stock having quality DAMAGED or the location is classified as DAMAGED. This too is a basic summation of the quantities per SKU per warehouse where the stock has the quality DAMAGED or the location is classified as DAMAGED.
Note that this stock level stands on its own and may overlap with other stock levels. For example damaged stock that is placed in quarantine will contribute to both levels.
2.4 To Scrap Stock Level
The to scrap stock level is the set of all stock having quality TO_SCRAP or is on a location classified as TO_SCRAP. Once more this can be calculated as a basic summation of the quantities per SKU per warehouse where the stock has the quality TO_SCRAP or the location is classified as TO_SCRAP.
Note that this stock level stands on its own and may overlap with other stock levels. For example damaged stock that is placed in quarantine will contribute to both levels.
2.5 Expected Stock Level
Expected stock is not based on physical stock and is therefore a declared stock level. It can only be calculated as the sum of all SKU expected to be delivered at a warehouse. Expected SKU's are not yet in possession of Active Ants, but has been registered as ordered by the customer. Registering 'future stock' can done by creating a purchase order listing the SKUs and quantities expected. Purchase orders remain as expected stock as it is not linked to an inbound. This linking of purchase orders to inbounds is considered a responsibility of the customer.
2.6 Economic Stock
Economic stock is the set of stock over which the customer runs an economic risk. It can also be seen as the stock that is available for placing orders against and for which shipments will be generated now or in the foreseeable future when expected stock becomes pickable. This stock can be calculated by the following formula:
economic = physical – quality≠ok – ordered + expected
In words: all physical stock minus all damaged or to scrap stock, minus the ordered stock, plus the expected stock.
The status of the stock is not considered as this is a temporary status preventing the stock from being shipped. The same applies to quarantined and the type of locations.
2.7 Free stock level
The free stock level is the set of all stock that is available for placing orders against and for which shipments can be generated now or in the short term. It differs from the economic stock in the sense that it does not include the expected stock or overdue stock. This stock is calculated by the following stock level formula:
free = physical – status≠ok – quality≠ok – ordered – overdue
In words: all physical stock, excluding the stock that has status other than ok, quality other than ok or is overdue, minus the order stock level.
2.8 Available stock level
The available stock level is all stock that is free to be sold and can be shipped quickly. It represents all stock at pickable locations that is not in some blocking state like expired, quarantined or recounting.
available = physical – quality≠ok – status≠ok – overdue – ordered
– non-pickable-location – quarantined
In words: all physical stock, where status and quality are both ok, but the stock is not overdue, ordered, not in quarantine, or on a non-pickable location.
2.9 Unavailable stock level
The unavailable stock level is more or less the opposite of the available stock level and denotes all stock that is not available for sales. However the ordered stock is not part of this equation.
unavailable = quality≠ok + status≠ok + overdue
+ non-pickable-location + quarantined
In words: all stock that has a quality other than ok, a status other than ok, is overdue, is on a non-pickable location, or is in quarantine.
3 Internal stock levels
The internal stock levels are not separate stock levels that are calculated and provided through an API, but are used in the calculation of some of the other stock levels.
- Overdue stock level (calculated)
- Ordered stock level (declared)
3.1 Ordered stock level
The ordered stock level is the sum of the quantities that are on back orders. A back order is an order for which some line-items have yet to be 'converted' into shipments. An order is only converted into shipments if there is actual pickable stock available for that order. This means that in certain cases and configurations it is possible that because a single SKU is not available the entire order will be a back order even though the other line items have sufficient stock.
Ordered stock does not have to be physically present at Active Ants and could exceed the actual available stock levels in which case the order items having that SKU will be back-logged.
Ordered stock is assigned to the highest priority warehouse given the destination of the order and in accordance to the multi warehouse strategy of the client.
3.2 Overdue stock level
The overdue stock level is all stock that has passed its sell-by date and may no longer be shipped to consumers. The sell-by date is calculated by subtracting a margin from the stock's expiration date. The stock is overdue if the sell-by date lies in the past. The margin is a product-level setting which can be adjusted on request.