For the complete documentation index, see llms.txt. This page is also available as Markdown.

Stock availability

fulfillmenttools serves as the central repository for stock data. It integrates updates from multiple sources and consolidates these inputs to deliver diverse availability metrics for various use cases. You can query these metrics through the REST API and access them in Backoffice.

Getting stock availability information

Backoffice
REST API

Stock availability values

Availability value
Meaning

Stock on hand (On hand)

Describes stock that is physically located in a facility. Stock that is, for example, still booked to the facility but is already in transit to another facility is not included.

Available on stock (AOS)

Available on stock describes stock that's available for sale (not earmarked for other purposes). In fulfillmenttools, it refers to stock that's accessible, reduced by:

Available for picking (AFP)

Available for picking describes stock that's available (not earmarked for other purposes) and ready to be picked. In fulfillmenttools, it refers to all stock that is accessible and pickable, reduced by:

This value is used for incoming orders. It's sometimes referred to as available for shipping.

Expected stock

Expected stock is stock expected to arrive or be produced. Expected stock can be communicated via the inbound process. After an inboundProcess with a purchaseOrder was created, our systems automatically create expected stock for the requested items. Expected stock is visible in the stock overview in Backoffice. Once a purchase order is created, its expected stock can be considered in the shop's availability.

This value can be considered for incoming orders. More information can be found under Expected stock in availability.

Safety stock

Safety stock allows guarding offline sales against online-induced stock-outs. It can be defined on the facility level, and decreases the available stock levels ("available for picking" and "available on stock"). This means that if the stock level in a given facility is equal or less than the configured safety stock, the available stock is 0.

Users can configure the desired safety stock quantity for each listing. Configurations can be made in the stock overview in the Backoffice or via safety stocks REST API.

More information can be found under Safety stock.

Inventory facility stock changed event

When stock levels change in a facility, the INVENTORY_FACILITY_STOCK_CHANGED event is emitted. It uses the InventoryFacilityStockChangedWebHookEvent payload. You can find the schema in the models page.

Each event reports one tenantArticleId in one facilityRef. Every quantity in the payload is the aggregated value for that facility only. It does not contain a network-wide aggregate.

You can create an event scope for this event to include more than one facility, see the Event scope section of the Eventing article.

Future availability

Creation and management of expected stock

Expected stock is automatically created after a new inbound process with a corresponding purchase order is added. Expected stock can only be managed via the purchase order and cannot directly be edited via API. Quantities, attributes, and so on of expected stock can be edited via the requested items of the purchase order.

Stock properties and available until

Available until

availableUntil defines until when stock is considered available.

  • Calculated automatically for stock and expected stock based on expiry or creation date, with optional modifiers (for example, -P30D to shift earlier) if configured in the listing.

  • For expected stock, the creation date of the purchase order is used if calculationBase is set to CREATION. When a receipt is created, availableUntil of the stock is updated based on the creation date of the stock.

Stock properties

  • Stock properties (especially expiry) provide the values required for calculating availableUntil with calculationBase = EXPIRY.

  • Listings define which properties are required.

  • For expected stock, properties can be specified in the requestedItems of the purchase order. When a receipt is created, the properties are transferred to the stock.

  • If a defaultValue is defined for a stock property in the listing, the stock is created with that value. Empty strings provided as default values are ignored.

Interaction

  • availableUntil is the decisive value for availability.

  • If both expiry and availableUntil (with calculationBase = CREATION) are set, only availableUntil applies.

  • availableUntil defaults to the expiry date if expiry properties are configured in the stock.

Stock availability thresholds

Stock availability thresholds let you define your own low stock or critical stock levels for articles, categories, facilities, or facility groups. Whenever a stock level crosses one of these thresholds, you'll get notified automatically.

Instead of periodically checking stock reports yourself, you can set a threshold once, and fulfillmenttools monitors stock levels in the background for as long as the threshold is active.

Typical uses:

  • Replenishment triggers: Get alerted when an article's available stock in a facility drops below a safety level, so you can reorder before it sells out.

  • Automation: React programmatically when stock drops into a critical range (for example, pause promotions or notify a supplier).

How availability thresholds work

A threshold configuration has two parts:

  1. A target, which is what to monitor. For example, one or more articles, categories, facilities, or facility groups. You can combine these (for example, these 3 articles and these 2 facilities), or leave the target empty to monitor everything.

  2. A threshold is the level you care about. Each has a name that you choose (for example, CRITICAL_STOCK or LOW_STOCK) and a numeric limit. You decide whether the limit is measured against available for picking stock or stock on hand.

Once a configuration is created, every time a targeted article's stock changes, fulfillmenttools checks whether it has moved across one of your levels:

  • If a stock level drops to or below a threshold's limit for the first time, that's a TO_ON transition, and the alert activates.

  • If the stock level later recovers above the limit, that's a TO_OFF transition. The alert is "deactivated" because the situation has resolved itself.

If you set several levels (for example, LOW_STOCK at 20 units and CRITICAL_STOCK at 5 units), fulfillmenttools always reports the most specific one that applies. So stock falling straight from 100 to 3 units reports directly as CRITICAL_STOCK, not as LOW_STOCK followed by CRITICAL_STOCK.

