SoS
harvest_sos()
Fetch Socrata API · map to lead schema ·
filter shells/non-domestic · temporal classify ·
milestone compute · dedup vs backlog + Zoho
cold
warm/renewal
UCC
import_ucc_csv()
Read 58-col CSV · map to lead schema ·
run Sellsat name match · flag orphans ·
set lead_type=ucc · dedup vs backlog + Zoho
ucc
│
SHARED
BACKLOG (data/backlog.json)
All lead types coexist · each tagged with lead_type (cold|renewal|ucc)
and harvest_source (sos|ucc_lien) · orphans flagged as outreach_orphan=true
· audit trail per lead · supports all lifecycle states
cold
warm
ucc
│
STAGE 1
SCORE
NAICS tier + recency + email domain + phone + location ·
UCC bonus: equipment value multiplier ·
Xerox displacement bonus ·
orphan penalty (no SoS data) ·
priority = score × readiness_weight
cold
warm
ucc
│
STAGE 2 — CONDITIONAL
ENRICH
Branches on lead_type. SoS cold/warm gets all existing 10 phases.
UCC gets a new enrich_ucc() variant:
SoS path (10 phases)
Filing detect · Domain · Website · Phone · Competitor · Brave · Prospeo · Equipment · Agent/Principal · Filing history
UCC path (5 phases)
Domain extract · Website check · Brave search · Competitor detect · UCC-lapsed framing · Skip Prospeo/Agent if orphan
cold
warm
ucc
│
STAGE 3 — CONDITIONAL
RESEARCH
Website scrape + Google Business via Brave · LLM analysis → structured findings ·
UCC orphans skip this stage (no website to research) ·
UCC matched leads get research if website exists
cold
warm
ucc w/ website
ORPHAN SKIP
│
STAGE 4
DRAFT
Same call_llm() engine · model fallback chain (DeepSeek → Qwen → Gemma → Mistral) ·
7 validation checks · branches on lead_type for prompt template:
cold prompt
"New business, here's who to call"
warm prompt
"Your contract is expiring, here's what's new"
ucc prompt
"Your equipment financing is expired, why lease when you can rent?"
cold
warm
ucc
│
STAGE 5
SEQUENCE (N×D Accordion)
Same schedule engine · exponential gap curve (~1.5x) · min 7d / max 45d ·
purposes rotate through: intro → value → proof → offer → urgency → close ·
now supports phone call touches (type=call) on configurable positions
cold presets
light_45 · standard_60 · deep_90 · extended_120 · urgent_21
warm presets
renewal_90 (4t/75d, service recovery tone)
ucc preset
ucc_45 (6t/45d, email touches 1,2,4,6 + calls 3,5)
cold
warm
ucc
│
STAGE 6 — GATE
APPROVE GATE
Interactive review queue · a=approve / b=burn / p=pause / d=delete / r=regen ·
filing-service email block · suppression check · placeholder validation ·
UCC leads can bypass gate via flag for fast push, or opt into review
SoS: GATE REQUIRED
UCC: GATE OPTIONAL (--skip-approval)
│
STAGE 7
PUSH TO ZOHO CRM
2-call split · branches on lead_type for fields + trigger:
cold
Lead_Source = "CT SoS" · Sequence trace · Touch_1-6 · Email_Draft_Body2 trigger
warm
Lead_Source = "Renewal" · Lease_End_Date · equipment fields · Renewal_Trace · Current_Touch_Body trigger
ucc
Lead_Source = "UCC Lien Data" · orphan tag in Description · LLMAnchor = equipment value · Email_Draft_Body2 trigger
│
DESTINATION
ZOHO CRM
All lead types land as Lead records · distinguishable by Lead_Source ·
emails sent via Zoho workflow on trigger field · replies tracked per lead
│
✓ SHARED SIDE BRANCHES — active for ALL lead types
LOOP
REPLY HANDLING
Poll Zoho → classify 5 ways · autoresponder=continue ·
hard opt-out=burn+suppress · soft opt-out=pause ·
bounce=flag · engagement=respond
REGISTRY
SUPPRESSIONS
Checked at 4 gates · auto-populated on opt-out ·
domain blacklist · applies to ALL new outreach
THROTTLE
SEND THROTTLE
Weekly spread + daily cap + score priority ·
UCC unthrottled by default (time-sensitive, like renewals)
INTEL
COMPETITIVE INTEL
Agent displacement rates · principal overlap ·
address clustering · now includes UCC displacement analytics
EXPORT
OUTSIDE SALES
No digital contact → county-grouped field lists ·
UCC orphans without email route here
COOLDOWN
COOLING PERIOD
120 days after sequence ends · then eligible for
new sequence · applies to ALL lead types
MORNING
MORNING BRIEF
Aggregate stats across all lead types · stale touches ·
reply backlog · campaign health · now includes UCC metrics
GLOBAL INTEL
OPERATOR INTEL
Per-lead + global intel injected into ALL drafts ·
UCC drafts benefit from competitive pricing intel
BACKFILL
BUSINESS ID BACKFILL
3-pass matching: address → name → token fuzzy ·
recovers SoS IDs for previously orphaned UCC leads
SHARED
Unified Lead Lifecycle
imported → scored → enriched → researched? → drafted → sequenced → approved? → pushed → sent
|→ burned → suppressed
|→ paused → resumed
|→ cooled → re-eligible
UCC bypasses research? and approved? when flags set