Dashboard
Understand the current analytics cards and charts
The Analytics dashboard is a fixed live-record view for the last 7, 30, or 90 days. Its summary cards, charts, and CSAT all use the selected workspace. It is not a customizable or automatically refreshing dashboard.
Period controls
Choose 7 days, 30 days, or 90 days at the top of /analytics.
The page fetches again when the period changes. There is no Today preset, custom
date picker, saved filter, or automatic polling interval.
Selected-workspace summary cards
Summary cards use tickets created in the selected workspace during the selected rolling period:
| Card | Current calculation |
|---|---|
| Total Tickets | Number of tickets in the created-ticket cohort |
| Resolution Rate | Cohort tickets whose current status is solved or closed, divided by all cohort tickets |
| Auto-Resolved | Cohort tickets with resolutionType=auto and a stored solved time, divided by all cohort tickets |
| Escalation Rate | Cohort tickets currently marked with escalated resolution type, divided by all cohort tickets |
| Avg time to first reply | Rounded mean from the first inbound message to the first later customer-visible outbound message; includes automatic replies, counted around the clock |
| Tokens Used | Stored input and output tokens from agent runs and classifications attributed to cohort tickets |
| Total AI Cost | Those token counts recalculated with the current model price table |
| Cost / Ticket | Current-price estimate divided by every ticket in the cohort |
The percentage cards are current-state measures of tickets created in the
period. They are not a solved-event cohort. The separate API metric named
resolution_trends uses solved time, but the current overview does not display it.
Internal notes and outbound messages before the first inbound are excluded from average response time. Tickets without both sides are omitted. The value is not business-hours adjusted, an SLA measurement, or resolution time.
Selected-workspace charts
The page resolves the selected workspace and requires workspace membership for:
- Ticket Volume — tickets grouped by creation date
- Category Breakdown — one latest classification per ticket, ordered by classification creation time and ID
- Sentiment Distribution — the same latest-classification rule
The ticket itself must be in the selected workspace and created during the
period. Classification creation time is not separately constrained to that
period, but later classifications are capped at the endpoint's database
asOf; unclassified tickets do not appear in the category or sentiment charts.
Selected-workspace CSAT
CSAT uses rated responses submitted during the selected period for the selected
workspace. It shows the average rating, response count, and 1-to-5 distribution.
It is not tenant-wide. Its response identifies the workspace and includes its
own database-derived from, to, and asOf metadata.
Scope, authority, and freshness
Each endpoint rechecks the exact Clerk organization-to-tenant binding, current
analytics.view permission, selected-workspace ownership, and membership in the
same repeatable-read PostgreSQL transaction as the data reads. The transaction
derives asOf from the database and caps every component read at that boundary.
Separate summary, chart, and CSAT endpoints retain independent asOf clocks.
The browser quarantines each invalid section independently while healthy sections and ticket data remain visible. A section is invalid when its summary, chart, or CSAT response is unsuccessful, malformed, tenant-scoped, names a workspace other than the selected workspace, or uses a snapshot/non-live payload. Each quarantined section offers a scoped retry that refetches only that section.
Generic metric requests clamp a partially future to value to the database
asOf. A future-only range returns 400 before metric reads, so every successful
generic metric response satisfies from <= to <= asOf.
Explicit non-empty workspace IDs must be UUIDs. Missing or empty IDs fall back
to a valid workspace cookie and then the default-workspace resolver. A malformed
non-empty explicit value returns 400 after authentication and the outer
analytics.view permission check, but before route-owned tenant, workspace, or
metric reads.
A malformed raw cookie is ignored by the cookie readers instead of being used as a workspace ID. The server treats that value as absent and can use the default workspace fallback after the outer permission check. In the browser, Analytics withholds its analytics requests until the workspace switcher replaces or clears the invalid selection. The malformed value is never promoted into a route-owned analytics query.
Cost estimate boundary
Cost cards use stored model and token fields from agent runs and classifications attached to cohort tickets, then apply the current in-code price table. Unknown model identifiers use the current fallback price. These values do not include cache tokens, embedding cost, browser-action token cost, or provider invoices. They are estimates, not cost savings or historical billing evidence.
Product limits
The current dashboard has no global assignee/category/priority/channel/tag filters, team performance or workload panels, NPS, confidence distribution, resolution-time percentile chart, channel chart, anomaly detection, prediction, recommendation, sharing, export, drill-through, widget editor, or saved layout.