Collections Queue, Contact Strategy & Roll-Rate Planner
collections_optimizerDaily collections plan within fair-collection rules. From today's overdue accounts (account_id, balance, dpd, promises, contact counts, consents, stop flags) and optional payment history (paid, contacted, channel, recovered), contact log, monthly snapshots, agents and test results it returns: propensity to pay (L2 logistic, weight-of-evidence driver report, held-out AUC); self-cure chance and contact uplift (two models, contacted vs not, held-out Qini; rule of thumb at cold start); a call queue ranked by expected extra recovery per call within agent capacity, with the best permitted channel, call window learned from reach rates, tone tier, why, and rule checks + id on every recommendation; self-cure, deferred (earliest permitted date) and do-not-contact lists; balance-first / oldest-first comparison; Markov roll rates, forecasts and eventual write-off chance; Kaplan-Meier time to cure; Hungarian agent allocation by language, skill and success; champion-challenger split and z-test. Hard limits: India 08:00-19:00, US 08:00-21:00 and Reg F 7-in-7 and 7-day wait, cease/dispute/bankruptcy/deceased/legal/hardship never queued; policy can only tighten. Decision cards first. Up to 5,000 accounts; larger: collections_optimizer_get_engine.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "collections_optimizer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| l2 | No | ||
| as_of | No | Plan date YYYY-MM-DD (default: latest date in the data). | |
| agents | No | agent_id, capacity (calls per day), languages, skills, success_rate. | |
| policy | No | Stricter-only settings: call_start, call_end ('HH:MM'), max_calls_7d, max_digital_7d, post_conversation_days, allowed_channels, max_tone (1-3), utc_offset (site time zone). | |
| history | No | Past accounts with the same columns plus paid (0/1), contacted (0/1), channel, recovered. | |
| accounts | No | Today's overdue accounts: account_id, balance, dpd or due_date; optional broken_promises, kept_promises, calls_last_7_days, last_conversation_date, utc_offset, phone_valid, sms_ok, whatsapp_opt_in, email_valid, language, product; stop flags cease_contact, dispute, bankruptcy, deceased, legal_hold, hardship. | |
| max_queue | No | ||
| snapshots | No | Monthly state per account: account_id, period, dpd or bucket, balance, status (paid off / written off). | |
| test_salt | No | cc1 | |
| contact_log | No | Contact attempts: account_id, timestamp (debtor local time), channel, reached. | |
| jurisdiction | No | IN (RBI) or US (FDCPA / Reg F); anything else uses the stricter combination. | IN |
| test_results | No | Champion-challenger outcomes: arm, paid, recovered. | |
| agent_minutes | No | Agent minutes available today (default: sum of agents' capacity). | |
| blocked_dates | No | Dates with no calls (holidays, local restrictions). | |
| champion_name | No | champion | |
| channel_costs | No | Cost per contact by channel: call, whatsapp, sms, email, letter. | |
| challenger_share | No | ||
| explain_accounts | No | Account ids to explain (where they went and why). | |
| forecast_periods | No | ||
| minutes_per_call | No | ||
| challenger_policy | No | balance_first | |
| self_cure_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queue | No | ||
| alerts | No | ||
| status | Yes | 1 = ok, 0 = nothing could be planned | |
| drivers | No | ||
| message | No | ||
| summary | No | ||
| deferred | No | ||
| metadata | Yes | ||
| decisions | Yes | Plain-language cards, priority order. Relay these first. | |
| self_cure | No | ||
| roll_rates | No | ||
| assumptions | No | ||
| model_check | No | ||
| call_windows | No | ||
| explanations | No | ||
| do_not_contact | No | ||
| agent_allocation | No | ||
| challenger_queue | No | ||
| policy_comparison | No | ||
| champion_challenger | No | ||
| data_quality_report | No |