Stock
Our stock handling ensures that your available product inventory is efficiently among all your markets and channels. This maximizes your sales opportunities and helps prevent out-of-stock situations.
How Does Stock Handling Work?
When you have a single pool of product stock (e.g., all units in one warehouse) that needs to be shared across multiple locations, we automatically distribute it based on sales predictions and actual item quantities.
Example
Let's say you have 100 total items of Product A available globally.
| Location | Sales Prediction | Distributed Stock |
|---|---|---|
| Germany | 60 sales | 60 items in stock |
| Italy | 40 sales | 40 items in stock |
What Your Stock Numbers Mean
You only need to send us the current stock of each product — sending the full history is optional. Each row is valid from its active_since timestamp until the next change for that product. If you do not send a new row, the most recent one stays in effect.
The stock value you send tells us:
- A number, e.g. 12 → that many items are available for sale.
- 0 → the product is out of stock (availability = 0), unless a future
stock_changebrings the level above 0. Zero-stock periods in the past are excluded from demand model training. - Empty (NULL) → unlimited stock and fully available (availability = 1), as for drop-shipped products without tracked warehouse inventory.
- No row for the product → unlimited stock and fully available.
Attention: always send stock_start_of_day = 0 for a product that is out of stock instead of omitting the row. Omitting the row tells us that the product has unlimited stock, so we keep selling it in the predictions.
Example: Sending Stock Over Time
active_since | stock_start_of_day | How we read it |
|---|---|---|
| 2026-11-01 | 30 | Selling with 30 items from Nov 1 |
| 2026-11-08 | 0 | Sold out on Nov 8, out of stock from then on |
| 2026-11-20 | 45 | Restocked on Nov 20 with 45 items |
Future restockments and write-offs can be announced ahead of time with stock_change, so that we already price and plan the product accordingly.
Forecast setting: Stock Capping
If you frequently run out of stock or have trouble with overstock, it might make sense to consider stock in your optimizations. We offer multiple options for considering stock.
By default we assume unlimited stock in our predictions. Even if you have only 10 items on stock, we would predict 20 sold items for the next 14 days, assuming that you are able to restock the item during the 14 days.
Your Data Scientist can turn-on stock capping in the forecast which then limits the sales to the items on stock (10) plus the expected stock from returns. This would then automatically increase the price on items with low stock also without the use of a rule.
Rule: Stock Reach in Weeks ≤ Value
This rule can be used to reduce the price on a product. Attention: This rule should always be combined with a rule that sets a min margin like "Profit Margin ≥ Value"
Definitions
- Stock Reach in Weeks: 7Learnings price on how many weeks the current stock will last at the selected price
Example
Value = 4
Resulting rule: Stock Reach in Weeks ≤ 4

Rule: Stock Reach in Weeks ≥ Value
This rule can be used to increase the price on a product automatically in order to make sure the stock lasts a certain amount of weeks.
Definitions
- Stock Reach in Weeks: 7Learnings price on how many weeks the current stock will last at the selected price
Example
Value = 4
Resulting rule: Stock Reach in Weeks ≥ 4

Liquidation End STR ≥ Value
The rule will ensure a target Sell Through Rate (STR) at the liquidation end date. It will push the prices of the products to have a specified STR at the end of liquidation.
Attention: This rule should always be combined with a rule that sets a min margin like "Profit Margin ≥ Value"
Definitions
- STR: Measures the liquidation percentage of sold inventory compared to the total stock available over a specific period of time. A high sell-through rate usually means strong demand or effective pricing while a low sell-through rate might indicate overstocking, poor demand, or pricing issues.
Example
Value = 80%
Resulting rule: Liquidation End STR ≥ 80%
