Production-grade customer success analytics with multi-dimensional health scoring, churn risk prediction, and expansion opportunity identification. Three Python CLI tools provide deterministic, repeatable analysis using standard library only -- no external dependencies, no API calls, no ML models.
All scripts accept a JSON file as positional input argument. See assets/sample_customer_data.json for complete schema examples and sample data.
Required fields per customer object: customer_id, name, segment, arr, and nested objects usage (login_frequency, feature_adoption, dau_mau_ratio), engagement (support_ticket_volume, meeting_attendance, nps_score, csat_score), support (open_tickets, escalation_rate, avg_resolution_hours), relationship (executive_sponsor_engagement, multi_threading_depth, renewal_sentiment), and previous_period scores for trend analysis.
Required fields per customer object: customer_id, name, segment, arr, contract_end_date, and nested objects usage_decline, engagement_drop, support_issues, relationship_signals, and commercial_factors.
Required fields per customer object: customer_id, name, segment, arr, and nested objects contract (licensed_seats, active_seats, plan_tier, available_tiers), product_usage (per-module adoption flags and usage percentages), and departments (current and potential).
All scripts support two output formats via the --format flag:
text (default): Human-readable formatted output for terminal viewingjson: Machine-readable JSON output for integrations and pipelines# Health scoring
python scripts/health_score_calculator.py assets/sample_customer_data.json
python scripts/health_score_calculator.py assets/sample_customer_data.json --format json
# Churn risk analysis
python scripts/churn_risk_analyzer.py assets/sample_customer_data.json
python scripts/churn_risk_analyzer.py assets/sample_customer_data.json --format json
# Expansion opportunity scoring
python scripts/expansion_opportunity_scorer.py assets/sample_customer_data.json
python scripts/expansion_opportunity_scorer.py assets/sample_customer_data.json --format json
# 1. Score customer health across portfolio
python scripts/health_score_calculator.py customer_portfolio.json --format json > health_results.json
# Verify: confirm health_results.json contains the expected number of customer records before continuing
# 2. Identify at-risk accounts
python scripts/churn_risk_analyzer.py customer_portfolio.json --format json > risk_results.json
# Verify: confirm risk_results.json is non-empty and risk tiers are present for each customer
# 3. Find expansion opportunities in healthy accounts
python scripts/expansion_opportunity_scorer.py customer_portfolio.json --format json > expansion_results.json
# Verify: confirm expansion_results.json lists opportunities ranked by priority
# 4. Prepare QBR using templates
# Reference: assets/qbr_template.md
Error handling: If a script exits with an error, check that:
python --version)Purpose: Multi-dimensional customer health scoring with trend analysis and segment-aware benchmarking.
Dimensions and Weights:
| Dimension | Weight | Metrics |
|---|---|---|
| Usage | 30% | Login frequency, feature adoption, DAU/MAU ratio |
| Engagement | 25% | Support ticket volume, meeting attendance, NPS/CSAT |
| Support | 20% | Open tickets, escalation rate, avg resolution time |
| Relationship | 25% | Executive sponsor engagement, multi-threading depth, renewal sentiment |
Classification:
Usage:
python scripts/health_score_calculator.py customer_data.json
python scripts/health_score_calculator.py customer_data.json --format json
Purpose: Identify at-risk accounts with behavioral signal detection and tier-based intervention recommendations.
Risk Signal Weights:
| Signal Category | Weight | Indicators |
|---|---|---|
| Usage Decline | 30% | Login trend, feature adoption change, DAU/MAU change |
| Engagement Drop | 25% | Meeting cancellations, response time, NPS change |
| Support Issues | 20% | Open escalations, unresolved critical, satisfaction trend |
| Relationship Signals | 15% | Champion left, sponsor change, competitor mentions |
| Commercial Factors | 10% | Contract type, pricing complaints, budget cuts |
Risk Tiers:
Usage:
python scripts/churn_risk_analyzer.py customer_data.json
python scripts/churn_risk_analyzer.py customer_data.json --format json
Purpose: Identify upsell, cross-sell, and expansion opportunities with revenue estimation and priority ranking.
Expansion Types:
Usage:
python scripts/expansion_opportunity_scorer.py customer_data.json
python scripts/expansion_opportunity_scorer.py customer_data.json --format json
| Reference | Description |
|---|---|
references/health-scoring-framework.md |
Complete health scoring methodology, dimension definitions, weighting rationale, threshold calibration |
references/cs-playbooks.md |
Intervention playbooks for each risk tier, onboarding, renewal, expansion, and escalation procedures |
references/cs-metrics-benchmarks.md |
Industry benchmarks for NRR, GRR, churn rates, health scores, expansion rates by segment and industry |
| Template | Purpose |
|---|---|
assets/qbr_template.md |
Quarterly Business Review presentation structure |
assets/success_plan_template.md |
Customer success plan with goals, milestones, and metrics |
assets/onboarding_checklist_template.md |
90-day onboarding checklist with phase gates |
assets/executive_business_review_template.md |
Executive stakeholder review for strategic accounts |
references/health-scoring-framework.md
references/cs-playbooks.md for intervention guidanceLast Updated: February 2026 Tools: 3 Python CLI tools Dependencies: Python 3.7+ standard library only