Scoped Client Dashboard Contract¶
LeafEnterprise produces dashboard-ready outputs for frontend and Domo-facing client experiences. The dashboard is downstream from the backend. It is not the source of calculation truth.
Required Inputs¶
A dashboard payload must be tied to a resolved backend scope:
| Field | Requirement |
|---|---|
pbm |
Canonical PBM value after alias normalization. |
tpa |
Canonical TPA/broker value after alias normalization. |
group_name |
Exact group when the output claims to be group-specific. |
start_date, end_date |
Analysis window used by source-row filters. |
run_id or source_request_number |
Backend lineage into report queue, ITR, or run ledger. |
If the backend cannot resolve one exact scope, the dashboard should show a blocked or needs-resolution state instead of rendering a confident savings result.
Output Contract¶
Dashboard consumers should use backend payloads from:
| Route | Dashboard use |
|---|---|
GET /api/client-report |
Main scoped savings/audit metrics, segmentations, top lists, report sections. |
GET /api/client-report/context |
Lineage, AI handoff, workbook readiness, deliverable posture. |
GET /api/optimize |
Evidence-first optimization recommendations and blocked evidence states. |
GET /api/filter-options |
Governed selectable scopes and available report-ready options. |
Parity Rules¶
The dashboard, workbook, PDF, and AI optimization outputs must agree on:
- selected PBM, TPA/broker, group, and date window,
- run lineage and request lineage,
- source-row filters,
- calculation basis,
- evidence sufficiency,
- blocked guarantee or rebate states.
If one artifact is not ready, the backend should expose that through deliverable status rather than letting the frontend infer readiness.
Domo-Facing Boundary¶
Domo-facing does not mean Domo-owned. If a Domo surface consumes LeafEnterprise output, it should consume scoped backend payloads or exported artifacts. It should not reimplement formulas, join raw client data outside the backend, or upgrade migration evidence into production authority.
When Domo-native cards or App Studio pages are used, Domo PDP must enforce dataset-level row/column entitlement. If the Domo surface calls LeafEnterprise APIs or uses generated artifacts, LeafEnterprise must independently enforce backend scope. See Domo Integration.
Agent Use¶
Agents building dashboard tools should generate MCP/API methods around scoped backend payloads, not around raw SQL or Domo card recreation. Tool descriptions should include the scope requirements and blocked-state behavior so agent plans do not produce cross-scope or unsupported savings claims.