Architecture Note · Operations & RevOps
Deterministic Customer Health Scoring & Churn-Prevention Controls
Why prompt-driven retention bots misread quiet accounts and risk unapproved executive outreach—and how weighted SQLite scoring, HTTP 409 human sign-off gates, and formula-safe NRR reporting keep renewal operations auditable.
The Operational Problem: Quiet Churn Inside the 120-Day Window
Enterprise Customer Success teams rarely lose renewals from a single obvious outage. Churn arrives quietly inside the 0–120 day renewal window: weekly active usage collapses by 40% while zero support tickets are logged, an executive sponsor changes roles, or an accounts-payable hold stalls an invoice past net terms. When CRM notes, Zendesk escalations, product telemetry, and billing aging live in separate spreadsheets, CSMs discover the problem only when procurement declines the renewal quote. At the same time, high-ARR accounts concentrate on overloaded regional CSMs above 85% weekly capacity, delaying executive business reviews (EBRs) until save probability drops.
Why Naive AI Wrappers Fail Retention Operations
Dropping an LLM prompt on top of raw CRM exports introduces four structural failures into renewal workflows:
- Nondeterministic health math: Asking a model to summarize an account into a “red/amber/green” label produces drifting scores across runs. A VP of Customer Success cannot compare 30-day trend deltas or calibrate segment weights if the scoring function itself is stochastic.
- Blindness to silent-usage drops: Chat summaries overweight recent noisy support tickets while overlooking low-ticket accounts whose DAU/WAU has collapsed—the classic silent-churn signature.
- Unsupervised customer outreach: Auto-sending AI-drafted executive emails, outbound calls, or SMS blasts when a score dips risks citing stale invoice figures to a CFO or messaging a sponsor who already left the company.
- Uncontrolled data egress and unverified retention math: Uploading customer ARR ledgers, NPS comments, and contact rosters to external third-party APIs widens exposure without leaving a verifiable GRR/NRR bridge or tamper-evident approval record.
The Deterministic Architecture That Fixes It
A production churn-prevention control plane separates deterministic telemetry scoring, explicit capacity accounting, and mandatory human sign-off before any customer outreach occurs.
- Weighted five-signal scoring in SQLite WAL mode:
POST /api/health/computeingests single accounts, JSON batches, ormultipart/form-dataCSV/JSON uploads and computes normalized 0–100 composite scores across five explicit dimensions:product_adoption(30% default),support_severity(20%),sponsor_turnover(20%),nps_csat(15%), andinvoice_timeliness(15%). Scores classify accounts into deterministic tiers (Critical<55, Watch55–74, Healthy≥75in the interactive sandbox; persisted withat_riskgranularity and historical trend deltas in SQLite). Ephemeral batch uploads inCS_UPLOAD_DIRauto-wipe after 3,600 seconds. - Rule-based early-warning radar: Rather than guessing risk from prose, deterministic detectors flag
silent_usage_drop(e.g., DAU/WAU change ≤-25%alongside0–2open tickets),sponsor_departure(departed, role-changed, or unresponsive champion), Sev-1/invoice-aging stress, andrenewal_120d_risksegmented into 0–30d, 31–60d, 61–90d, and 91–120d cohorts. - Playbook staging with HTTP 409 human CSM gates:
POST /api/playbooks/triggerstages anebr_prep_brief,executive_alignment_alert, oradoption_workshopdraft (defaulting toOfflineDeterministicAdapter) inpending_csm_reviewstate alongside regionalcsm_capacityload tracking (evaluating 40-hour weekly budgets with risk-adjusted effort hours and≥85%overload alerts). CallingPOST /api/playbooks/{id}/dispatchwithout an explicitPOST /api/playbooks/{id}/approvefails closed with HTTP 409 Conflict. Outreach policy permits inbound-only voice and verified Official WhatsApp Business Cloud API threads only—zero outbound AI calls or unsolicited SMS. - Renewal forecasting, formula-safe exports, and hash-chained audits:
POST /api/renewals/forecastpersists CSM-adjusted confidence, save outcomes, and expansion/contraction ARR inrenewal_forecasts.GET /api/portfolio/nrrcomputes segment and region GRR/NRR bridges (modeling expansion capture against Watch contraction and Critical churn exposure, with signed-off playbooks adding explicit save-rate lift), whileGET /api/portfolio/export.csvemits RFC 4180 CSV sanitized against OWASP formula injection. Every approval and state transition appends to a SHA-256 hash-chainedaudit_logstable (GET /api/audit/logs), secured by scoped HMAC invite tokens, sliding-window rate limiting, and a fullpytestsuite.
Operational Takeaway
Retention engineering works when signal math is reproducible, silent-usage anomalies surface early, CSM workload stays visible, and no playbook crosses the customer boundary without an authenticated human CSM sign-off on record.