# Customer Overview: metrics and layouts The customer page's Overview tab used to be fixed: active users, usage trend, MRR, seats, last active, a usage chart and the built-in sections. Teams whose customers are healthy without ever logging in (an observability product: what matters is the data they send and the features they use) need a different page. Now the Overview is data, edited in settings without code changes. Contracts: `packages/domain/src/customers/overview.ts` (sources, formulas, widgets, rules, results), `packages/domain/src/rpc/customers.ts` (`customers.metric.*`, `customers.layout.*`, `customers.account.metricWindows`, `customers.account.setLayout`), tables in `packages/db/src/tables/customers.ts` (`customer_metric_definitions` new columns, `customer_overview_layouts`, `customer_accounts.pinnedLayoutId`/`layoutId`). Designs: Wonder file "Maple Design System", pages "Hazel Customers · Customer Page" and "… · Signals & Health Settings". ## Metrics A metric is a daily value per account in `customer_metric_daily`, with a definition in `customer_metric_definitions` (synced). Over a window its days combine by `aggregation`: `sum`, `max`, or `last`. | Kind | `source` | `provider` | Written by | |---|---|---|---| | Built-in (`active_users`, `active_users_30d`, `mrr`, `health_score`) | null | null | derived at read time (`facts.ts`) | | A source's own (Autumn features, Maple event mappings in the connection config) | null | the provider | that provider's pull | | **Maple query** | `maple_query` | `maple` | the Maple pull's `queries` phase | | **Product event** | `product_event` | `maple` | the Maple pull's `metrics` phase (joined to the config's mappings) | | **Formula** | `formula` | null | nothing: evaluated at read time over its operands | - User-defined keys are created with the metric (`UserMetricKey`), never change, and are written to `customer_metric_daily` under that key. Maple-sourced user keys need no `maple.` prefix of their own: ingest's per-provider key ownership treats a definition with `provider = maple` as Maple's. - `group` sections the catalog and feeds metric tables (`MetricTableRows` `group`). `format` (`number | bytes | percent | money | duration_ms`) and `unit` decide how a value reads (web: `formatMetric` in `src/customers/format.ts`). - **Maple query.** One SQL statement over Maple's warehouse, run through the Maple connection's key (`run_sql`), once per UTC day of the window. Contract (`checkMapleSql`): AND in `$__orgFilter` and `$__timeFilter(