ApexCloud Retention Operations — Skill Guide
Overview
This skill covers the ApexCloud Retention Operations API: account profiling, metrics, support-ticket hygiene, NPS, A/R aging, billing, CRM pipeline, HR context, event operations, and churn-model exports. Use it to build renewal risk queues, QBR packets, receivables reviews, churn-model readouts, and retention action boards.
API Conventions
Base URL
Use the remote environment base URL. Do not use localhost, 127.0.0.1, or any env/setup.sh reference.
Endpoint Families
| Family |
Pattern |
Notes |
| Accounts list |
GET /api/accounts |
Returns all accounts |
| Account detail |
GET /api/accounts/{account_id} |
Profile, billing, CRM ARR, tenure, lifecycle, segment, renewal |
| Monthly metrics |
GET /api/accounts/{account_id}/metrics?start=YYYY-MM&end=YYYY-MM |
Revenue, NPS, SLA, usage, ticket count per month |
| Support tickets |
GET /api/accounts/{account_id}/tickets?start=YYYY-MM-DD&end=YYYY-MM-DD |
Individual ticket records with SLA flags |
| NPS responses |
GET /api/accounts/{account_id}/nps?start=YYYY-MM-DD&end=YYYY-MM-DD |
Individual survey responses with retraction flag |
| A/R aging |
GET /api/finance/ar-aging?as_of=YYYY-MM-DD |
Aging buckets by customer legal name |
| Opportunities |
GET /api/opportunities |
CRM pipeline with stage, state, amount, close date |
| HR summary |
GET /api/hr/summary |
Headcount, unpaid claims by region and quarter |
| Event performance |
GET /api/events/performance |
Event orders and revenue by event ID and quarter |
| Churn exports |
GET /exports/churn/{train,validation,candidates}.csv |
CSV files for churn model work |
Query Parameter Formats
- Month ranges:
start=2026-04&end=2026-06 (YYYY-MM format)
- Date ranges:
start=2026-04-01&end=2026-06-30 (YYYY-MM-DD format)
- Point-in-time:
as_of=2026-06-30 (YYYY-MM-DD format)
Data Extraction Rules
Account Profile
billing_arr_current is the authoritative ARR for risk calculations and board outputs. CRM ARR (crm_arr) is a secondary source.
lifecycle_status values: active, renewal_risk, paused, implementation.
segment values: Strategic, Enterprise, Mid-Market, SMB.
renewal_date is a date string (YYYY-MM-DD). Compare against the assessment date to flag past-due or approaching renewals.
Monthly Metrics
- Use raw API values without rounding. The API already returns values at appropriate precision.
recognized_revenue is the monthly revenue figure.
sla_compliance is a percentage (e.g., 95.2 means 95.2%).
nps_score in the metrics endpoint is a point-in-time monthly value that may be null when no survey was completed.
support_ticket_count in the metrics endpoint is a raw total; for "clean" counts prefer the tickets endpoint with filtering applied.
survey_status: completed, missing, or retracted. A retracted NPS score must be excluded from analysis.
Support Tickets
- Clean ticket: A ticket where
is_spam is false AND is_duplicate is false. This is the definition of "clean" for counting purposes.
- SLA health is assessed from the tickets endpoint using
first_response_sla_met and resolution_sla_met fields.
- Ticket status values:
closed, open, cancelled.
NPS Responses
- Use the NPS endpoint (
/api/accounts/{id}/nps) for individual scores.
- Exclude retracted responses (
retracted: true).
- The latest NPS is the most recent non-retracted score by
response_date.
A/R Aging
- Overdue balance =
31_60 + 61_90 + 90_plus. Do not include current or 1_30.
- "Older aging buckets" refers to
61_90 and 90_plus specifically.
- Match AR
customer_name to account legal_name for CRM linking. Entries whose customer name does not match any CRM account legal name are unlinked.
CRM Pipeline (Opportunities)
- Use the
stage field (not state) to classify opportunities:
Closed Won → won
Closed Lost → lost
- Everything else (
Prospecting, Discovery, Proposal, Negotiation) → open pipeline
- All open stages count as pipeline, including Prospecting and Discovery. Do not exclude early-stage opportunities from pipeline counts.
- Filter by
close_date within the analysis period for period-specific pipeline summaries.
- Win rate =
won_count / (won_count + lost_count) * 100 (count-based, not revenue-based). When denominator is zero, win rate is 0.0.
Churn Model Exports
- CSV exports at
/exports/churn/ contain telco-style churn features: tenure, MonthlyCharges, TotalCharges, Contract, PaymentMethod, and service flags.
- The target column is
Churn (Yes/No) in train and validation sets; absent in candidates.
- Feature count in model validation refers to the number of raw feature columns (excluding
customer_id and the target), not the count after one-hot encoding.
- Tenure coefficient direction:
negative means longer tenure reduces churn probability (standard expectation).
- Accuracy band thresholds:
below_70, 70_to_79, 80_to_89, 90_plus.
- Predict churn probability on the candidate set, then filter and rank the specified accounts.
predicted_churn_probability uses 3 decimal places.
Output Field Conventions
Precision
| Type |
Decimal Places |
Example |
| Currency (ARR, revenue, overdue, pipeline amounts) |
2 |
1425000.00 |
| Percentages (SLA, win rate, accuracy) |
1 |
95.2 |
| Counts (tickets, accounts, headcount) |
0 (integer) |
14 |
| Churn probabilities |
3 |
0.129 |
| Risk scores |
0 (integer) |
85 |
Controlled Enums
Risk levels: critical, high, medium, low
Primary actions: executive_qbr, collections_followup, technical_recovery, renewal_save, nurture_monitor, no_action
Reason codes: overdue_receivable, low_tenure_high_churn, sla_degradation, nps_drop, usage_decline, renewal_window, expansion_offset, clean_billings
Link status: linked (customer name matches a CRM account legal name), unlinked (no match)
Metric sources (for QBR packets): billing_snapshot, support_export, sla_report, nps_survey, crm_closed_won, ar_aging, pipeline_crm, event_dashboard, hr_report
Ticket trend (for QBR): improving (ticket count decreasing), worsening (increasing), flat (no meaningful change)
Review owner (for QBR): customer_success, solutions_engineering, finance_ops
Agenda topics (for QBR, choose exactly 4 from): partnership_overview, q2_metrics, performance_highlights, q3_initiatives, technical_recovery, commercial_expansion
Accuracy bands (for churn model): below_70, 70_to_79, 80_to_89, 90_plus
Tenure risk direction: negative (longer tenure → lower risk), positive, not_assessed
Outreach actions (for churn model): renewal_save, technical_recovery, collections_followup, nurture_monitor
Churn reason codes (single code per candidate): same as risk reason codes above.
Business-Policy Rules
Risk Ranking Factors
When ranking accounts by renewal risk, consider these factors in combination:
- Lifecycle status —
renewal_risk and paused are explicit risk signals. renewal_risk carries the highest weight.
- Renewal timing — Past-due renewals (date before assessment date) are high-risk. Approaching renewals (within 90 days) are elevated risk.
- Revenue exposure — Higher ARR amplifies the impact of other risk factors. Strategic-segment accounts get heightened attention.
- Customer sentiment (NPS) — Low absolute scores (<30) and significant score drops (>15 points across the period) are risk signals.
- SLA health — Declining SLA compliance, especially below 90%, indicates service degradation.
- Usage trend — Declining product usage (>5 percentage points) signals disengagement.
- Overdue receivables — Balances over $5,000 in 31+ day buckets increase risk. The older the bucket, the higher the concern.
- Tenure — Accounts with fewer than 24 months of tenure have elevated churn risk.
- Expansion pipeline — Open expansion opportunities partially offset risk (they indicate ongoing commercial engagement).
Action Assignment
executive_qbr — Critical-risk accounts, especially strategic/enterprise with multiple risk factors. Requires executive-level intervention.
collections_followup — Accounts with significant overdue receivables (>$5,000) as a primary concern.
technical_recovery — Accounts where SLA degradation or support-ticket issues are the dominant risk driver.
renewal_save — Accounts with approaching or past-due renewals where the primary goal is retention.
nurture_monitor — Medium/low-risk accounts that need regular attention but no immediate escalation.
no_action — Accounts with no material risk signals.
Reason Code Assignment
Assign the most specific, data-supported reason codes (up to 5). Prefer concrete, measurable signals over generic labels. When multiple codes apply, order by severity (most impactful first). Use clean_billings only when no other negative signal is present.
Board Sorting
For retention action boards, the standard order is by risk severity group, then by ARR (descending) within each group, then by account ID for ties.
Follow-Up Due Dates
When the task specifies follow-up due dates by action type, use those exact dates for the next_touch_due_date field:
| Action |
Typical Due Date Offset |
collections_followup |
~15 days after period end |
technical_recovery |
~18 days after period end |
renewal_save |
~22 days after period end |
executive_qbr |
~29 days after period end |
nurture_monitor |
~36 days after period end |
Exclusion Rules & Pitfalls
Data Quality
- Exclude spam and duplicate tickets from all "clean" ticket counts. Check
is_spam and is_duplicate flags.
- Exclude retracted NPS responses. Check both the
retracted field in the NPS endpoint and survey_status: "retracted" in the metrics endpoint.
- Do not round raw API values before using them in output. The API values are already at the required precision. Rounding intermediate values introduces errors.
- A/R entries without CRM matches are unlinked, not errors. Subsidiaries, foundations, and alternative legal names that don't match any account's
legal_name should be flagged as unlinked with account_id: null.
Pipeline
- Use
stage not state to classify won/lost/open. The state field may only contain open/closed while stage contains the granular classification (Closed Won, Closed Lost, Proposal, etc.).
- Include all non-closed stages in pipeline counts, including Prospecting and Discovery. These are valid pipeline stages.
- Win rate denominator excludes open opportunities. Use
won / (won + lost).
ARR Sources
- Prefer
billing_arr_current from the account profile as the source of truth for current ARR. This is the billing-system ARR.
- CRM ARR (
crm_arr) may differ from billing ARR. When the task asks whether billing ARR is used, answer based on which source was actually used.
Risk Model
- Risk is multi-dimensional. No single factor (not even
renewal_risk lifecycle) determines risk alone. Combine signals.
- Past-due renewal alone is not sufficient for critical risk if all other indicators are healthy.
- Expansion pipeline offsets risk — an account with significant expansion activity may be engaged even if other signals are mixed.
General
- Read the answer template carefully. Every field in the template must be populated with the correct type (object, array, string, number, boolean, null).
- Sort orders matter. When the task specifies a sort order (e.g.,
customer_name ascending), apply it exactly.
- Response must be JSON only. No explanatory text, markdown fences, or commentary.
- Deterministic precision is required. Currency to 2 decimals, percentages to 1 decimal, counts as integers.
1---2name: reflect-3-attempt-01-443description: ApexCloud Retention Operations — Skill Guide4---5# ApexCloud Retention Operations — Skill Guide67## Overview89This skill covers the ApexCloud Retention Operations API: account profiling, metrics, support-ticket hygiene, NPS, A/R aging, billing, CRM pipeline, HR context, event operations, and churn-model exports. Use it to build renewal risk queues, QBR packets, receivables reviews, churn-model readouts, and retention action boards.1011---1213## API Conventions1415### Base URL1617Use the remote environment base URL. Do **not** use `localhost`, `127.0.0.1`, or any `env/setup.sh` reference.1819### Endpoint Families2021| Family | Pattern | Notes |22|---|---|---|23| Accounts list | `GET /api/accounts` | Returns all accounts |24| Account detail | `GET /api/accounts/{account_id}` | Profile, billing, CRM ARR, tenure, lifecycle, segment, renewal |25| Monthly metrics | `GET /api/accounts/{account_id}/metrics?start=YYYY-MM&end=YYYY-MM` | Revenue, NPS, SLA, usage, ticket count per month |26| Support tickets | `GET /api/accounts/{account_id}/tickets?start=YYYY-MM-DD&end=YYYY-MM-DD` | Individual ticket records with SLA flags |27| NPS responses | `GET /api/accounts/{account_id}/nps?start=YYYY-MM-DD&end=YYYY-MM-DD` | Individual survey responses with retraction flag |28| A/R aging | `GET /api/finance/ar-aging?as_of=YYYY-MM-DD` | Aging buckets by customer legal name |29| Opportunities | `GET /api/opportunities` | CRM pipeline with stage, state, amount, close date |30| HR summary | `GET /api/hr/summary` | Headcount, unpaid claims by region and quarter |31| Event performance | `GET /api/events/performance` | Event orders and revenue by event ID and quarter |32| Churn exports | `GET /exports/churn/{train,validation,candidates}.csv` | CSV files for churn model work |3334### Query Parameter Formats3536- **Month ranges**: `start=2026-04&end=2026-06` (YYYY-MM format)37- **Date ranges**: `start=2026-04-01&end=2026-06-30` (YYYY-MM-DD format)38- **Point-in-time**: `as_of=2026-06-30` (YYYY-MM-DD format)3940---4142## Data Extraction Rules4344### Account Profile4546- `billing_arr_current` is the authoritative ARR for risk calculations and board outputs. CRM ARR (`crm_arr`) is a secondary source.47- `lifecycle_status` values: `active`, `renewal_risk`, `paused`, `implementation`.48- `segment` values: `Strategic`, `Enterprise`, `Mid-Market`, `SMB`.49- `renewal_date` is a date string (YYYY-MM-DD). Compare against the assessment date to flag past-due or approaching renewals.5051### Monthly Metrics5253- Use raw API values **without rounding**. The API already returns values at appropriate precision.54- `recognized_revenue` is the monthly revenue figure.55- `sla_compliance` is a percentage (e.g., `95.2` means 95.2%).56- `nps_score` in the metrics endpoint is a point-in-time monthly value that may be `null` when no survey was completed.57- `support_ticket_count` in the metrics endpoint is a raw total; for "clean" counts prefer the tickets endpoint with filtering applied.58- `survey_status`: `completed`, `missing`, or `retracted`. A `retracted` NPS score must be excluded from analysis.5960### Support Tickets6162- **Clean ticket**: A ticket where `is_spam` is `false` AND `is_duplicate` is `false`. This is the definition of "clean" for counting purposes.63- SLA health is assessed from the tickets endpoint using `first_response_sla_met` and `resolution_sla_met` fields.64- Ticket status values: `closed`, `open`, `cancelled`.6566### NPS Responses6768- Use the NPS endpoint (`/api/accounts/{id}/nps`) for individual scores.69- **Exclude retracted responses** (`retracted: true`).70- The **latest NPS** is the most recent non-retracted score by `response_date`.7172### A/R Aging7374- **Overdue balance** = `31_60` + `61_90` + `90_plus`. Do **not** include `current` or `1_30`.75- "Older aging buckets" refers to `61_90` and `90_plus` specifically.76- Match AR `customer_name` to account `legal_name` for CRM linking. Entries whose customer name does not match any CRM account legal name are **unlinked**.7778### CRM Pipeline (Opportunities)7980- Use the **`stage` field** (not `state`) to classify opportunities:81 - `Closed Won` → won82 - `Closed Lost` → lost83 - Everything else (`Prospecting`, `Discovery`, `Proposal`, `Negotiation`) → open pipeline84- **All open stages count as pipeline**, including Prospecting and Discovery. Do not exclude early-stage opportunities from pipeline counts.85- Filter by `close_date` within the analysis period for period-specific pipeline summaries.86- **Win rate** = `won_count / (won_count + lost_count) * 100` (count-based, not revenue-based). When denominator is zero, win rate is `0.0`.8788### Churn Model Exports8990- CSV exports at `/exports/churn/` contain telco-style churn features: tenure, MonthlyCharges, TotalCharges, Contract, PaymentMethod, and service flags.91- The target column is `Churn` (Yes/No) in train and validation sets; absent in candidates.92- **Feature count** in model validation refers to the number of raw feature columns (excluding `customer_id` and the target), not the count after one-hot encoding.93- Tenure coefficient direction: `negative` means longer tenure reduces churn probability (standard expectation).94- Accuracy band thresholds: `below_70`, `70_to_79`, `80_to_89`, `90_plus`.95- Predict churn probability on the candidate set, then filter and rank the specified accounts.96- `predicted_churn_probability` uses 3 decimal places.9798---99100## Output Field Conventions101102### Precision103104| Type | Decimal Places | Example |105|---|---|---|106| Currency (ARR, revenue, overdue, pipeline amounts) | 2 | `1425000.00` |107| Percentages (SLA, win rate, accuracy) | 1 | `95.2` |108| Counts (tickets, accounts, headcount) | 0 (integer) | `14` |109| Churn probabilities | 3 | `0.129` |110| Risk scores | 0 (integer) | `85` |111112### Controlled Enums113114**Risk levels**: `critical`, `high`, `medium`, `low`115116**Primary actions**: `executive_qbr`, `collections_followup`, `technical_recovery`, `renewal_save`, `nurture_monitor`, `no_action`117118**Reason codes**: `overdue_receivable`, `low_tenure_high_churn`, `sla_degradation`, `nps_drop`, `usage_decline`, `renewal_window`, `expansion_offset`, `clean_billings`119120**Link status**: `linked` (customer name matches a CRM account legal name), `unlinked` (no match)121122**Metric sources** (for QBR packets): `billing_snapshot`, `support_export`, `sla_report`, `nps_survey`, `crm_closed_won`, `ar_aging`, `pipeline_crm`, `event_dashboard`, `hr_report`123124**Ticket trend** (for QBR): `improving` (ticket count decreasing), `worsening` (increasing), `flat` (no meaningful change)125126**Review owner** (for QBR): `customer_success`, `solutions_engineering`, `finance_ops`127128**Agenda topics** (for QBR, choose exactly 4 from): `partnership_overview`, `q2_metrics`, `performance_highlights`, `q3_initiatives`, `technical_recovery`, `commercial_expansion`129130**Accuracy bands** (for churn model): `below_70`, `70_to_79`, `80_to_89`, `90_plus`131132**Tenure risk direction**: `negative` (longer tenure → lower risk), `positive`, `not_assessed`133134**Outreach actions** (for churn model): `renewal_save`, `technical_recovery`, `collections_followup`, `nurture_monitor`135136**Churn reason codes** (single code per candidate): same as risk reason codes above.137138---139140## Business-Policy Rules141142### Risk Ranking Factors143144When ranking accounts by renewal risk, consider these factors in combination:1451461. **Lifecycle status** — `renewal_risk` and `paused` are explicit risk signals. `renewal_risk` carries the highest weight.1472. **Renewal timing** — Past-due renewals (date before assessment date) are high-risk. Approaching renewals (within 90 days) are elevated risk.1483. **Revenue exposure** — Higher ARR amplifies the impact of other risk factors. Strategic-segment accounts get heightened attention.1494. **Customer sentiment (NPS)** — Low absolute scores (<30) and significant score drops (>15 points across the period) are risk signals.1505. **SLA health** — Declining SLA compliance, especially below 90%, indicates service degradation.1516. **Usage trend** — Declining product usage (>5 percentage points) signals disengagement.1527. **Overdue receivables** — Balances over $5,000 in 31+ day buckets increase risk. The older the bucket, the higher the concern.1538. **Tenure** — Accounts with fewer than 24 months of tenure have elevated churn risk.1549. **Expansion pipeline** — Open expansion opportunities partially offset risk (they indicate ongoing commercial engagement).155156### Action Assignment157158- `executive_qbr` — Critical-risk accounts, especially strategic/enterprise with multiple risk factors. Requires executive-level intervention.159- `collections_followup` — Accounts with significant overdue receivables (>$5,000) as a primary concern.160- `technical_recovery` — Accounts where SLA degradation or support-ticket issues are the dominant risk driver.161- `renewal_save` — Accounts with approaching or past-due renewals where the primary goal is retention.162- `nurture_monitor` — Medium/low-risk accounts that need regular attention but no immediate escalation.163- `no_action` — Accounts with no material risk signals.164165### Reason Code Assignment166167Assign the most specific, data-supported reason codes (up to 5). Prefer concrete, measurable signals over generic labels. When multiple codes apply, order by severity (most impactful first). Use `clean_billings` only when no other negative signal is present.168169### Board Sorting170171For retention action boards, the standard order is by risk severity group, then by ARR (descending) within each group, then by account ID for ties.172173### Follow-Up Due Dates174175When the task specifies follow-up due dates by action type, use those exact dates for the `next_touch_due_date` field:176177| Action | Typical Due Date Offset |178|---|---|179| `collections_followup` | ~15 days after period end |180| `technical_recovery` | ~18 days after period end |181| `renewal_save` | ~22 days after period end |182| `executive_qbr` | ~29 days after period end |183| `nurture_monitor` | ~36 days after period end |184185---186187## Exclusion Rules & Pitfalls188189### Data Quality190191- **Exclude spam and duplicate tickets** from all "clean" ticket counts. Check `is_spam` and `is_duplicate` flags.192- **Exclude retracted NPS responses**. Check both the `retracted` field in the NPS endpoint and `survey_status: "retracted"` in the metrics endpoint.193- **Do not round raw API values** before using them in output. The API values are already at the required precision. Rounding intermediate values introduces errors.194- **A/R entries without CRM matches are unlinked**, not errors. Subsidiaries, foundations, and alternative legal names that don't match any account's `legal_name` should be flagged as `unlinked` with `account_id: null`.195196### Pipeline197198- **Use `stage` not `state`** to classify won/lost/open. The `state` field may only contain `open`/`closed` while `stage` contains the granular classification (`Closed Won`, `Closed Lost`, `Proposal`, etc.).199- **Include all non-closed stages in pipeline counts**, including Prospecting and Discovery. These are valid pipeline stages.200- **Win rate denominator excludes open opportunities.** Use `won / (won + lost)`.201202### ARR Sources203204- **Prefer `billing_arr_current`** from the account profile as the source of truth for current ARR. This is the billing-system ARR.205- CRM ARR (`crm_arr`) may differ from billing ARR. When the task asks whether billing ARR is used, answer based on which source was actually used.206207### Risk Model208209- **Risk is multi-dimensional.** No single factor (not even `renewal_risk` lifecycle) determines risk alone. Combine signals.210- **Past-due renewal alone is not sufficient** for critical risk if all other indicators are healthy.211- **Expansion pipeline offsets risk** — an account with significant expansion activity may be engaged even if other signals are mixed.212213### General214215- **Read the answer template carefully.** Every field in the template must be populated with the correct type (object, array, string, number, boolean, null).216- **Sort orders matter.** When the task specifies a sort order (e.g., `customer_name ascending`), apply it exactly.217- **Response must be JSON only.** No explanatory text, markdown fences, or commentary.218- **Deterministic precision is required.** Currency to 2 decimals, percentages to 1 decimal, counts as integers.