| variant_id | ID of the product or material variant the signal describes. Signals are account-wide: one row per variant, summed across all locations. |
| avg_daily_demand_30d | Quantity consumed over the last 30 days divided by 30. Demand counts sales, manufacturing ingredient consumption, and outsourced purchase order recipe rows. If the variant's first stock movement is less than 30 days old, the divisor is the days since that movement instead. Recalculated nightly at 07:00 UTC, so it can be up to 24 hours old. The average is flat: no seasonality and no trend. |
| reorder_point | The calculated stock level under which the shortfall lands inside the lead time (= avg_daily_demand_30d * lead_time_used + safety_stock). Null while the variant's demand has not yet been calculated. This is not the reorder_point on the inventory object, which is the user-set safety stock. |
| days_of_stock_left | Whole days until stock runs out at the current demand rate (= floor(in_stock / avg_daily_demand_30d)). Uses in_stock alone: it ignores committed stock and incoming supply, so it can disagree with stock_risk. Null while the variant's demand has not yet been calculated. |
| stock_risk | How urgent replenishment is, as an integer from 0 to 3. Worked out from in_stock less committed, plus incoming supply that lands in time, over a horizon of lead_time_used + 7 days. 0 = low: stock stays at or above safety stock through the horizon. 1 = high: stock falls below safety stock inside the horizon, but after the lead time. 2 = critical: stock falls below safety stock inside the lead time, so an order placed now arrives late. 3 = stockout: in_stock is 0 or less. Stockout is checked first and the first match wins. Values are in ascending severity, so a value of 1 or more means the variant needs attention. Null while the variant's demand has not yet been calculated. |
| in_stock | Quantity on hand, summed across all locations. |
| committed | Quantity already claimed by open sales and manufacturing orders, so it cannot cover the demand ahead. stock_risk and safety_stock_breach_at are worked out from in_stock less committed. days_of_stock_left is not. |
| safety_stock_breach_at | The projected date on which in_stock less committed, counting incoming supply, falls below safety stock. Set on high (1) and critical (2) rows only. Null everywhere else. |
| expected_before_safety_stock_breach | The incoming quantity that stock_risk counted. Open orders are taken in expected-date order. An order counts only if it lands on or before the projected breach day, and each counted order pushes that day further out. An overdue order counts as landing today. 0 means nothing incoming lands in time. Null where incoming supply could not change the risk. Neither value means nothing is incoming. |
| safety_stock | The safety stock level set for the variant. |
| lead_time_used | Lead time in days used in the calculations. The variant lead time. Where that is not set, the factory default purchase lead time, then the factory default manufacturing lead time, then 14 days. |
| lead_time_source | Which source supplied lead_time_used: sku (variant lead time), system_po (factory default purchase lead time), system_mo (factory default manufacturing lead time) or fallback (14 days). |
| demand_calculated_at | When avg_daily_demand_30d was last calculated. It dates the average, not the row. Every other field updates within seconds of a change to in_stock, safety_stock or incoming supply. A lead time change is not applied within seconds. |