Stock
Last updated
Last updated
Stocks represent items in a facility and carry information on how much of a product is present as well as metadata and operational data. Stock is typically linked to a listing which holds information on the attributes of the item within the facility. Only stock-specific information, which differs from item to item, like best-before-dates or storage locations is tracked via stocks. Stocks can exist without listings and the other way around. However, we advise to always create listings for stocks so that stocks are assigned to the corresponding item and item information can be displayed in clients.
Stock represents one or more items with the exact same attributes, e.g., items with the same best-before-date, lying on the same storage location. Two stocks can be merged, if all information on the respective stocks is identical, adding up their amounts. However, our systems still allow having two separate stocks with identical attributes.
The example below shows a listing with tenantArticleId "9999". As stocks for that item are firstly, distributed over two locations and secondly, have different attributes, three stocks were created.
Attributes which are relevant for operational processes are handled via Stock Properties. A common example for properties are values such as expiry date or batch number.
Stocks have the attribute receiptDate
: This represents the time and date, when a stock enters a facility. The information can be used for various purposes, e.g., to ensure that picking follows a first-in-first-out strategy. This ensures that the timestamp is set to the value when the stock is accepted in the Inbound process and not changed afterwards.
When the stock is set via API, it is the responsibility of the integration layer to provide the correct time point. If no receiptDate
is provided, the platform defaults to the moment when the stock is created.
The fact that there is no stock left for an item in a facility can be represented in two ways:
Having no stock entities
Having stock entities with amount 0
A stock with amount 0 that is assigned to a storage location can be used to indicate that the product should always be stored there. This is, for example, helpful when using our Inventory App and/or our storage location recommendations. If stock is set to 0, our systems will remove the stock entity by default. This can be prevented by adding the trait KEEP_ON_ZERO to a storage location.
facilityRef
: facility in which the stock should be created
tenantArticleId
: the item that the stock belongs to
value
: quantity that should be created
locationRef:
location on which the stock is placed on (when using our storage locations)
properties
: Attributes which are relevant for operational processes. See stock properties for more information
receiptDate
: Time and date when the stock entered the facility
availableUntil
: Defines until when a stock is included in the stock availability which is, e.g., used to communicate available stock to shop systems. See the corresponding listing configuration for more information.
customAttributes
: can be used to carry custom information that might be in interest to connectors or services outside of fulfillmenttools. For more information see custom attributes.
Each stock created in our system receives a unique ID. This ID must be specified when updating stock. Therefore, we advise to either temporarily store stock Ids or get all stocks before updating.
Each stock created in our system receives a unique ID. This ID must be specified when deleting stock.
For deleting all stocks for a product in a facility, use the DELETE_BY_PRODUCTS action
For deleting all stocks on a storage location in a facility, use the DELETE_BY_LOCATIONS action
For deleting multiple stocks in a facility in one call, use the DELETE_BY_IDS action
For moving a stock from one location to another, specify the respective stockId
as well as the toLocationRef
to which the stock should be moved. When setting deleteFromStockIfZero
to true
, the stock on the start location is deleted when value reaches 0 after move action was completed. Attention: If deleteFromStockIfZero
is set to true
, the stock entity is deleted even when the KEEP_ON_ZERO
trait is active on the respective location.
Stock was deleted.
Stock was created.
Stock action result
Stocks
Stock action result
Stock upsert result