Medium Dashboards system

CRM Data Hygiene Board

A data-quality board that scores the CRM on the things that quietly break reporting — duplicate leads, missing required fields, blank owner, invalid email/phone, stale statuses, and contradictory booking states — listing the actual offending records so they can be fixed. It exists because every other analytics view is only as good as the underlying data. It measures and lists hygiene problems; it does not auto-edit records.

5 to 9 days
timeline
Medium
complexity
4
tools
4
steps

Built with real HMX dashboard tool paths

Supabase PostgresSQL (dedup / validation)Existing lead-duplicate logicNext.js 16 server componentsSupabase PostgresSQL (dedup / validation)Existing lead-duplicate logicNext.js 16 server components

01 // System facts

System facts

CRM Data Hygiene Board uses a reporting model and review layer for Dashboards. A data-quality board that scores the CRM on the things that quietly break reporting — duplicate leads, missing required fields, blank owner, invali... The architecture connects the hygiene rules with the, supabase postgres, sql, and owner review with an explicit control path.

Outcome

Dirty data becomes a visible, shrinking worklist instead of an invisible tax on every report — fewer duplicates, fewer blank-owner leads, and reporting numbers you can actually defend.

Main risk

Over-eager rules flag legitimate records (false-positive duplicates, valid-but-unusual values), creating busywork and eroding confidence in the board.

Prevention

Reuse the proven duplicate-matching rules, tune thresholds against a real sample, and make every flag drill down to the exact record so a human confirms before any change.

Fallback

If a rule is too noisy, demote it to informational-only (counted but not part of the score) and keep the high-precision rules (true dupes, missing owner) driving the score until it's tuned.

System architecture

CRM Data Hygiene Board Architecture

6 nodes
the hygiene rules with the
SQL that counts violations
Supabase Postgres
SQL
Review Queue
Owner Review
  1. 01the hygiene rules with the

    A data-quality board that scores the CRM on the things that quietly break reporting — duplicate leads, missing required fields, blank owner, invali...

  2. 02SQL that counts violations

    Write SQL that counts violations per rule and returns the offending rows (or row ids) for each, plus an overall hygiene score (clean records / total).

  3. 03Supabase Postgres

    Supabase Postgres contributes the trusted model for CRM Data Hygiene Board so metrics are defined before they are visualized.

  4. 04SQL

    Build a board (server component) with one card per rule showing the count, trend, and a drill-down list of bad records with a link to fix in the CRM/admin.

  5. 05Review Queue

    If a rule is too noisy, demote it to informational-only (counted but not part of the score) and keep the high-precision rules (true dupes, missing...

  6. 06Owner Review

    Dirty data becomes a visible, shrinking worklist instead of an invisible tax on every report — fewer duplicates, fewer blank-owner leads, and repor...

How it is built

Build steps

A data-quality board that scores the CRM on the things that quietly break reporting — duplicate leads, missing required fields, blank owner, invalid email/phone, stale statuses, and contradictory booking states — listing the actual offending records so they can be fixed. It exists because every other analytics view is only as good as the underlying data. It measures and lists hygiene problems; it does not auto-edit records.

  1. 01Define the hygiene rules with the owner: duplicate detection key (email/phone/submission id, reusing the existing lead-duplicate logic), required-field set, valid-format checks, and 'impossible state' combos (e.g. booked but no booking timestamp).
  2. 02Write SQL that counts violations per rule and returns the offending rows (or row ids) for each, plus an overall hygiene score (clean records / total).
  3. 03Build a board (server component) with one card per rule showing the count, trend, and a drill-down list of bad records with a link to fix in the CRM/admin.
  4. 04Add a refreshed-on-schedule snapshot so the hygiene score is trended over time and a regression (score dropping) becomes a flagged review item.

Tools

Workflow surface

  • Supabase Postgres
  • SQL (dedup / validation)
  • Existing lead-duplicate logic
  • Next.js 16 server components
  • Inputs layer: Define the hygiene rules with the owner: duplicate detection key (email/phone/submission id, reusing the existing lead-duplicate logic), required-field set, valid-format checks, and 'impossible state' combos (e.g. booked but no booking timestamp).
  • Transform layer: Write SQL that counts violations per rule and returns the offending rows (or row ids) for each, plus an overall hygiene score (clean records / total).
  • Metrics layer: Supabase Postgres contributes the trusted model for CRM Data Hygiene Board so metrics are defined before they are visualized.
  • Visualization layer: SQL (dedup / validation) handles refresh, review, or reporting delivery while reuse the proven duplicate-matching rules, tune thresholds against a real sample, and make every flag drill down to the exact record so a human con...
  • Action layer: Dirty data becomes a visible, shrinking worklist instead of an invisible tax on every report — fewer duplicates, fewer blank-owner leads, and repor...

Data flow

  1. 01Define the hygiene rules with the owner: duplicate detection key (email/phone/submission id, reusing the existing lead-duplicate logic), required-field set, valid-format checks, and 'impossible state' combos (e.g. booked but no booking timestamp).
  2. 02Write SQL that counts violations per rule and returns the offending rows (or row ids) for each, plus an overall hygiene score (clean records / total).
  3. 03Build a board (server component) with one card per rule showing the count, trend, and a drill-down list of bad records with a link to fix in the CRM/admin.
  4. 04Add a refreshed-on-schedule snapshot so the hygiene score is trended over time and a regression (score dropping) becomes a flagged review item.

Controls and fallbacks

  • Over-eager rules flag legitimate records (false-positive duplicates, valid-but-unusual values), creating busywork and eroding confidence in the board.
  • Reuse the proven duplicate-matching rules, tune thresholds against a real sample, and make every flag drill down to the exact record so a human con...
  • If a rule is too noisy, demote it to informational-only (counted but not part of the score) and keep the high-precision rules (true dupes, missing...