Insights
The dashboard’s Action Center is a data-only, severity-ranked feed of work that needs attention now. It is not the Reports KPI snapshot or a historical analytics dashboard.
What
GET /organizations/:orgId/insights returns { data: Insight[] } from a
20-rule catalog. Each record carries id, category, severity, count,
drilldownHref: string | null, and optional rule-specific meta.
Copy resolves from insights.items.<id> in
libs/shared/src/lib/i18n/dictionaries/{en,he,ru}.json. A null destination is
deliberate: the row does not pretend an unfiltered page represents its count.
Where available, bounded member/session samples or an existing inline queue
provide the action instead.
Who
| Caller | Access |
|---|---|
| Owner / admin HTTP request | Full 20-rule catalog, after active-membership and staff checks. |
| Coach HTTP request | Seven operations/engagement rules; finance, members, and leads rules are not evaluated. |
| Member / non-member HTTP request | Forbidden. |
Spotter analytics.org_insights | Read-only, owner/admin tool scope; calls the same service with its default owner role. This tool’s scope is distinct from the coach-accessible HTTP feed. |
Catalog
| Group | Rules | Audience |
|---|---|---|
| Finance | Outstanding debt, failed charges, pending refunds, failed join checkout | Owner/admin |
| Members | At-risk billing, expiring memberships, low credits, open retention cases, join never paid, presale withdrawal, recent churn, lapsed invitations | Owner/admin |
| Operations | Overdue tasks, sessions missing a workout, waitlisted members/bookings | All staff |
| Engagement | Missed check-ins, check-ins to review, missing forms, birthdays | All staff |
| Leads | Leads needing attention | Owner/admin |
The behavior catalog specifies all 20 identifiers, counts, severities, and exact destinations. Rules run concurrently, omit empty results, and sort urgent → warning → info, then count descending. Counts have rule-specific units: members, cases, tasks, sessions, transactions, or form occurrences. They are not interchangeable or a deduplicated total of people across the feed.
Owning surfaces
- Rows count each person once, use org-local day cutoffs, and either carry a
destination that shows exactly their population or a
nulldestination with named samples to act on. - The Reports workspace is a separate surface. Report KPIs stay in Reports.
- Tasks, Payments, and program-schedule URL hydration is unconditional.
- Open cancellation requests/notices belong to the
cancellation_reviewtask workflow, not the Members ending-roster filter. That filter remains separate membership context.
Related documentation
- Behavior — roles, catalog, counts, destinations.
- Data model — sources, count units, sample contracts.
- Code map — implementation and owning routes.
- QA plan — role, population, and navigation scenarios.
- Dashboard — Action Center → Today/tasks → trends → coaching roster composition.
Limits
- No per-org threshold customization, dismissal, or snooze.
- No historical trend per insight; every service call is a point-in-time read.
- No push subscription; the Action Center uses the query cache.
- No per-rule error isolation: a rule failure rejects the feed request.
- No latency or scale guarantee is established by these docs.