ApexCloud Retention Operations API — CRM Analytics Skill
Overview
This skill covers tasks that consume the ApexCloud Retention Operations API (http://127.0.0.1:8074) to produce structured CRM analytics deliverables for Customer Success, Finance, and Data Science teams. The API returns account profiles, billing snapshots, support health, NPS, receivables, product usage, expansion opportunities, HR/event context, and churn-model exports.
The prompt determines the deliverable type. Always read input/payloads/answer_template.json to confirm the exact output schema.
API Base and Endpoint Families
- Base URL:
http://127.0.0.1:8074
- Account endpoints:
/api/accounts/{account_id} plus sub-resources:
/api/accounts/{account_id}/profile
/api/accounts/{account_id}/billing_snapshot
/api/accounts/{account_id}/support_health
/api/accounts/{account_id}/nps
/api/accounts/{account_id}/receivables
/api/accounts/{account_id}/product_usage
/api/accounts/{account_id}/expansion_opportunities
/api/accounts/{account_id}/metrics?start=YYYY-MM&end=YYYY-MM
/api/accounts/{account_id}/tickets?start=YYYY-MM-DD&end=YYYY-MM-DD
- Finance:
/api/finance/ar-aging
- CRM:
/api/accounts, /api/opportunities
- Operations:
/api/hr/summary, /api/events/performance
- Exports:
/exports/churn/train.csv, /exports/churn/validation.csv, /exports/churn/candidates.csv
Habit: When a task lists specific account_ids, call the relevant per-account endpoints for every listed ID. When a task asks for a rollup (collections board, churn validation), start with the rollup endpoint (/api/finance/ar-aging, /exports/churn/candidates.csv) and link downstream.
Deliverable Types and Routing Rules
| Prompt Keyword |
Deliverable |
Primary Endpoints |
| "retention action board" |
Retention Action Board |
Per-account profile, billing, support, NPS, receivables, usage, expansion |
| "QBR" / "QBR metrics packet" / "QBR brief" |
QBR Metrics Packet |
Per-account metrics, tickets, NPS |
| "collections" / "receivables" / "overdue-receivables" |
Collections Operations Board |
/api/finance/ar-aging, /api/accounts, /api/opportunities, /api/hr/summary, /api/events/performance |
| "churn-model validation" / "churn exports" |
Churn Model Validation Report |
/exports/churn/train.csv, validation.csv, candidates.csv |
Rule: The prompt explicitly names the deliverable. Always match the output schema to answer_template.json; do not assume one template fits all tasks.
Global Output Conventions
Apply these precision rules across all deliverables unless the prompt overrides:
| Data Type |
Precision |
Example |
| Currency |
2 decimals |
1260762.32 |
| Percentages |
1 decimal |
93.3 |
| Probabilities |
3 decimals |
0.102 |
| Counts |
Integers |
13 |
| Dates |
YYYY-MM-DD |
2026-07-15 |
| Month labels |
YYYY-MM |
2026-04 |
Controlled Vocabularies
Risk Levels
critical, high, medium, low
Primary Actions
collections_followup, technical_recovery, renewal_save, executive_qbr, nurture_monitor, no_action
Reason Codes
overdue_receivable, nps_drop, sla_degradation, usage_decline, renewal_window, expansion_offset, clean_billings, low_tenure_high_churn
Link Status (Collections)
linked, unlinked
Ticket Trend
improving, worsening, flat
Metric Sources
crm_closed_won, support_export, sla_report, nps_survey, billing_snapshot, ar_aging, pipeline_crm, event_dashboard, hr_report
Review Owners
solutions_engineering, customer_success, finance_ops
Agenda Topics (QBR)
partnership_overview, q2_metrics, performance_highlights, q3_initiatives, technical_recovery, commercial_expansion
Accuracy Bands (Churn)
below_70, 70_to_79, 80_to_89, 90_plus
Tenure Coefficient Direction
negative, positive, zero
1. Retention Action Board Workflow
Output Schema
{
"action_board": [...],
"segment_summary": {...},
"followup_calendar": {...},
"policy_codes": {...}
}
Action Board Entry Fields
| Field |
Source / Rule |
rank |
1-based sort order (see Ranking Rules) |
account_id |
From prompt list |
risk_level |
Derived from reason-code severity and count (see Risk Scoring) |
primary_action |
Highest-priority action mapped from detected reason codes (see Action Priority) |
current_arr |
From billing_snapshot |
expansion_pipeline |
Sum of open expansion opportunities for the account in the period |
overdue_balance |
From receivables as-of the board date |
next_touch_due_date |
Look up primary_action in the followup_calendar provided in the prompt; null if no_action |
reason_codes |
Array of all applicable reason codes, deduplicated, sorted alphabetically |
Risk Scoring Heuristics
- critical: 4+ risk factors, or a severe combination such as
renewal_window + nps_drop + sla_degradation + usage_decline.
- high: 3–4 risk factors including at least one high-severity factor (
overdue_receivable, renewal_window, usage_decline, nps_drop).
- medium: 1–2 risk factors, or
renewal_window / overdue_receivable without enough severity for high.
- low: 0–1 minor factors (e.g., only
sla_degradation or only expansion_offset).
Action Priority (highest wins)
collections_followup — if overdue_receivable is present.
technical_recovery — if nps_drop + sla_degradation + usage_decline are present together, or if technical health is severely degraded.
renewal_save — if renewal_window is present and not overridden by collections or technical recovery.
executive_qbr — reserved for strategic escalations (rarely primary).
nurture_monitor — for low-risk accounts with minor flags.
no_action — when risk level is low and no urgent factor exists.
Ranking Rules
- Sort by
risk_level descending: critical → high → medium → low.
- Within the same risk level, sort by
current_arr descending.
- Assign
rank sequentially starting at 1.
Segment Summary
| Field |
Calculation |
strategic_accounts |
Count of accounts where tier == "strategic" |
enterprise_accounts |
Count of accounts where tier == "enterprise" |
arr_at_risk |
Sum of current_arr for all accounts with risk_level != "low" |
open_expansion_pipeline |
Sum of expansion_pipeline across all accounts |
net_revenue_exposure |
arr_at_risk - open_expansion_pipeline |
Follow-Up Calendar
The prompt provides due dates by action. Map them exactly:
{
"collections_followup": "2026-07-15",
"technical_recovery": "2026-07-18",
"renewal_save": "2026-07-22",
"executive_qbr": "2026-07-29",
"nurture_monitor": "2026-08-05"
}
If the prompt omits an action, omit it from the calendar.
Policy Codes
Policy codes are predefined sets that correspond to the analysis-period type. Use the set that matches the prompt's period:
| Period Type |
Code Set |
| Q1 (3 months, e.g., 2026-01 to 2026-03) |
RS-2, REV-1, SUP-3, ACT-1, BORD-1, EXP-2, CAL-3 |
| Q2 (3 months, e.g., 2026-04 to 2026-06) |
RS-6, REV-4, SUP-8, ACT-5, BORD-4, EXP-6, CAL-5 |
| 12-month rolling |
RS-9, REV-8, SUP-9, ACT-7, BORD-8, EXP-9, CAL-7 |
Map keys:
risk_model_code → RS-*
arr_source_code → REV-*
support_hygiene_code → SUP-*
action_priority_code → ACT-*
board_sort_code → BORD-*
exposure_formula_code → EXP-*
calendar_policy_code → CAL-*
2. QBR Metrics Packet Workflow
Output Schema
{
"qbr_metrics": [...],
"highlights": {...},
"metric_sources": {...},
"review_plan": {...},
"agenda_topics": [...]
}
QBR Metrics (monthly)
For each month in the quarter (3 entries):
month: YYYY-MM
revenue: monthly revenue from crm_closed_won or billing metrics
support_tickets: ticket count for the month
sla_compliance_pct: SLA compliance percentage
nps_score: integer NPS score (can be null if missing)
Highlights
| Field |
Rule |
average_revenue |
Mean of the 3 monthly revenues |
peak_revenue_month |
Month with highest revenue |
peak_revenue |
Highest monthly revenue |
max_sla_month |
Month with highest sla_compliance_pct |
max_sla_pct |
Highest SLA value |
peak_nps_month |
Month with highest NPS score |
peak_nps_score |
Highest NPS value |
ticket_trend |
improving if ticket count decreased month-over-month toward the end, worsening if increased, flat if stable |
Metric Sources
Populate with the canonical source enum values:
{
"revenue": "crm_closed_won",
"support_tickets": "support_export",
"sla_compliance": "sla_report",
"nps": "nps_survey"
}
Review Plan
review_owner: customer_success for standard QBRs; escalate to solutions_engineering if significant technical flags exist.
review_due_date: Use the date given in the prompt.
needs_technical_signoff: true if the account has sla_degradation, usage_decline, or technical_recovery flagged; otherwise false.
Agenda Topics
Select exactly four ordered topics from the enum. Common ordering:
partnership_overview
q2_metrics (or quarter-appropriate metrics topic)
technical_recovery (if technical issues exist) or performance_highlights
q3_initiatives (or next-quarter topic)
3. Collections Operations Board Workflow
Output Schema
{
"financial_summary": {...},
"pipeline_summary": {...},
"overdue_followups": [...],
"ops_context": {...},
"policy_codes": {...}
}
Workflow
- Query
/api/finance/ar-aging as-of the prompt's A/R date.
- Filter to customers with overdue balances in older aging buckets.
- Attempt to link each A/R customer to a CRM account via
/api/accounts.
- Query
/api/opportunities for the quarter to build pipeline summary.
- Query
/api/hr/summary and /api/events/performance for ops context.
Financial Summary
| Field |
Rule |
overdue_client_count |
Total distinct overdue customers |
overdue_total |
Sum of all overdue balances |
linked_followup_count |
Overdue customers successfully linked to a CRM account_id |
unlinked_followup_count |
Overdue customers with no CRM linkage (account_id == null) |
Pipeline Summary (Quarter scope)
| Field |
Rule |
won_count |
Closed-won opportunities in the quarter |
won_revenue |
Sum of closed-won revenue |
lost_count |
Closed-lost opportunities |
open_count |
Open opportunities |
open_pipeline |
Sum of open pipeline value |
win_rate_pct |
won_count / (won_count + lost_count) * 100, 1 decimal |
top_open_product_line |
Product line with highest open pipeline value |
Overdue Follow-Ups
Each entry:
customer_name: from A/R record
link_status: linked if account_id is resolved, else unlinked
account_id: CRM account ID or null
overdue_balance: from A/R
due_date: the collections follow-up date given in the prompt
primary_action: collections_followup
Sort: ascending by customer_name.
Ops Context
Include HR and event data exactly as returned by /api/hr/summary and /api/events/performance for the requested quarter/event:
hr_headcount
unpaid_claims_total
event_orders
event_revenue
Policy Codes (Collections)
Use the set that matches the quarter:
- Q2 collections:
RCP-7, CM-5, PW-6, FS-4
- Keys:
receivable_trigger_code, crm_match_code, pipeline_window_code, followup_scope_code
4. Churn Model Validation Workflow
Output Schema
{
"model_validation": {...},
"risk_ranking": [...],
"cohort_checks": {...},
"model_policy_codes": {...}
}
Workflow
- Read
/exports/churn/train.csv and /exports/churn/validation.csv.
- Compute row counts, feature count, and accuracy.
- Read
/exports/churn/candidates.csv.
- Filter to the
account_ids specified in the prompt.
- Sort by
predicted_churn_probability descending.
- Return the top N candidates (the prompt specifies the count, e.g., top 5).
Model Validation
| Field |
Rule |
training_rows |
Row count of train.csv |
validation_rows |
Row count of validation.csv |
feature_count |
Number of feature columns (exclude ID/target columns) |
accuracy_pct |
Model accuracy, 1 decimal |
accuracy_band |
below_70, 70_to_79, 80_to_89, or 90_plus |
tenure_coefficient_direction |
negative, positive, or zero based on the tenure feature coefficient |
Risk Ranking
| Field |
Rule |
rank |
1-based by predicted_churn_probability descending |
customer_id |
Account ID |
predicted_churn_probability |
From candidates.csv, 3 decimals |
outreach_action |
Map using the same action priority as Retention Boards: overdue → collections_followup, low tenure + high churn → renewal_save, clean billings → nurture_monitor |
reason_code |
overdue_receivable, low_tenure_high_churn, or clean_billings based on account context |
Cohort Checks
| Field |
Rule |
past_due_shortlist_count |
Count of ranked candidates with reason_code == "overdue_receivable" |
low_tenure_shortlist_count |
Count with reason_code == "low_tenure_high_churn" |
average_probability_top5 |
Mean probability of the returned top-5 candidates, 3 decimals |
Model Policy Codes
Select the set matching the analysis period:
- Standard Q2 validation:
MOD-7, PRB-4, DEP-5, OUT-2
- Keys:
model_protocol_code, probability_scale_code, deployment_rule_code, outreach_mapping_code
Common Pitfalls
- Ignoring the template. Always read
answer_template.json; deliverable shapes differ significantly across task types.
- Wrong date granularity. Retention boards use
YYYY-MM-DD; QBR metrics use YYYY-MM for month labels.
- Precision errors. Currency must be exactly 2 decimals; probabilities exactly 3. Do not round prematurely.
- Omitting nulls.
next_touch_due_date is null for no_action accounts. account_id is null for unlinked collections customers.
- Sorting mistakes. Retention boards sort by risk then ARR descending. Collections follow-ups sort by
customer_name ascending. Churn rankings sort by probability descending.
- Hard-coding policy codes. Policy codes are not universal; they map to the quarter or period length stated in the prompt.
- Mixing action priorities. Collections always beats technical recovery, which beats renewal save, when multiple reason codes are present.
- Missing expansion in exposure.
net_revenue_exposure = arr_at_risk - open_expansion_pipeline. Do not subtract only for at-risk accounts; use the total open pipeline.
- QBR agenda length. Must be exactly four topics, ordered logically.
- Collections linkage. An A/R customer may match a CRM account by name but not by exact ID; resolve linkage carefully and set
link_status accordingly.
Example Policy-Code Mapping Summary
| Context |
Codes |
| Retention Board — Q1 (3-mo) |
RS-2, REV-1, SUP-3, ACT-1, BORD-1, EXP-2, CAL-3 |
| Retention Board — Q2 (3-mo) |
RS-6, REV-4, SUP-8, ACT-5, BORD-4, EXP-6, CAL-5 |
| Retention Board — 12-mo rolling |
RS-9, REV-8, SUP-9, ACT-7, BORD-8, EXP-9, CAL-7 |
| Collections Board — Q2 |
RCP-7, CM-5, PW-6, FS-4 |
| Churn Model — Q2 validation |
MOD-7, PRB-4, DEP-5, OUT-2 |
If the prompt uses a different quarter or window, carry the numeric suffix pattern forward proportionally (e.g., Q3 3-month retention likely uses the next sequential set in the same family).
1---2name: fewshot-attempt-01-193description: ApexCloud Retention Operations API — CRM Analytics Skill4---5# ApexCloud Retention Operations API — CRM Analytics Skill67## Overview89This skill covers tasks that consume the **ApexCloud Retention Operations API** (`http://127.0.0.1:8074`) to produce structured CRM analytics deliverables for Customer Success, Finance, and Data Science teams. The API returns account profiles, billing snapshots, support health, NPS, receivables, product usage, expansion opportunities, HR/event context, and churn-model exports.1011The prompt determines the deliverable type. Always read `input/payloads/answer_template.json` to confirm the exact output schema.1213---1415## API Base and Endpoint Families1617- **Base URL:** `http://127.0.0.1:8074`18- **Account endpoints:** `/api/accounts/{account_id}` plus sub-resources:19 - `/api/accounts/{account_id}/profile`20 - `/api/accounts/{account_id}/billing_snapshot`21 - `/api/accounts/{account_id}/support_health`22 - `/api/accounts/{account_id}/nps`23 - `/api/accounts/{account_id}/receivables`24 - `/api/accounts/{account_id}/product_usage`25 - `/api/accounts/{account_id}/expansion_opportunities`26 - `/api/accounts/{account_id}/metrics?start=YYYY-MM&end=YYYY-MM`27 - `/api/accounts/{account_id}/tickets?start=YYYY-MM-DD&end=YYYY-MM-DD`28- **Finance:** `/api/finance/ar-aging`29- **CRM:** `/api/accounts`, `/api/opportunities`30- **Operations:** `/api/hr/summary`, `/api/events/performance`31- **Exports:** `/exports/churn/train.csv`, `/exports/churn/validation.csv`, `/exports/churn/candidates.csv`3233**Habit:** When a task lists specific `account_ids`, call the relevant per-account endpoints for every listed ID. When a task asks for a rollup (collections board, churn validation), start with the rollup endpoint (`/api/finance/ar-aging`, `/exports/churn/candidates.csv`) and link downstream.3435---3637## Deliverable Types and Routing Rules3839| Prompt Keyword | Deliverable | Primary Endpoints |40|---|---|---|41| "retention action board" | Retention Action Board | Per-account profile, billing, support, NPS, receivables, usage, expansion |42| "QBR" / "QBR metrics packet" / "QBR brief" | QBR Metrics Packet | Per-account metrics, tickets, NPS |43| "collections" / "receivables" / "overdue-receivables" | Collections Operations Board | `/api/finance/ar-aging`, `/api/accounts`, `/api/opportunities`, `/api/hr/summary`, `/api/events/performance` |44| "churn-model validation" / "churn exports" | Churn Model Validation Report | `/exports/churn/train.csv`, `validation.csv`, `candidates.csv` |4546**Rule:** The prompt explicitly names the deliverable. Always match the output schema to `answer_template.json`; do not assume one template fits all tasks.4748---4950## Global Output Conventions5152Apply these precision rules across all deliverables unless the prompt overrides:5354| Data Type | Precision | Example |55|---|---|---|56| Currency | 2 decimals | `1260762.32` |57| Percentages | 1 decimal | `93.3` |58| Probabilities | 3 decimals | `0.102` |59| Counts | Integers | `13` |60| Dates | `YYYY-MM-DD` | `2026-07-15` |61| Month labels | `YYYY-MM` | `2026-04` |6263---6465## Controlled Vocabularies6667### Risk Levels68`critical`, `high`, `medium`, `low`6970### Primary Actions71`collections_followup`, `technical_recovery`, `renewal_save`, `executive_qbr`, `nurture_monitor`, `no_action`7273### Reason Codes74`overdue_receivable`, `nps_drop`, `sla_degradation`, `usage_decline`, `renewal_window`, `expansion_offset`, `clean_billings`, `low_tenure_high_churn`7576### Link Status (Collections)77`linked`, `unlinked`7879### Ticket Trend80`improving`, `worsening`, `flat`8182### Metric Sources83`crm_closed_won`, `support_export`, `sla_report`, `nps_survey`, `billing_snapshot`, `ar_aging`, `pipeline_crm`, `event_dashboard`, `hr_report`8485### Review Owners86`solutions_engineering`, `customer_success`, `finance_ops`8788### Agenda Topics (QBR)89`partnership_overview`, `q2_metrics`, `performance_highlights`, `q3_initiatives`, `technical_recovery`, `commercial_expansion`9091### Accuracy Bands (Churn)92`below_70`, `70_to_79`, `80_to_89`, `90_plus`9394### Tenure Coefficient Direction95`negative`, `positive`, `zero`9697---9899## 1. Retention Action Board Workflow100101### Output Schema102```json103{104 "action_board": [...],105 "segment_summary": {...},106 "followup_calendar": {...},107 "policy_codes": {...}108}109```110111### Action Board Entry Fields112| Field | Source / Rule |113|---|---|114| `rank` | 1-based sort order (see Ranking Rules) |115| `account_id` | From prompt list |116| `risk_level` | Derived from reason-code severity and count (see Risk Scoring) |117| `primary_action` | Highest-priority action mapped from detected reason codes (see Action Priority) |118| `current_arr` | From `billing_snapshot` |119| `expansion_pipeline` | Sum of open expansion opportunities for the account in the period |120| `overdue_balance` | From `receivables` as-of the board date |121| `next_touch_due_date` | Look up `primary_action` in the `followup_calendar` provided in the prompt; `null` if `no_action` |122| `reason_codes` | Array of all applicable reason codes, deduplicated, sorted alphabetically |123124### Risk Scoring Heuristics125- **critical:** 4+ risk factors, or a severe combination such as `renewal_window` + `nps_drop` + `sla_degradation` + `usage_decline`.126- **high:** 3–4 risk factors including at least one high-severity factor (`overdue_receivable`, `renewal_window`, `usage_decline`, `nps_drop`).127- **medium:** 1–2 risk factors, or `renewal_window` / `overdue_receivable` without enough severity for high.128- **low:** 0–1 minor factors (e.g., only `sla_degradation` or only `expansion_offset`).129130### Action Priority (highest wins)1311. `collections_followup` — if `overdue_receivable` is present.1322. `technical_recovery` — if `nps_drop` + `sla_degradation` + `usage_decline` are present together, or if technical health is severely degraded.1333. `renewal_save` — if `renewal_window` is present and not overridden by collections or technical recovery.1344. `executive_qbr` — reserved for strategic escalations (rarely primary).1355. `nurture_monitor` — for low-risk accounts with minor flags.1366. `no_action` — when risk level is `low` and no urgent factor exists.137138### Ranking Rules1391. Sort by `risk_level` descending: `critical` → `high` → `medium` → `low`.1402. Within the same risk level, sort by `current_arr` descending.1413. Assign `rank` sequentially starting at 1.142143### Segment Summary144| Field | Calculation |145|---|---|146| `strategic_accounts` | Count of accounts where `tier == "strategic"` |147| `enterprise_accounts` | Count of accounts where `tier == "enterprise"` |148| `arr_at_risk` | Sum of `current_arr` for all accounts with `risk_level != "low"` |149| `open_expansion_pipeline` | Sum of `expansion_pipeline` across **all** accounts |150| `net_revenue_exposure` | `arr_at_risk - open_expansion_pipeline` |151152### Follow-Up Calendar153The prompt provides due dates by action. Map them exactly:154```json155{156 "collections_followup": "2026-07-15",157 "technical_recovery": "2026-07-18",158 "renewal_save": "2026-07-22",159 "executive_qbr": "2026-07-29",160 "nurture_monitor": "2026-08-05"161}162```163If the prompt omits an action, omit it from the calendar.164165### Policy Codes166Policy codes are **predefined sets** that correspond to the analysis-period type. Use the set that matches the prompt's period:167168| Period Type | Code Set |169|---|---|170| Q1 (3 months, e.g., 2026-01 to 2026-03) | `RS-2`, `REV-1`, `SUP-3`, `ACT-1`, `BORD-1`, `EXP-2`, `CAL-3` |171| Q2 (3 months, e.g., 2026-04 to 2026-06) | `RS-6`, `REV-4`, `SUP-8`, `ACT-5`, `BORD-4`, `EXP-6`, `CAL-5` |172| 12-month rolling | `RS-9`, `REV-8`, `SUP-9`, `ACT-7`, `BORD-8`, `EXP-9`, `CAL-7` |173174Map keys:175- `risk_model_code` → `RS-*`176- `arr_source_code` → `REV-*`177- `support_hygiene_code` → `SUP-*`178- `action_priority_code` → `ACT-*`179- `board_sort_code` → `BORD-*`180- `exposure_formula_code` → `EXP-*`181- `calendar_policy_code` → `CAL-*`182183---184185## 2. QBR Metrics Packet Workflow186187### Output Schema188```json189{190 "qbr_metrics": [...],191 "highlights": {...},192 "metric_sources": {...},193 "review_plan": {...},194 "agenda_topics": [...]195}196```197198### QBR Metrics (monthly)199For each month in the quarter (3 entries):200- `month`: `YYYY-MM`201- `revenue`: monthly revenue from `crm_closed_won` or billing metrics202- `support_tickets`: ticket count for the month203- `sla_compliance_pct`: SLA compliance percentage204- `nps_score`: integer NPS score (can be `null` if missing)205206### Highlights207| Field | Rule |208|---|---|209| `average_revenue` | Mean of the 3 monthly revenues |210| `peak_revenue_month` | Month with highest revenue |211| `peak_revenue` | Highest monthly revenue |212| `max_sla_month` | Month with highest `sla_compliance_pct` |213| `max_sla_pct` | Highest SLA value |214| `peak_nps_month` | Month with highest NPS score |215| `peak_nps_score` | Highest NPS value |216| `ticket_trend` | `improving` if ticket count decreased month-over-month toward the end, `worsening` if increased, `flat` if stable |217218### Metric Sources219Populate with the canonical source enum values:220```json221{222 "revenue": "crm_closed_won",223 "support_tickets": "support_export",224 "sla_compliance": "sla_report",225 "nps": "nps_survey"226}227```228229### Review Plan230- `review_owner`: `customer_success` for standard QBRs; escalate to `solutions_engineering` if significant technical flags exist.231- `review_due_date`: Use the date given in the prompt.232- `needs_technical_signoff`: `true` if the account has `sla_degradation`, `usage_decline`, or `technical_recovery` flagged; otherwise `false`.233234### Agenda Topics235Select **exactly four** ordered topics from the enum. Common ordering:2361. `partnership_overview`2372. `q2_metrics` (or quarter-appropriate metrics topic)2383. `technical_recovery` (if technical issues exist) or `performance_highlights`2394. `q3_initiatives` (or next-quarter topic)240241---242243## 3. Collections Operations Board Workflow244245### Output Schema246```json247{248 "financial_summary": {...},249 "pipeline_summary": {...},250 "overdue_followups": [...],251 "ops_context": {...},252 "policy_codes": {...}253}254```255256### Workflow2571. Query `/api/finance/ar-aging` as-of the prompt's A/R date.2582. Filter to customers with overdue balances in older aging buckets.2593. Attempt to link each A/R customer to a CRM account via `/api/accounts`.2604. Query `/api/opportunities` for the quarter to build pipeline summary.2615. Query `/api/hr/summary` and `/api/events/performance` for ops context.262263### Financial Summary264| Field | Rule |265|---|---|266| `overdue_client_count` | Total distinct overdue customers |267| `overdue_total` | Sum of all overdue balances |268| `linked_followup_count` | Overdue customers successfully linked to a CRM `account_id` |269| `unlinked_followup_count` | Overdue customers with no CRM linkage (`account_id == null`) |270271### Pipeline Summary (Quarter scope)272| Field | Rule |273|---|---|274| `won_count` | Closed-won opportunities in the quarter |275| `won_revenue` | Sum of closed-won revenue |276| `lost_count` | Closed-lost opportunities |277| `open_count` | Open opportunities |278| `open_pipeline` | Sum of open pipeline value |279| `win_rate_pct` | `won_count / (won_count + lost_count) * 100`, 1 decimal |280| `top_open_product_line` | Product line with highest open pipeline value |281282### Overdue Follow-Ups283Each entry:284- `customer_name`: from A/R record285- `link_status`: `linked` if `account_id` is resolved, else `unlinked`286- `account_id`: CRM account ID or `null`287- `overdue_balance`: from A/R288- `due_date`: the collections follow-up date given in the prompt289- `primary_action`: `collections_followup`290291**Sort:** ascending by `customer_name`.292293### Ops Context294Include HR and event data exactly as returned by `/api/hr/summary` and `/api/events/performance` for the requested quarter/event:295- `hr_headcount`296- `unpaid_claims_total`297- `event_orders`298- `event_revenue`299300### Policy Codes (Collections)301Use the set that matches the quarter:302- Q2 collections: `RCP-7`, `CM-5`, `PW-6`, `FS-4`303- Keys: `receivable_trigger_code`, `crm_match_code`, `pipeline_window_code`, `followup_scope_code`304305---306307## 4. Churn Model Validation Workflow308309### Output Schema310```json311{312 "model_validation": {...},313 "risk_ranking": [...],314 "cohort_checks": {...},315 "model_policy_codes": {...}316}317```318319### Workflow3201. Read `/exports/churn/train.csv` and `/exports/churn/validation.csv`.3212. Compute row counts, feature count, and accuracy.3223. Read `/exports/churn/candidates.csv`.3234. Filter to the `account_ids` specified in the prompt.3245. Sort by `predicted_churn_probability` descending.3256. Return the top N candidates (the prompt specifies the count, e.g., top 5).326327### Model Validation328| Field | Rule |329|---|---|330| `training_rows` | Row count of train.csv |331| `validation_rows` | Row count of validation.csv |332| `feature_count` | Number of feature columns (exclude ID/target columns) |333| `accuracy_pct` | Model accuracy, 1 decimal |334| `accuracy_band` | `below_70`, `70_to_79`, `80_to_89`, or `90_plus` |335| `tenure_coefficient_direction` | `negative`, `positive`, or `zero` based on the tenure feature coefficient |336337### Risk Ranking338| Field | Rule |339|---|---|340| `rank` | 1-based by `predicted_churn_probability` descending |341| `customer_id` | Account ID |342| `predicted_churn_probability` | From candidates.csv, 3 decimals |343| `outreach_action` | Map using the same action priority as Retention Boards: overdue → `collections_followup`, low tenure + high churn → `renewal_save`, clean billings → `nurture_monitor` |344| `reason_code` | `overdue_receivable`, `low_tenure_high_churn`, or `clean_billings` based on account context |345346### Cohort Checks347| Field | Rule |348|---|---|349| `past_due_shortlist_count` | Count of ranked candidates with `reason_code == "overdue_receivable"` |350| `low_tenure_shortlist_count` | Count with `reason_code == "low_tenure_high_churn"` |351| `average_probability_top5` | Mean probability of the returned top-5 candidates, 3 decimals |352353### Model Policy Codes354Select the set matching the analysis period:355- Standard Q2 validation: `MOD-7`, `PRB-4`, `DEP-5`, `OUT-2`356- Keys: `model_protocol_code`, `probability_scale_code`, `deployment_rule_code`, `outreach_mapping_code`357358---359360## Common Pitfalls3613621. **Ignoring the template.** Always read `answer_template.json`; deliverable shapes differ significantly across task types.3632. **Wrong date granularity.** Retention boards use `YYYY-MM-DD`; QBR metrics use `YYYY-MM` for month labels.3643. **Precision errors.** Currency must be exactly 2 decimals; probabilities exactly 3. Do not round prematurely.3654. **Omitting nulls.** `next_touch_due_date` is `null` for `no_action` accounts. `account_id` is `null` for unlinked collections customers.3665. **Sorting mistakes.** Retention boards sort by risk then ARR descending. Collections follow-ups sort by `customer_name` ascending. Churn rankings sort by probability descending.3676. **Hard-coding policy codes.** Policy codes are not universal; they map to the quarter or period length stated in the prompt.3687. **Mixing action priorities.** Collections always beats technical recovery, which beats renewal save, when multiple reason codes are present.3698. **Missing expansion in exposure.** `net_revenue_exposure = arr_at_risk - open_expansion_pipeline`. Do not subtract only for at-risk accounts; use the total open pipeline.3709. **QBR agenda length.** Must be exactly four topics, ordered logically.37110. **Collections linkage.** An A/R customer may match a CRM account by name but not by exact ID; resolve linkage carefully and set `link_status` accordingly.372373---374375## Example Policy-Code Mapping Summary376377| Context | Codes |378|---|---|379| Retention Board — Q1 (3-mo) | `RS-2`, `REV-1`, `SUP-3`, `ACT-1`, `BORD-1`, `EXP-2`, `CAL-3` |380| Retention Board — Q2 (3-mo) | `RS-6`, `REV-4`, `SUP-8`, `ACT-5`, `BORD-4`, `EXP-6`, `CAL-5` |381| Retention Board — 12-mo rolling | `RS-9`, `REV-8`, `SUP-9`, `ACT-7`, `BORD-8`, `EXP-9`, `CAL-7` |382| Collections Board — Q2 | `RCP-7`, `CM-5`, `PW-6`, `FS-4` |383| Churn Model — Q2 validation | `MOD-7`, `PRB-4`, `DEP-5`, `OUT-2` |384385If the prompt uses a different quarter or window, carry the numeric suffix pattern forward proportionally (e.g., Q3 3-month retention likely uses the next sequential set in the same family).