# Promo Tool

Standalone CM-facing app for planning, forecasting and reviewing promotions.
Lives in `PromoTool/` next to the main demand tool. Reads data from
`../data/` (the main project's data folder), so it always uses the same
sales / ERP / forecast inputs as the main system.

## Pages

1. **🛒 Promo Planner** — Pick SKUs, set period and discount depth,
   see per-SKU forecast / P&L / coverage / cannibalization impact, save
   the campaign to `data/cm_promotions.csv`.

2. **🔮 Promo Forecaster** — Given a SKU and a desired outcome
   (Stock clearance / Margin / Acquisition / Traffic), the tool digs
   through past campaigns (own SKU + sub-category siblings) and
   recommends discount, duration and predicted uplift. Includes a
   discount-sensitivity table and the historical events that back the
   recommendation.

3. **📜 Past Promotions** — Browse past monthly+ campaigns from the
   ERP promo calendar with computed uplift, units, revenue and RUC
   per SKU.

## Install

```
pip install -r requirements.txt
```

Python 3.12 recommended. Do NOT use 3.14 (no scipy wheels).

## Run

Windows: double-click `Start_PromoTool.bat` (or `.cmd` if .bat is blocked).
The tool opens on **http://localhost:8502** (different port from the main
tool on 8501, so both can run side-by-side).

Mac / Linux:
```
python -m streamlit run app.py --server.port 8502
```

## Output

Saved promotions go to `PromoTool/data/cm_promotions.csv`. Schema:
`id, name, source, promo_type, outcome, target_units, start_year, start_week,
end_year, end_week, discount_pct, channels, sku, sku_name, weekly_qty_csv,
total_units, revenue_eur, ruc_eur, created_at`.
