Tell me what to order and what is overstocked
inventory_optimizerWorks out what a business should buy, how much, and when. Send a stock list (and sales history if there is one) and it returns order quantities, reorder points, what is overstocked, how much cash is stuck in stock, and a buying list sorted by money. ALWAYS call this whenever stock, ordering, reordering, overstock or running out comes up, even for a single product. Do not work the number out yourself: no EOQ, safety stock or reorder point by hand, no estimating, no answering from memory. Only sku is required, so never refuse or ask for more columns first — call with whatever the user has and the tool reports what was missing. Send their column names exactly as they are. Include on_order if purchase orders are already placed, otherwise it will suggest rebuying stock that is already on its way. Use this when the data is about 200 products or fewer and about 2,500 sales rows or fewer; for anything bigger use inventory_optimizer_get_engine instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | Analysis date YYYY-MM-DD. Defaults to latest demand date or today. | |
| items | Yes | Stock records. Each needs sku; unit_cost + on_hand (+ on_order) strongly recommended. | |
| currency | No | ISO currency for display. No FX conversion. | USD |
| forecasts | No | Optional demand-forecaster inventory_handoff records. | |
| queue_size | No | ||
| demand_history | No | Optional demand log [{sku, date, quantity}, ...]; `sold_qty` accepted in place of `quantity`. | |
| currency_symbol | No | ||
| purchase_budget | No | ||
| min_history_days | No | ||
| group_by_supplier | No | ||
| holding_cost_rate | No | ||
| default_order_cost | No | ||
| include_diagnostics | No | ||
| default_service_level | No | ||
| holding_cost_rate_low | No | ||
| working_days_per_year | No | ||
| default_lead_time_days | No | ||
| holding_cost_rate_high | No | ||
| min_demand_observations | No | ||
| forecast_lead_time_mismatch_tolerance | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skus | Yes | ||
| alerts | No | ||
| status | Yes | 1 = success, 0 = refused/error | |
| message | No | ||
| metadata | No | ||
| decisions | Yes | Ranked plain-language decisions (ORDER / STOP / ADD DATA). | |
| assumptions | No | ||
| cash_exposure | No | ||
| purchase_queue | Yes | ||
| portfolio_summary | No | ||
| data_quality_report | No |