Thresholds compare against a single number per stock measure. They don't currently account for trends (for example, rapid drops). Only the current value relative to your configured limit.

Everything is tracked per listing, per facility. If your target matches several facilities, each facility listing is monitored and alerted independently. One facility running low doesn't affect another facility's alert status.

Today, one threshold configuration effectively monitors a single stock measure (either available for picking or stock on hand). If you need to watch both for the same target, create two separate threshold configurations.

A configuration with no target (empty target) applies to everything. Use this deliberately, as it will start monitoring your entire network.

Example

Say you configure a threshold named LOW_STOCK with a limit of 10, targeting article SNEAKER-001 across all facilities in your Germany facility group, measured against available for picking stock.

  • The Berlin facility has 45 available for SNEAKER-001, so nothing happens.

  • A wave of orders brings Berlin's stock down to 8 available, so a LOW_STOCK alert fires TO_ON for Berlin.

  • The Munich facility still has 60 available, so no alert for Munich as each facility is evaluated independently.

  • Restocking brings Berlin back up to 30 available, so a TO_OFF alert fires for Berlin, closing out the earlier alert.

  • Prague drops to 9 available, but no alert fires for the Prague facility because it's not in the target.

Create a threshold

You manage threshold configurations via the availability threshold configuration API. You can create, update, or delete a configuration by specifying its target and its threshold levels. You don't need to poll or schedule anything.

To create a threshold, use the endpoint below:

If we created a threshold as described in the example, it would look like the following:

Edit a threshold

Changing a configuration resets all active alerts for that configuration, so the next stock change is evaluated against the new settings. If a given stock level was already in a TO_ON state before the change, it will be treated as a new transition if it is still below the threshold after the change.

To update a threshold, use the endpoint below:

The version field is required and must match the stored version of the threshold configuration.

You can also trigger a full reevaluation of the affected stock availabilities when the context or threshold changes.

To do this, use the enforceFullReevaluation=true parameter:

The reevaluation runs asynchronously and sends INVENTORY_FACILITY_STOCK_THRESHOLD_TRANSITIONED events for each resulting threshold transition, plus an INVENTORY_FACILITY_STOCK_THRESHOLD_TRANSITIONED_BULK event.

For each processed stock availability, the reevaluation sends up to two transitions per entry in the thresholds array of the configuration:

  • TO_OFF for the previous configuration version, if a threshold level was reached.

  • TO_ON for the updated configuration version, if a threshold level is reached.

A single webhook call contains the transitions for one tenantArticleId in one facility. The following payload shows a configuration that changed from version 1 to version 2 while the stock stayed below both limits.

The INVENTORY_FACILITY_STOCK_THRESHOLD_TRANSITIONED_BULK event bundles the transitions of multiple stock availabilities in one webhook call. Each entry of the array has the same structure as the payload of the INVENTORY_FACILITY_STOCK_THRESHOLD_TRANSITIONED event, for different tenantArticleId and facilityRef combinations.

As the reevaluation is asynchronous, regular stock changes can occur while it's running. Correct results can only be guaranteed if the following rules are adhered to:

  • If config.version is higher than the stored version, the event is accepted.

  • If config.version equals the stored version, the event with the higher triggerTimestamp for the given threshold is kept.

Transitions that originate from a reevaluation don't create alerts in the Notification center.

Concurrent updates

An update with enforceFullReevaluation=true while a reevaluation of the same threshold configuration is running stops the running reevaluation and starts a new one. The new reevaluation sends only the events for the change from the previous configuration version to the updated one.

An update without enforceFullReevaluation while a reevaluation is running stops the reevaluation.

Updating a configuration with enforceFullReevaluation=true in quick succession isn't recommended. If a threshold configuration is updated multiple times, it's recommended that you remove data stored from previous configuration versions.

A stock availability matches a threshold configuration when a stock availability change is processed while the configuration exists. Stock availabilities that haven't changed since the configuration was created aren't matched. A reevaluation after a threshold change doesn't process these stock availabilities.

A reevaluation after a context change takes longer. The duration depends on the number of unique stocks across facilities and tenantArticleId values.

View an alert

You can view an alert in two ways, via Backoffice or API.

Alerts are informational only. Reaching a threshold doesn't itself block orders, pause listings, or take any other automated action. You (or your configured notification channel) decide how to respond.

Backoffice users

When a threshold activates (TO_ON), it can be surfaced as:

  • An in-app notification in Backoffice

  • An email sent to the addresses configured for your tenant or facility

Both channels are opt-in and configured through the Notification center settings.

Only the TO_ON (stock became critical) transition is treated as notification-worthy. The recovery (TO_OFF) is intentionally silent, since the problem resolved itself rarely needs an alert of its own.

API consumers

Every transition (TO_ON and TO_OFF) is emitted as a domain event containing the article, the facility, and the threshold level(s) that changed, so you have the full picture even though only TO_ON triggers a human-facing notification by default.

Last updated

Was this helpful?