Ask your billing data one question. Get a ranked outreach list in minutes, with every account scored by recovery likelihood, not invoice size.
The recipe returns one explorable dashboard: a KPI strip and monthly volume up top, a risk-mix and aging breakdown in the middle, and a ranked Top 50 outreach table you can search and filter by risk signal, with direct links into each record.
// Anonymized sample shown. Company names, IDs, and emails are illustrative.
The old way is manual: export the unpaid invoices, build a pivot table, sort by amount, and work down from the top. That largest-first ranking quietly misses the accounts that matter most: the one where every automated retry has run dry, the customer who stopped generating invoices six weeks ago, and the enterprise contract on net-90 terms that has not failed yet but will.
The ranking built here weights dollar risk by the square root of the amount, not the raw figure, then layers on failure history, dunning exhaustion, invoice aging, and a silent-churn signal. So a $240K account that has gone 47 days silent with dunning already exhausted outranks several larger but healthier invoices.
Every account arrives already classified by what its billing history shows, and each classification points to a specific next action, so the right intervention reaches the right account first.
The customer may have moved on or is in distress. Right first step: a customer success call to confirm account status, not another automated retry.
The subscription is live, the payment method is failing. Right step: a card-update request or a direct call to fix payment details.
A scheduled payment, not a broken one. Right step: a finance-team follow-up, not an automated dunning sequence.
Standard dunning handles these. No manual intervention needed.
Paste this into any MCP-connected AI client to run the recipe on your own data. It stays collapsed by default, so business readers can skip the technical detail.
The risk weights and the four classification thresholds are where you adapt the recipe. Adjust the failure, dunning, aging, and churn multipliers, or the unpaid-count and age cutoffs, to match how your team prioritizes recovery.
Build me an unpaid-invoices collections dashboard from Chargebee for the current year YTD. Data pull (via Chargebee MCP): . Use list_invoices filtered to payment_due, not_paid, and posted status, dated from January 1 of this year. Sort by date descending. . Paginate fully, keep going until next_offset returns null. . Keep linked_payments, dunning_attempts, dunning_status, net_term_days, and billing_address on each record. These drive the risk model. . Skip per-customer history pulls. The unpaid invoice list carries all the signal needed. Risk score per customer (dollar-weighted): risk_score = sqrt(amount_usd) x failure_multiplier (1 + min(failed_payments / 30, 0.5)) x dunning_multiplier (1 + min(dunning_exhausted x 0.1, 0.3)) x age_multiplier (1.0 to 1.55 stepped at 30 / 60 / 90 / 120 days) x churn_multiplier (1.3 if silent_churn_risk, else 1.0) Use sqrt(amount) not log(amount) for the dollar weight. Log compresses too aggressively and lets a $500 account with 30 failed payments outrank a $500K AR invoice, which is the wrong call for collections triage. Classify each customer as: . silent_churn_risk 3+ unpaid invoices AND newest is >30 days old . active_billing_failing 3+ unpaid invoices AND newest within last 30 days . ar_follow_up single invoice with net_term_days >=30 OR amount >=$50K . routine everything else Deliver: 1. XLSX workbook with four sheets: Summary, Top 50 Priority (color-coded by risk signal, hyperlinked to Chargebee), All Customers, Invoice Detail. 2. Single-file HTML dashboard: KPI strip, monthly volume chart, risk-mix donut, aging buckets, country exposure, Top 50 table with search and filter pills.