Detect Churn Risk
If the CSV path was not already provided, ask the user for it.
Common sources: Product analytics exports (Mixpanel, Amplitude, Heap), CRM health data,
or custom usage reports. The output path is defined by Session Customer Success Data.
VALIDATION: If 0 rows, stop and tell user the CSV has no data. If <20 rows, note for warning.
Interpret columns semantically. Look for: usage/activity metrics, customers, dates, amounts
(ARR/value), renewal dates, login counts. Write enriched output back to Session Customer Success Data
with: source, rowCount, columns, interpretations, detected (by type), possibleAnalyses, data array.
Analyze usage data for churn risk. State the analysis date used for calculations.
Define risk signals from available data:
- Inactivity: >30 days since last login = at-risk
- Low usage: <25th percentile of cohort
- Renewal proximity: <30 days to renewal = urgent
- Support burden: cross-reference with ticket counts if available
Score each customer, segment into High/Medium/Low risk.
If ARR/value column exists, calculate revenue at risk per tier.
Present using Churn Risk Detection template. Include high-risk customer table.
Add sample size warning if <20 rows.
Provide prioritized recommendations:
- Immediate actions for high-risk customers (name them, include ARR)
- Process improvements to catch risk earlier
- Patterns suggesting product or onboarding issues
Be specific with customer names and revenue impact.
To run this task you must have the following required information:
> CSV file with customer usage data including login frequency, feature usage, or activity metrics
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. If the CSV path was not already provided, ask the user for it.
Common sources: Product analytics exports (Mixpanel, Amplitude, Heap), CRM health data,
or custom usage reports. The output path is defined by `./documents/tmp/success-data.json`.
2. [Gather Arguments: Parse CSV] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `inputPath`: CSV file path from user
- `outputPath`: ui:session.success.data path
- `hasHeaders` (default: "true") - Whether first row is headers: true, false
- `delimiter` - Field delimiter (auto-detected if empty)
- Packages: papaparse
3. [Run Code: Parse CSV]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/stdlib.csv.parse/preview,
"args": [
"inputPath",
"outputPath",
"hasHeaders",
"delimiter"
]
},
"packages": ["papaparse"]
}
```
4. [Read CSV Column Interpretation Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/stdlib.csv.interpretation.md` (Semantic column type detection guidance)
5. [Read Session Customer Success Data]: Read the file at `./documents/tmp/success-data.json` and analyze its contents (Load parsed CSV data)
6. VALIDATION: If 0 rows, stop and tell user the CSV has no data. If <20 rows, note for warning.
Interpret columns semantically. Look for: usage/activity metrics, customers, dates, amounts
(ARR/value), renewal dates, login counts. Write enriched output back to `./documents/tmp/success-data.json`
with: source, rowCount, columns, interpretations, detected (by type), possibleAnalyses, data array.
7. [Read Customer Success Analytics Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/success.analytics.guide.md` (Churn risk detection output format and thresholds)
8. Analyze usage data for churn risk. State the analysis date used for calculations.
Define risk signals from available data:
- Inactivity: >30 days since last login = at-risk
- Low usage: <25th percentile of cohort
- Renewal proximity: <30 days to renewal = urgent
- Support burden: cross-reference with ticket counts if available
Score each customer, segment into High/Medium/Low risk.
If ARR/value column exists, calculate revenue at risk per tier.
Present using Churn Risk Detection template. Include high-risk customer table.
Add sample size warning if <20 rows.
9. Provide prioritized recommendations:
1. Immediate actions for high-risk customers (name them, include ARR)
2. Process improvements to catch risk earlier
3. Patterns suggesting product or onboarding issues
Be specific with customer names and revenue impact.