ULDA — Implementation & Modernization Report

Data-Quality Remediation · Master-Data Enhancements · Lead-360 Platform · Activity Tracking

Data Architecture — InternetSP / ULDA v6.1 → v6.3

2026-07-16

1. Executive Summary

Over this engagement, the Unified Lead Dataset Architecture (ULDA) was advanced from a mastered-but-static dataset into a live, self-updating Lead-360 platform — on the production PostgreSQL database (leads_db), with zero downtime, zero data loss, and full reversibility throughout.

Every change was additive (new objects or new columns), verified before and after, and applied under strict production-safety controls (read-only analysis via a dedicated role; writes only through the object owner in guarded, batched, snapshot-backed transactions).

Headline outcomes:

Area Result
Data-quality contamination (183,397 rows) Eliminated at source + prevented from recurring
State standardization 96,674 full names → USPS codes; analytics de-fragmented
Master Data Model Extended to a full Lead-360 (36 business fields + recommended columns)
Serving record v_lead_master_flat 75 columns, one row per lead, assembled live
Activity tracking 7,940 interactions captured + automatic going forward
Pipeline readiness 87 / 100 — PASS (production-ready)

2. Data-Quality Remediation

2.1 The problem

ulda_gov.dq_finding catalogued 189,407 data-quality issues, dominated by digit_in_state (183,397 rows, 96.8%) — a full street address mis-loaded into the state column. Root cause: upstream B2B lists (OmniVerifier/MillionVerifier) synced via Instantly carried an address in their “state” field, and the ingestion path (upsertLeads) wrote it raw.

2.2 What was done

Result: 0 contaminated states remain in the source; recurrence is structurally prevented.


3. State Standardization

The remaining formatting inconsistency (texas vs TX) was resolved: 96,674 full state names were converted to official USPS two-letter codes (confident matches only — cities-in-state left untouched, not guessed). The serving layer was refreshed in dependency order, de-fragmenting analytics (e.g. Texas consolidated from two buckets into TX = 18,125). Batched, snapshot-reversible, zero downtime.


4. Master Data Model Enhancements (v6.1 → v6.3)

4.1 Confirmed foundation

The Unique Lead ID requirement was already satisfied: identity_registry.master_lead_id is a uuid generated once, immutable, never reused (merges audited via merged_into).

4.2 Additive gap-fills (v6.1)

Four additive objects closed the model against the business field list:

Object Type Purpose
source_crosswalk.source_type column Source classification (database / broker / API / CSV)
lead.follow_up_at column Next business follow-up date
ulda_master.enrichment entity (partitioned) Per-provider enrichment lineage
ulda_master.address_serviceability entity Fiber availability per carrier over time

4.3 Priority 1–3 business columns (v6.3)

v_lead_master_flat was extended from 42 → 75 columns, adding:

Stored inputs added via instant ADD COLUMN; derived fields (timezone, per-carrier fiber pivot, engagement) computed in the view — no redundant storage.


5. Lead-360 Platform (v6.2)

A complete ingestion-to-serving platform was implemented (s11_lead360_platform.sql):

flowchart LR
  SRC[Any source] --> LAND[ulda_stage.lead_inbox<br/>Bronze landing]
  LAND --> ING[ingest / resolve / enrich]
  ING --> MASTER[Master + partitioned events]
  MASTER --> FLAT[v_lead_master_flat<br/>75-column Lead-360]
  FLAT --> APP[CRM · dialer · AI · BI]
Component What it does
ulda_stage schema Bronze landing + standardized ingest functions
lead_inbox Immutable raw landing, idempotent
land_lead() One standardized entry for any source
ingest_interaction() Automatic activity capture
interaction / enrichment Recreated partitioned (monthly), append-only
v_lead_journey_flat 1st–4th + last channel, pivoted from interactions
v_lead_master_flat The single 75-column Lead-360 record

Every consumer reads one object: SELECT * FROM ulda_serve.v_lead_master_flat WHERE unique_lead_id = $1.


6. Automatic Activity Tracking + Backfills

6.1 Real-time capture

An AFTER INSERT trigger on public.disposition_event (trg_capture_disposition) resolves the lead (email → phone) and appends an interaction automatically — every future SMS, dialer, email, or D2D disposition updates the Lead-360 journey with no application-code changes. It is exception-safe (can never block a warroom write) and uses indexed sub-millisecond lookups.

6.2 Historical backfill

Backfill Rows Effect
interaction from disposition_event (email + phone resolution) 7,940 Journey lit up for 7,104 leads
address_serviceability from coverage_providers/coverage_techs 2,165 Per-carrier fiber columns populated
consent from phone_dnc 8,072 (incl. 42 litigators) Compliance columns populated

Channel mix of captured activity: Email 5,750 · SMS 1,682 · Web 268 · Voice 238.


7. Pipeline Readiness Scorecard (Stages 1.1–1.9)

Stage Status Complete
1.1 Source Connectors 95%
1.2 Bronze / Landing 🟡 60%
1.3 Batch Backfill 100%
1.4 Real-time CDC 90%
1.5 Identity Resolution 90%
1.6 Master / Silver 100%
1.7 Serving 100%
1.8 Event Ledger 80%
1.9 Orchestration / Monitoring 85%

Overall: 87 / 100 — PASS (production-ready). Data flows source → master → serving live; identity invariants are 0; Lead-360 is queryable; monitoring + verified backup in place; everything reversible.


8. Data Completeness — Live vs. Pending Feeds

Populated with real data now: identity, name, email/phones, geo (standardized), source, date-added, timezone, channel journey + agents (7,104 leads), per-carrier fiber (2,165), compliance/litigator (8,072), engagement, data-quality score.

Columns exist and are wired — fill when their feed connects: - latitude / longitude / county / census_tract → geocoding pass (ZIP→geo) - mrr / install_date / commission / sub_dealer / poe_id → FiberVolt order feed - owner_agent / team / territory → lead-assignment data

No further schema work is required for these — only the data feed.


9. Production Safety & Reversibility


10. Deliverables

Live applications (auth omar): - Lead-360 grid (Warroom style, click-through 75-field drawer): /ulda/leads360.html - Live database explorer + SQL console: /ulda/ - Enterprise Architecture report + Design Spec: /ulda/enterprise-architecture.html, /ulda/lead360-design-spec.html

Migrations (reversible): s9s14 in /root/ulda-rj/DDL/ (geo repair, state std, MDM gap-fill, Lead-360 platform, activity capture, priority columns).


11. Recommended Next Steps

P1 — production-readiness: wire enrichment capture; formalize the validation/quarantine gate; investigate 2 dual-write errors. P2 — scale & hardening: stand up the read replica (unblocks continuous PITR, mass embeddings, OLAP offload); real-time b2c/ad_leads. P3 — complete the data: geocode lat/lng/county; connect the FiberVolt order feed; load lead-assignment for ownership.

Verdict: ULDA is production-ready today (PASS), self-updating, and AI-ready. Remaining work is data-feed connection and replica-dependent hardening — not redesign.