company_stockouts
Reconstruct stockout timelines and compute lost units, revenue, and reorder-point gaps to determine whether shortages came from small or late orders.
Instructions
Build the sealed stockout ledger for the window: every persisted stock position replayed into an on-hand timeline, the days it sat empty and the spells, the velocity while stocked, the units lost at that velocity plus the units the chain recorded as oversold, the contribution lost at the window's margin report (built now from the persisted commerce chains), and the reorder point the policy would have needed against the one it carries, so the recommendation says whether the order was small or late (payload: optional window_start, window_end).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| now | No | ||
| engine | No | ||
| operation | No | build | |
| entity_ref | No | ||
| project_id | Yes | ||
| bundle_json | Yes | ||
| payload_json | No | {} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |