Client Care Dashboard: Scheduler stats close rate does not match created orders

Objective

  • Align the Client Care Admin scheduler stats table so Close Rate is explainable from the same Created and Confirmed columns users scan.
  • Update how the Created count is defined or labeled so it includes scheduler-attributed open quotes that already feed the close-rate denominator, not only non-cancelled inspections.
  • Reduce support confusion when people sanity-check created versus confirmed against the displayed close rate.

Background

  • On the Client Care dashboard in Admin Attik, the scheduler stats table shows Close Rate, Created count, Confirmed count, and related columns. Josh feedback in the screenshot below shows numbers that do not line up with how close rate is computed.
  • Slack describes created versus confirmed on the scheduler stats table not matching close rate. The Created total should count quotes created by that scheduler as well as the inspection side of created, consistent with how close rate is built.
  • In attik-backend/src/routes/ccDashboard.ts, scheduler close rate mirrors main metrics using core confirmed over (core created inspections plus core open CSR quotes). The field exposed as ordersCreated is tied to inspection-only aggregation counts, so the table can look inconsistent even when internal rate math is consistent.

Scope

Backend

  • GET cc-dashboard/scheduler-metrics in attik-backend/src/routes/ccDashboard.ts builds per-scheduler buckets from CCINSPECTIONBASE_VIEW, merges by user via Membership, Inspector, and OfficeStaff, loads CSR open quotes (Quote.find with createdType csr, pending or rejected, no final inspection), and fills coreOpenQuoteMap for the close-rate denominator.
  • computeRates sets closeRate from createdCore plus coreOpenQuoteCount but ordersCreated from b.created (inspection-only). Reconcile displayed Created column, team averages, and per-company breakdown rows with that denominator or split columns per product.
  • Compare with GET cc-dashboard/metrics in the same file, where leadsCreated adds open-quote counts to the created basis for KPIs, so scheduler stats stay aligned with the main Client Care dashboard.

Frontend

  • CCDashboardClient.tsx loads scheduler data from cc-dashboard/scheduler-metrics; EmployeeTable.tsx in the same admin client-care-dashboard feature defines the Created column as ordersCreated and weights blended rates by ordersCreated.
  • If ordersCreated changes, update labels or tooltips and computeSubsetAverage team-average logic in EmployeeTable.tsx accordingly.
  • page.tsx in that folder is the server entry; SchedulerRow types live in the dashboard types module alongside those components.

Product

  • Decision needed on whether the Created column should match the full close-rate denominator (createdCore plus core open quotes), only the core inspection count, or whether the UI should show two numbers (for example inspections versus quotes).

Code entry points

  • attik-backend/src/routes/ccDashboard.ts
  • attik-frontend/src/app/admin/client-care-dashboard/CCDashboardClient.tsx
  • attik-frontend/src/app/admin/client-care-dashboard/_components/EmployeeTable.tsx
  • attik-frontend/src/app/admin/client-care-dashboard/_types.ts

References

https://attik-talk.slack.com/archives/C0AQFEHRWG6/p1775848670398299

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
🏠

Main App

Date

About 2 months ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.