Smart Restock Predictor
smart_restock_predictorCalculates exact reorder quantities for low-stock products from demand velocity, supplier lead time, safety buffer, and current stock, with optional category filtering.
Instructions
Evaluates every low-stock item and recommends an exact reorder quantity. The recommendation is derived from each product's demand velocity (units sold per day over recent order history), projected demand across an assumed 14-day supplier lead time plus a 7-day safety buffer, minus current stock on hand. Items with no recent sales history fall back to a conservative flat restock quantity. Results are ordered by days of cover (stock remaining / daily velocity), so the first recommendation is the item that runs out first; items with no measurable demand report a null daysOfCover and sort last. An optional category restricts the plan to one category; the echoed 'filters' block reports the category actually applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Restrict to a single category, e.g. 'tech', 'apparel', or 'home'. Case-insensitive. Omit to cover the whole catalog. | |
| threshold | No | Stock level at or below which a product is considered for restocking. Defaults to 5 if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window | Yes | ||
| filters | Yes | ||
| assumptions | Yes | ||
| thresholdUsed | Yes | ||
| recommendations | Yes |