Qontak | Chatbot & AI | Unified Agent Quality Scorecard — Phase 3: Unified Analytics Report
Template: PHASE PRD v1.2 · Companion to PRD Section Reference v1.5 + Hierarchy v1.0 Note: Phase 3 of the Unified Agent Quality Scorecard initiative. Hybrid build: aggregate report = embedded Metabase (reusing the existing Service Quality Score Report infra); per-conversation drill-down = the Phase 2 in-room panel.
HEADER BLOCK
| Field | Value |
|---|---|
| PM | Dimas Fauzi Hidayat |
| PRD Version | 1.3 |
| Status | DRAFT |
| PRD Type | PHASE |
| Epic | QC-XXXXX — add once Epic is created |
| Squad | BOT — Bot, AI & Automation (with Data/Analytics) |
| RFC Link | Pending — RFC to follow via rfc-starter |
| Figma Master | Pending — report host page (Stitch prompt in Appendix A); Metabase dashboard design owned by Data/Analytics |
| Anchor | Qontak | Chatbot & AI | Unified Agent Quality Scorecard — ANCHOR |
| Labels | epic:qontak-chatbot-ai | module:chatbot-ai | feature:unified-agent-scorecard |
| Last Updated | 2026-06-19 |
Table of Contents
- HEADER BLOCK
- 2. CONDITIONAL BLOCK: PHASE CONTEXT
- 3. One-liner + Problem
- 4. What Happens If We Don't Ship This Phase
- 5. Target Users + Persona Context
- 6. Non-Goals
- 7. Constraints
- 8. New Features
- 9. API & Webhook Behavior
- 10. System Flow + User Stories + ACs
- 11. Rollout
- 12. Observability
- 13. Success Metrics
- 14. Launch Plan & Stage Gates
- 15. Dependencies
- 16. Key Decisions + Alternatives Rejected
- 17. Open Questions
- Appendix A — Stitch UI Prompt
- PRD CHANGELOG
2. CONDITIONAL BLOCK: PHASE CONTEXT
| Field | Detail |
|---|---|
| Anchor PRD | Qontak | Chatbot & AI | Unified Agent Quality Scorecard — ANCHOR |
| Phase | Phase 3 of 8 |
| Phase Goal | Ship the AI + human Agent Scorecard Report — KPI cards, per-agent trends, conversation drill-down, PDF/CSV export. |
| Prior phases | Phase 1 (shipped): scorecard settings + rubric config. Phase 2 (shipped): per-conversation AI auto-scoring (per actor/segment, with veto) + the in-room Scorecard panel. This phase aggregates the Phase 2 scores and reuses the Phase 2 panel as its drill-down. |
| Deferred to later phases | Validation/testing harness → Phase 4; go-live gate → Phase 5. |
| Cross-phase dependencies | (1) Phase 2 scores are the report's data source. (2) The Phase 2 in-room panel is the drill-down target. (3) The existing embedded-Metabase infra (get_metabase_report / get_iframe_url) is reused. (4) Data/Analytics builds the dashboard + warehouse pipeline. |
3. One-liner + Problem
One-liner: Give QA leads one report — AI and human agents on the same quality lens — with trends, drill-down to any conversation's score, and PDF/CSV export.
Problem: Phase 2 now scores every AI conversation and shows it in the in-room panel, but there is no aggregate view — a QA lead still cannot see team-level trends, compare AI against human, or hand leadership a report (the Enterprise NPS ask was verbatim: "team-level trends over time, SLA compliance dashboards, PDF export"). Today's reporting is embedded Metabase (the Service Quality Score Report), but it covers only the legacy human scorecard and carries no AI quality. Without this phase, AI scores stay locked to one-conversation-at-a-time review and the paid Scorecard still cannot prove ROI to a buyer.
4. What Happens If We Don't Ship This Phase
- The Enterprise reporting ask stays unanswered — a named NPS request since early 2026; every renewal cycle without it, those accounts keep assembling reports by hand and the dissatisfaction compounds.
- AI quality can't be proven at the account level — blocks the Q3 2026 ROI story for renewals/upsell; the paid Scorecard differentiator stays unprovable to buyers indefinitely.
- Phase 2's scores are underused — the per-conversation data accrues daily but stays invisible in aggregate, so the value of P1+P2 is capped until this ships.
5. Target Users + Persona Context
Primary Persona: QA Lead / Supervisor
| Field | Detail |
|---|---|
| Role | QA Lead or Supervisor accountable for conversation quality across human and AI agents |
| Goal | See team-level quality trends, compare AI vs human, and drill into any conversation's score — in one place |
| Pain | Phase 2 gives per-conversation scores but no aggregate; no trend, no comparison, no export |
| Workaround | Opening conversations one at a time in the inbox; manual spreadsheets for any trend |
Secondary Persona: CS Manager / Team Lead
| Field | Detail |
|---|---|
| Role | The manager who reports quality up to leadership |
| Goal | A leadership-ready report (trends + PDF) for weekly reviews — the exact NPS ask |
| Pain | "My management keeps asking for reports I can't generate" — no team-level trend or PDF export today |
| Workaround | Manually compiling numbers into slides each week |
6. Non-Goals
- Not the per-conversation scoring — Phase 2 produces the scores; this phase only aggregates them.
- Not the in-room panel — Phase 2 owns it; this phase reuses it as the drill-down target.
- Not the go-live gate — Phase 5.
- Not the validation/testing harness — Phase 4.
- Not a new BI/reporting engine — reuse the existing embedded-Metabase infra (Service Quality Score Report pattern).
- Not real-time streaming — the report reflects the warehouse refresh cadence (see Open Q#3), not live.
- No mobile — web only.
- Not a custom report-builder / ad-hoc query UI — a fixed unified dashboard this phase.
7. Constraints
| Field | Value |
|---|---|
| Platform | Web only — Qontak omnichannel web app |
| Performance | Embed-URL mint ≤ 500ms P95. Dashboard render is Metabase-side (not Qontak-controlled). Drill-down panel ≤ 2s P95 (Phase 2). |
| Data limits | Report reflects the 13-month aggregate retention (Phase 2 data lifecycle). Embed token: 10-minute expiry (existing pattern). |
| Plan scope | Professional + Enterprise only. Not Starter/Free. |
| Feature flag | ai_qa_unified_scorecard (report behind the same flag) + per-org dashboard config via system_preference / org settings (reusing the rollout_hologres_metabase_report pattern). |
| Read/write | Read: QA Lead/Supervisor (team scope), Bot/AI Admin (own agents), CS Manager (team). Export: same. No write — the report is read-only. |
7.1 Data Lifecycle
| Artifact Type | Retention Period | Cleanup Trigger | User-Visible Effect |
|---|---|---|---|
| Metabase embed token (signed JWT) | 10 minutes | exp claim TTL | Link expires; re-minted on next load |
| Export file (PDF/CSV) | Ephemeral — generated on demand by Metabase | Not persisted by Qontak | None |
| Aggregate score data (in warehouse) | 13 months (mirrors Phase 2) | Upstream TTL | Trend shows up to 13 months |
8. New Features
Feature: Agent Scorecard Report (host page)
| Field | Detail |
|---|---|
| URL | /chatbot/agent-scorecard/report |
| Access | QA Lead/Supervisor (team scope), Bot/AI Admin (own agents), CS Manager (team) |
Component Tree:
| Component | Parent | Purpose |
|---|---|---|
| AgentScorecardReportPage | — | Native host page for the embedded report |
| ReportHeader | AgentScorecardReportPage | Title, plan badge, "data as of" timestamp (warehouse freshness) |
| MetabaseEmbedFrame | AgentScorecardReportPage | Signed iframe — the aggregate dashboard: KPI cards (avg score, pass rate, containment, hallucination rate), per-agent table (AI/human badge + trend), filters (agent type, date, channel) |
| DrilldownLauncher | AgentScorecardReportPage | Handles a Metabase cell click-behavior → opens the native Phase 2 Scorecard drill-down for the selected conversation/actor |
The KPI cards, per-agent table, filters, and export all live inside the Metabase dashboard (owned by Data/Analytics). The native host provides the page chrome, the signed-embed plumbing, and the drill-down hand-off.
UI States:
| State | Description |
|---|---|
| Empty | Dashboard shows "No scored conversations yet" (Metabase); host shows a hint + link to Scorecard settings. |
| Loading | Skeleton while minting the embed URL and the iframe loads. |
| Error | "Couldn't load the report. Try again." + Retry (embed mint failed). Log: report_embed_failed. |
| Success | Embedded dashboard rendered; drill-down available. |
Figma: Pending host chrome (Stitch prompt in Appendix A). Metabase dashboard layout is owned by Data/Analytics.
📊 UI State Diagram — Agent Scorecard Report (host page)
stateDiagram-v2
[*] --> Loading: Open report page (mint embed URL)
Loading --> Success: Dashboard rendered
Loading --> Empty: Org has no scored conversations
Loading --> Error: Embed mint / iframe load fails
Error --> Loading: Retry
Empty --> [*]: Link to Scorecard settings
Success --> [*]: Drill into conversation / export
9. API & Webhook Behavior
Behavior 1: Get the unified scorecard report embed URL
| Field | Detail |
|---|---|
| Entity affected | Signed Metabase embed token/URL for the unified scorecard dashboard |
| Triggered by | User opens the Agent Scorecard Report page |
| Information passed | Org id; the dashboard config (group_code/code or dashboard_id) resolved via system_preference / org settings / env — reusing get_metabase_report / get_iframe_url |
| Expected behavior | Mint a signed JWT embed URL scoped to the org (10-minute exp) for the unified dashboard; return url + expires_in |
| Failure behavior | • Missing dashboard config → 422 (existing behavior). • Mint fails → error surfaced as the report Error state, report_embed_failed logged.• Expired token → re-minted on reload. |
Behavior 2: Deep-link from a dashboard cell into the native drill-down
| Field | Detail |
|---|---|
| Entity affected | Navigation from a Metabase dashboard cell → the native Phase 2 Scorecard drill-down |
| Triggered by | User clicks a conversation/agent row in the embedded dashboard (Metabase click-behavior → URL) |
| Information passed | room_id / score_record_id (+ actor) carried in the target Qontak URL |
| Expected behavior | The Qontak app opens the native Phase 2 in-room Scorecard panel (or drill-down route) for that conversation/actor |
| Failure behavior | • Unknown/expired record → "not found / expired" state. • Cross-frame navigation blocked → fallback to opening the conversation in the inbox. |
Claude resolves during RFC: HTTP method, path, request/response JSON schema, the Metabase click-behavior URL contract.
10. System Flow + User Stories + ACs
10.1 System Flow
Flow: Open the Unified Report and Drill Into a Conversation Type: User Journey + API Sequence
- A QA Lead opens /chatbot/agent-scorecard/report.
- FE requests the embed URL; BE resolves the org's unified-scorecard dashboard config (
system_preference/ org settings / env) and mints a signed JWT scoped to the org (10-minexp). - FE embeds the Metabase dashboard iframe → KPI cards + per-agent table + filters render.
- The QA Lead filters (agent type AI/human, date, channel) inside the dashboard.
- The QA Lead clicks a conversation/agent row → Metabase click-behavior fires a URL into the Qontak app (carrying
room_id/score_record_id). - The app opens the native Phase 2 Scorecard drill-down (9-metric + reasons + sources + veto + transcript) for that conversation/actor.
- The QA Lead exports the dashboard (Metabase PDF/CSV) for leadership.
- Failure branch — if the embed mint fails (missing config / error), the host shows "Couldn't load the report" + Retry and logs
report_embed_failed.
📊 System Flow — Report + Drill-Down
sequenceDiagram
participant QA as QA Lead
participant FE as Qontak FE
participant BE as Qontak BE
participant MB as Metabase
QA->>FE: Open report page
FE->>BE: Request embed URL
BE->>BE: Resolve org dashboard config + mint signed JWT (10-min exp)
BE-->>FE: url + expires_in
FE->>MB: Embed iframe (org-scoped dashboard)
MB-->>QA: KPI cards + per-agent table + filters
Note over BE,FE: Mint fails → "Couldn't load" + Retry, log report_embed_failed
QA->>MB: Click a conversation row
MB->>FE: Click-behavior URL (room_id / score_record_id)
FE->>QA: Open native Phase 2 drill-down (metrics + reasons + sources)
QA->>MB: Export (PDF / CSV)
10.2 User Stories
[P3-S01] — View the unified AI + human scorecard report
| User Story | As a QA Lead, I want one report showing AI and human agents on the same quality lens with trends, so that I can see team performance and compare at a glance. |
| Before State | Only the legacy human Service Quality Score Report (embedded Metabase) exists — no AI quality; Phase 2 per-conversation scores have no aggregate view. |
| After Delta | A new report page embeds the unified Metabase dashboard (org-scoped signed iframe) with KPI cards, a per-agent AI/human table, trends, and filters. |
| Importance | Must Have |
| Mockup / Technical Notes | Figma: Pending — Appendix A Stitch prompt Data Fields: • organization_id (string, required) — Auth session• dashboard_config (object, required) — from system_preference / org settings / env• user_role (string, required) — Auth sessionTechnical Notes: Reuses get_metabase_report / get_iframe_url; signed JWT, 10-min exp, org-scoped. |
| Acceptance Criteria | — Happy Path — • AC-1: Given a QA Lead with the flag ON opens the report page, when it loads, then BE mints a signed org-scoped embed URL and the dashboard renders in the host. • AC-2: Given the dashboard, when the QA Lead filters by agent type = AI, then the dashboard scopes to AI agents (filter handled in Metabase). — Edge — • AC-3: Given an org with no scored conversations yet, when the report loads, then the dashboard shows an empty state and the host shows a link to Scorecard settings. — Error / Unhappy Path — • ERR-1: Given the embed mint fails (missing dashboard config or error), when the page loads, then "Couldn't load the report. Try again." + Retry is shown and report_embed_failed is logged.• ERR-2: Given the embed token expired (10-min), when the user returns, then the FE re-mints transparently on reload. — Permission Model — • CAN: QA Lead/Supervisor (team), Bot/AI Admin (own), CS Manager (team). • CANNOT: end CS agents. • Unauthorized: route not in nav; direct access returns the standard not-authorized view. — UI States — • Loading: skeleton while minting + iframe loads. • Empty: dashboard empty state + settings link. • Error: as ERR-1. • Success: embedded dashboard rendered. — Negative Scenarios — • NEG-1: Given a Starter/Free org, when a user navigates to the report URL, then it is not available (plan-gated; not rendered). |
Dependencies: Phase 2 scores; Data/Analytics dashboard — see S15.
[P3-S02] — Drill from the report into a conversation's score
| User Story | As a QA Lead, I want to click a row in the report and see that conversation's full score, so that I can investigate why an agent scored low. |
| Before State | No path from the aggregate to a per-conversation score; the drill-down only exists in the inbox panel (Phase 2). |
| After Delta | A Metabase cell click-behavior deep-links into the native Phase 2 Scorecard drill-down for the selected conversation/actor. |
| Importance | Must Have |
| Mockup / Technical Notes | Figma: Reuses the Phase 2 panel Data Fields: • room_id (string, required) — clicked row• score_record_id (uuid, required) — clicked row• actor_id (string, required) — clicked rowTechnical Notes: Metabase click-behavior → Qontak URL (see Open Q#1 for the cross-frame deep-link mechanism). |
| Acceptance Criteria | — Happy Path — • AC-1: Given the report is open, when the QA Lead clicks a conversation row, then the native Phase 2 Scorecard drill-down opens for that conversation/actor with the 9-metric breakdown + reasons + sources + veto. • AC-2: Given a multi-actor room, when the QA Lead drills in, then the actor whose row was clicked is preselected. — Edge — • AC-3: Given the transcript snapshot is past 90-day retention, when drilled in, then scores render but the transcript reads "expired". — Error / Unhappy Path — • ERR-1: Given the target record is unknown/expired, when drilling in, then a "not found / expired" state is shown. • ERR-2: Given cross-frame navigation is blocked, when the cell is clicked, then the app falls back to opening the conversation in the inbox. — Permission Model — • CAN: QA Lead/Supervisor (team), Bot/AI Admin (own). • CANNOT: end CS agents (cannot open others' scores). • Unauthorized: link does not resolve. — UI States — • Loading: opening drill-down. • Empty: N/A. • Error: "not found / expired". • Success: drill-down shown. — Negative Scenarios — • NEG-1: Given an end CS agent, when a drill-down URL is opened, then it does not resolve to another agent's score. |
Dependencies: P3-S01; Phase 2 in-room panel.
[P3-S03] — Export the report (PDF / CSV)
| User Story | As a CS Manager, I want to export the report to PDF or CSV, so that I can share AI + human quality with leadership. |
| Before State | No export of AI quality; numbers are compiled into slides by hand. |
| After Delta | Metabase's native export (PDF/CSV) of the filtered dashboard. |
| Importance | Should Have |
| Mockup / Technical Notes | Figma: Metabase-native export Data Fields: • filter_scope (object) — current agent type/date/channel• format (enum pdf|csv) — user choice |
| Acceptance Criteria | — Happy Path — • AC-1: Given the report is open with filters applied, when the CS Manager exports as PDF, then a PDF of the filtered view is generated. • AC-2: Given CSV is chosen, when exporting, then a CSV of the underlying aggregate is generated. — Edge — • AC-3: Given no data in the filtered range, when exporting, then an empty-report notice is shown instead of a broken file. — Error / Unhappy Path — • ERR-1: Given the export fails (too large / Metabase error), when exporting, then an error + Retry is shown and report_export_failed is logged.— Permission Model — • CAN: QA Lead/Supervisor, Bot/AI Admin, CS Manager. • CANNOT: end CS agents. • Unauthorized: export control not rendered. — UI States — • Loading: "generating…". • Empty: N/A (covered by AC-3). • Error: as ERR-1. • Success: file ready. — Negative Scenarios — • NEG-1: Given a Starter/Free org, when the report is unavailable, then no export control exists. |
Dependencies: P3-S01.
11. Rollout
| Field | Value |
|---|---|
| Feature flag | ai_qa_unified_scorecard — report behind the same flag; dashboard resolved per-org via system_preference / org settings (the rollout_hologres_metabase_report pattern) |
| Stage 1 | Internal QA: 3–5 internal accounts — validate dashboard data vs the in-room panel + drill-down deep-link |
| Stage 2 | Closed beta: TransGo, Talenta LMS + 3 partners |
| Stage 3 | All Professional + Enterprise on request |
| GA | All Professional + Enterprise (flag on) |
| Backward compat | Yes — the legacy Service Quality Score Report (human-only) is unaffected; this is a separate unified dashboard |
| Migration | None to existing records. New: a unified Metabase dashboard + the warehouse pipeline feeding it (Data/Analytics). |
12. Observability
Key Events:
| Event Name | Trigger | Properties |
|---|---|---|
report_viewed | Report page opened | org_id, user_role, dashboard_id |
report_embed_failed | Embed URL mint / iframe load failed | org_id, reason |
report_drilldown_opened | A conversation drill-down opened from the report | org_id, room_id |
report_export_generated | Export produced | org_id, format |
report_export_failed | Export failed | org_id, reason |
| Field | Detail |
|---|---|
| Dashboard owner | Bot, AI & Automation (squad: BOT) + Data/Analytics (warehouse + Metabase) |
| Alert 1 | report_embed_failed rate > 5% of views in 1h → Slack: #bot-ai-oncall |
| Alert 2 | Warehouse data freshness lag > the agreed threshold (Open Q#3) → Slack: #data-oncall |
12.1 Post-Launch Monitoring Cadence
| Field | Detail |
|---|---|
| Review cadence | Weekly for the first 4 weeks post-GA, then monthly |
| Owner | Dimas Fauzi Hidayat (PM) + BOT + Data/Analytics |
| Review scope | report_viewed, report_embed_failed, report_drilldown_opened, report_export_generated, data freshness lag |
| Trigger threshold 1 | report_embed_failed > 5% week-over-week → investigate embed config / Metabase |
| Trigger threshold 2 | Report adoption < 20% of enrolled accounts after 4 weeks → revisit entry-point discoverability |
| Rollback consideration | If embed failures persist > 48h, PM disables the report flag for affected orgs pending fix. |
13. Success Metrics
Adoption & Usage:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| ⭐ Report adoption | % of enrolled Pro+Ent accounts viewing the report monthly | N/A — new surface | ≥50% within 60 days of GA |
| Drill-down usage | % of report sessions that open a conversation drill-down | N/A | ≥30% within 60 days of GA |
Quality & Accuracy:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| Report–panel consistency | Sampled checks where the dashboard aggregate matches the in-room panel scores | N/A | 100% match on the alpha validation sample |
Efficiency & Impact:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| Leadership exports | # report exports per month (the NPS ask) | 0 — manual spreadsheets | Tracked; ≥1 export/month per active CS Manager within 90 days of GA |
14. Launch Plan & Stage Gates
| Stage | Audience | Duration | Success Gate to Advance | Owner |
|---|---|---|---|---|
| Internal Alpha | 3–5 internal QA accounts | 2 weeks | Dashboard aggregate matches the in-room panel on the validation sample; drill-down deep-link works; report_embed_failed ≤2% | PM + QA + Data |
| Closed Beta | TransGo, Talenta LMS + 3 partners | 2 weeks | ≥1 export by a CS Manager; no P0; data freshness within agreed lag | PM + BOT |
| Open Beta | All Pro+Ent on request | 2 weeks | Report adoption ≥30% of enrolled; drill-down used; no P0 for 2 weeks | Eng Lead |
| GA | All Pro+Ent | Ongoing | All Open Beta gates sustained 2 weeks; PMM launch approved | PM + PMM |
15. Dependencies
| Dependency | Owning Team | Deliverable Needed | Blocking? |
|---|---|---|---|
| Unified Metabase dashboard + warehouse pipeline | Data / Analytics | A dashboard (KPIs, per-agent AI/human table, trends, filters) + the Hologres ETL feeding it from the agent_scorecard AI+human scores | YES |
| Phase 2 scoring (data source) | BOT (Phase 2) | Per-conversation AI scores in production | YES |
| Phase 2 in-room panel (drill-down target) | BOT (Phase 2) | The native drill-down the report links into | YES |
| Existing Metabase embed infra | BOT (existing) | BE get_metabase_report / get_iframe_url and the live FE pattern hub-chat features/report/quality_scoring/QualityScoringPage.vue calling GET /api/gpt/v1/reports?group_code=metabase_report&code=sqs — cloned with a new code | NO — already shipped |
| Metabase click-behavior → deep-link | Data/Analytics + FE | Dashboard cell click → Qontak URL carrying room_id/score_record_id | YES |
| Design / UX | Design squad | Report host-page chrome + nav entry | YES |
16. Key Decisions + Alternatives Rejected
8a — Decisions Made
| Date | Decision | Rationale |
|---|---|---|
| 2026-06-19 | Hybrid build: aggregate report = embedded Metabase; per-conversation drill-down = the native Phase 2 panel | Reuses the shipped reporting infra (consistent with the Service Quality Score Report) and avoids reinventing the drill-down; Metabase can't render per-conversation reasons/source-links/veto, but the Phase 2 panel already does |
| 2026-06-19 | Reuse the existing embed-iframe pattern (signed JWT, org-scoped, per-org dashboard via system_preference) | No new reporting engine; lowest build cost; matches current behavior |
| 2026-06-19 | Drill-down via a Metabase cell click-behavior → Qontak deep link → native panel | Bridges the embedded dashboard to the rich in-app drill-down without rebuilding it in Metabase |
| 2026-06-19 | Clone the live QualityScoringPage.vue pattern (Metabase iframe via GET /api/gpt/v1/reports?code=…) with a new report code | Verified in cloned hub-chat — the embed pattern is already shipped for the Service Quality Score report; lowest build cost and proven |
8b — Alternatives Rejected
| Alternative | Why Rejected | Date |
|---|---|---|
| Native in-product report (build the whole screen + API) | More build cost; duplicates the existing reporting infra for no added value over Metabase aggregates | 2026-06-19 |
| Metabase-only (including the drill-down) | Metabase can't elegantly render the 9-metric reasons, cited source links, veto flags, or transcript — poor drill-down UX | 2026-06-19 |
| Adopt a new BI tool | Unjustified — Metabase is the established Qontak reporting standard | 2026-06-19 |
17. Open Questions
| # | Type | Question | Owner | Deadline |
|---|---|---|---|---|
| 1 | Risk | How does the Metabase dashboard cell deep-link into the native drill-down across the iframe boundary (click-behavior → URL → Qontak route)? Mitigation: prototype the click-behavior→URL in Internal Alpha; fallback = open the conversation in the inbox (P3-S02/ERR-2). | Data/Analytics + FE | 2026-07-15 |
| 2 | Open Question | The live report fetches code=sqs (Service Quality Score = the human scorecard). The unified AI+human report = a new report code (e.g. ai_sqs) → a new Metabase dashboard. Confirm the dashboard id/code with Data/Analytics. | Data/Analytics | 2026-07-15 |
| 3 | Risk | Warehouse ETL cadence (real-time vs nightly) determines whether the report lags the in-room panel. Mitigation: define an acceptable lag (proposed ≤1h) and show a "data as of" timestamp; confirm pipeline cadence with Data. | Data/Analytics | 2026-07-15 |
| 4 | Assumption | The existing get_metabase_report / system_preference config can host a second (unified) dashboard without code changes. | BOT | 2026-07-01 |
Appendix A — Stitch UI Prompt
Generated for the native host chrome only — the dashboard interior is owned by Data/Analytics in Metabase. Use in Stitch; hand to Design.
=== SHARED PREAMBLE ===
Product: Mekari Qontak — Omnichannel
Users: QA Lead / Supervisor, CS Manager, Bot/AI Admin
Design tone: Enterprise B2B SaaS — clean white surfaces, purple accent; match the existing Qontak reports shell
Persistent UI: left icon rail + top bar
=== END PREAMBLE ===
| # | Screen | Stitch Prompt (paste in full after the preamble) |
|---|---|---|
| 1 | Agent Scorecard Report — host page | Screen: the Agent Scorecard Report page that hosts an embedded Metabase dashboard. Purpose: QA Lead/CS Manager views unified AI + human quality and drills into a conversation. Components: a report header (title "Agent Scorecard Report", plan badge, a small "data as of [timestamp]" label); a large embedded-dashboard area (show a representative Metabase-style dashboard: 4 KPI cards across the top — avg score, pass rate, containment, hallucination rate — then a per-agent table with an AI/human badge column and a trend sparkline, with filter chips for agent type / date / channel); the rows are clickable to drill down. Generate states: Loading (skeleton header + skeleton dashboard block); Empty ("No scored conversations yet" inside the dashboard + a "Configure in Scorecard settings" link in the host); Error ("Couldn't load the report. Try again." + Retry); Success (full dashboard). Do NOT include: an in-app chart builder, the per-conversation drill-down panel (that's the Phase 2 panel, opened on row click), mobile layout. |
PRD CHANGELOG
| Version | Date | By | Section | Type | Summary |
|---|---|---|---|---|---|
| 1.0 | 2026-06-19 | Claude | All | CREATED | Phase 3 PRD (Unified Analytics Report) — hybrid: embedded Metabase aggregate (reusing the Service Quality Score Report infra) + Phase 2 native drill-down. |
| 1.1 | 2026-06-19 | Claude | S6, S1b | MODIFIED | Post-score polish: added the report host-page UI-state diagram and time horizons to "What Happens If We Don't Ship". |
| 1.2 | 2026-06-19 | Claude | CB | MODIFIED | Phase count 7→8 (added the parked Phase 8: multi-agent + selectable scorecard to the ANCHOR). |
| 1.3 | 2026-06-19 | Claude | S15, S16, S17 | MODIFIED | hub-chat grounding: cited the live QualityScoringPage.vue + code=sqs embed pattern (cloned with a new code); answered Open Q#2 with the new-report-code mechanism + a decision. |