Documentation
Sessions & metrics
How conversations become sessions and which metrics matter.
Sessionization
Default rules (ChatSession policy):
- Idle gap greater than ~6 hours → rotate session
- Hard outcomes can close windows
- Configurable day boundary support
Messages attach to the open session for accountId + chatId. Revenue (tips / PPV) attributes to the open session when possible.
Metric classes
| Class | Examples | Action |
|---|---|---|
| Speed & presence | first response, median latency, wait bursts | Staffing / SLA coaching |
| Structure | turns, monologue ratio, silence_pct, AHT | Script quality |
| Commercial | CTA count, PPV unlock rate, session revenue | Pricing & cadence |
| Content mix | media ratio, free before PPV, price points | Funnel design |
| Fan state | lifetime spend, recency | Whale routing |
| Quality / risk | alerts catalog + model policy risk | Escalation |
Full engineering catalog lives in repodocs/METRICS.md. Product-facing alert codes:Alerts.
Priority inbox
Sessions can be sorted by priority score (awaiting reply, wait time, whale spend, session $). See GET /api/sessions?sort=priority.