Decisions
Everything that needs a decision
How this is calculated
count(decision_case where status = 'awaiting_approval'), reconciled against the cases whose LATEST case_transition.to_status is 'awaiting_approval'
decision_case.status · case_transition.to_status · case_transition.at — read per row from the source tables, not re-stated here
decision_casecase_transition
How this is calculated
Σ over store × style where cover > 120d of round(on_hand × unit_cost_paisa × 0.25), where unit_cost_paisa = observed selling price × 0.55
days_cover · on_hand · unit_cost_paisa — read per row from the source tables, not re-stated here
signal_stockbottleneck
How this is calculated
round(Σ bottleneck.impact_paisa where kind = 'dead_stock'), compared against the per-row integer sum of the same rows
bottleneck.impact_paisa · bottleneck.kind — read per row from the source tables, not re-stated here
bottlenecksignal_stock
How this is calculated
Σ over store × style where cover < 28d and units_per_day × 21 > on_hand + qty_inbound of round((units_per_day × 21 − on_hand − qty_inbound) × margin_per_unit_paisa)
units_per_day · on_hand · qty_inbound · margin_per_unit_paisa · days_cover — read per row from the source tables, not re-stated here
signal_stockbottleneck
How this is calculated
round(Σ bottleneck.impact_paisa where kind = 'stockout_risk'), compared against the per-row integer sum of the same rows
bottleneck.impact_paisa · bottleneck.kind — read per row from the source tables, not re-stated here
bottlenecksignal_stock
How this is calculated
Σ over store × style with at least one overdue PO of round(units_per_day × 30 × margin_per_unit_paisa)
overdue_pos · units_per_day · margin_per_unit_paisa — read per row from the source tables, not re-stated here
signal_stockbottleneckbronze_po
Decisions awaiting you
How this is calculated
count(decision_case), reconciled against count(distinct case_id) in the append-only case_transition log — every persisted case must carry a transition trail. Counts all cases, including closed and rejected ones, not the open queue.
decision_case.id · case_transition.case_id — read per row from the source tables, not re-stated here
decision_casecase_transition