> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Executive Dashboard

> C-suite-ready view combining LLM-narrated weekly summary, KPI deltas, anomaly feed, segment × offer heatmap, and one-click Save-as-Scheduled-Report.

The Executive Dashboard is the top-of-stack view for leaders who want the story, not the raw numbers. It arrives with a weekly narrated summary, six period-over-period KPI cards, an anomaly feed, and a segment × offer heatmap — everything you need to spot what changed this week in 30 seconds.

**Path:** `/dashboards/executive`

***

## What's on the page

### 1. Weekly narrated summary

A short 1–2 paragraph LLM-generated executive summary appears at the top of the page on every load. The narrative is produced by the report runner using the same data sources the page surfaces; it runs server-side, is cached for one hour per tenant, and regenerates automatically on the next page load after expiry.

If the LLM provider is unavailable or your tenant has no AI provider configured, the card displays a fallback message ("Narrative is unavailable right now — see the KPI cards below for the raw numbers") and the rest of the page continues to work.

### 2. Six KPI cards (3 × 2 grid)

Each card uses the period-delta component: a headline value, a colour-coded Δ% vs. the prior period, and (where applicable) a tiny sparkline.

| Card            | Source                                                                 | Window               | Format   |
| --------------- | ---------------------------------------------------------------------- | -------------------- | -------- |
| Active offers   | `GET /api/v1/dashboard-data?type=summary_with_comparison`              | Point-in-time        | Integer  |
| Decisions (7d)  | Same — `decisions.{current,previous}` + `sparklines.decisions`         | 7d                   | Integer  |
| Acceptance rate | `GET /api/v1/dashboard-data?type=acceptance_rate&days=7` vs. `days=14` | 7d vs 7d             | Percent  |
| Revenue (7d)    | `summary_with_comparison.revenue` + `sparklines.revenue`               | 7d                   | Currency |
| Model AUC       | `GET /api/v1/dashboard-data?type=model_auc_summary_with_prev`          | Latest vs prior eval | Float    |
| Anomalies (7d)  | `GET /api/v1/dashboard-data?type=anomaly_candidates&days=7`            | 7d                   | Count    |

Delta colour conventions:

* **Green (emerald)** — positive change vs. prior period
* **Red** — negative change
* **Grey flat chip** — within 0.05% of prior value
* **Blue "New" chip** — prior period was zero (no baseline to compare)

### 3. Anomaly feed

The left panel shows the last seven days of anomalies detected across core metrics (acceptance rate, latency, degraded scoring, selection frequency). Each row carries:

* Severity pill (info / warning / critical)
* Human-readable metric + dimension
* Δ% vs. baseline and z-score
* **Explain** button → opens an inline popover with a narrative explanation of the anomaly. The full LLM-narrative path will dispatch through the existing `POST /api/v1/ai/intelligence` bridge (with a dedicated `tool` such as `explainAnomaly`); today that tool is not yet wired, so the button falls back to a deterministic summary built from the row's fields. Wiring the full LLM narrative path is tracked in the [roadmap](/roadmap).

Empty state: *"No anomalies in the last 7 days. All metrics within expected ranges."*

<Note>
  The anomaly feed reads directly from the `anomaly_candidates` endpoint on
  every page load — it does not depend on the alert-rule cron being wired.
  Anomaly rows appear here whether or not you have alert rules configured
  and whether or not an external scheduler is calling `/api/cron/tick`.
</Note>

### 4. Segment × Offer heatmap

The right panel visualises selection rate across segments × offers. Rows = top 10 segments by customer count; columns = top 10 offers by scored count. Cell colour keys off the selection rate (emerald gradient); hovering surfaces the raw scored / selected counts.

If a tenant has no segments configured, the heatmap shows a stub with a deep link to `/data/segments` rather than rendering an empty grid.

### 5. Operational dashboard quick-links

At the bottom of the page, four deep links to the corresponding operational dashboards (Business / Operations / Model-Health / Attribution) let you jump from the narrated summary straight into the detail view.

***

## Sharing

The top-right header of the Executive Dashboard (and every other dashboard) has two buttons:

* **Export** — dropdown to download the current view as PDF / CSV / Markdown / HTML. Under the hood this calls the transient `POST /api/v1/reports/preview` endpoint which runs the report runner without persisting a template.
* **Save as Report** — opens a modal pre-filled with the current view's data sources and filters. Pick formats, narrative on/off, schedule (daily 8am / weekly Mon 8am / monthly 1st 8am / custom cron), and destinations (any configured notification provider). Saving creates a saved report template paired with its schedule.

<Note>
  **Export works unconditionally and requires no cron wiring.** Clicking
  Export renders the artifact server-side and streams the file back to the
  browser immediately. You can use it at any time — no EventBridge, no
  `CRON_TOKEN`, no background automation needed.

  **Save as Report** also creates the template + schedule unconditionally,
  but the resulting schedule only fires on cadence once the cron is wired.
  Until then, use the **Run Now** button on the saved template in
  `/settings/reports` for on-demand delivery. See
  [EventBridge Setup](../self-host/deploy/eventbridge-setup) for the optional
  automation path.
</Note>

See the [Share a Dashboard guide](/tutorials/sharing-a-dashboard) for an end-to-end walkthrough.

***

## Performance

* **KPI cards**: load in \< 500 ms (react-query parallel fetch of 4 endpoints).
* **Narrative**: 1–3 s on first load; cached for 1 hour per tenant.
* **Anomaly feed** and **heatmap** fetch in parallel with the summary and populate as they arrive (skeleton states prevent layout shift).

***

## Tenant isolation

Every backing endpoint resolves the caller's tenant before issuing queries. Anomaly rows, segment lookups, selection frequency aggregations, and the narrator's data-source invocations all filter by `tenantId` — no cross-tenant data leaks on shared deploys.

***

## Related

<CardGroup cols={3}>
  <Card title="Dashboards" icon="chart-line" href="/operations-reporting/dashboards">
    Operational dashboards powering each of the quick-links on this page.
  </Card>

  <Card title="Reports" icon="file-pdf" href="/operations-reporting/reports">
    Templates, schedules, formats, and delivery — the engine behind Save-as-Report.
  </Card>

  <Card title="AI Insights" icon="sparkles" href="/ai-ml/ai-insights">
    Cross-decision anomaly helpers and the narrator that powers the weekly summary.
  </Card>
</CardGroup>
