# Forecast

The Forecast page is the sales-leadership "where do we land this quarter" surface. It reads Deal + Pipeline data only — no AI calls — so it stays fast and dependable, and the numbers always match the underlying records.

Navigate to **CRM > Forecast** to open it.

## Headline Tiles

The top of the page shows five scoreboard tiles:

- **Commit** — sum of `value` for open deals with effective probability ≥ 75%.
- **Best case** — sum of `value` for open deals with effective probability ≥ 50%.
- **Pipeline** — sum of `value` across every open deal.
- **Weighted** — `sum(value × probability / 100)` over open deals.
- **Closed won** — count and value of deals already in a won stage in the window. The subtitle also surfaces the closed-lost value as a counterweight.

**Effective probability** is the deal-level override when set, otherwise the stage's default from the pipeline configuration. The classifier also honors the legacy hardcoded `closed_won` / `closed_lost` enum values for deals from the pre-pipeline era — no migration is required to get numbers.

## Filters

The filter bar at the top of the page controls every panel below:

- **Pipeline** — scope to a single pipeline, or leave blank for all.
- **Owner ID** — scope to one rep's book (the field accepts the user's `_id`).
- **From** / **To** — close-date window. Open deals are bucketed by `expectedCloseDate`; won/lost deals are bucketed by their resolution date. A deal with no expected-close date is excluded from window-scoped open totals — you don't get forecast credit for an unanchored deal.

Hit **Refresh** to re-fetch with the current filters.

## Funnel by Stage

The funnel chart shows one bar per open stage, ordered by `stageOrder`. Each bar reports:

- **Count** of open deals in the stage.
- **Total value** (the bar width is proportional).
- **Weighted value** based on the stage's default probability.
- **Avg age days** since each deal entered the pipeline.

Closed stages don't appear here — they live in the Closed Won tile above.

## Win Rate by Source

The cohort table groups settled deals (won + lost) by their `source` field. Open deals are reported as an `Open` count but intentionally excluded from the win-rate denominator so the metric reflects only settled outcomes:

- **Win rate** = `wonCount / (wonCount + lostCount)`
- **Avg won** = average value of won deals in the cohort

Sourceless deals appear under "No source."

## Leaderboard by Owner

The leaderboard sorts reps by `commit + closedWonValue` by default. Click any column header to re-sort. Each row shows commit / best / pipeline / weighted / won / open for that owner over the active window. Owners with no open and no closed activity are excluded so the board only lists reps who have touched the pipeline.

Unassigned deals roll up under a single **Unassigned** row.

## Where the Numbers Come From

The page is backed by four endpoints under `/internal/forecast`:

- `/summary` — headline tiles.
- `/by-owner` — leaderboard.
- `/by-stage` — funnel.
- `/win-rate-by-source` — cohort table.

These are also exposed as preset widgets on the [CRM Dashboards](/help/crm/crm-dashboards) page, so the same metrics can be pinned to a custom board for daily standups.

<!-- SCREENSHOT: forecast-page.png — Forecast page with tiles, funnel, leaderboard -->
