task icon Task

Analyze CSAT Scores

Requirements
CSV file with survey data including a score column (CSAT, NPS, rating)
1

If the CSV path was not already provided, ask the user for it.
Common sources: Delighted, Wootric, SurveyMonkey, Zendesk, or custom exports.
The output path is defined by uiSession Customer Success Data.

5

VALIDATION: If 0 rows, stop and tell user the CSV has no data. If <20 rows, note for warning.

Interpret columns semantically per the interpretation guide. Look for: scores (CSAT/NPS/rating),
customers, dates, categories, text feedback. Write enriched output back to uiSession Customer Success Data
with: source, rowCount, columns, interpretations, detected (by type), possibleAnalyses, and data array.

7

Analyze the survey data:

  1. Use detected.scoreColumns (if multiple, ask user; if none, ask which column to use)
  2. Calculate average, distribution by score value, response count
  3. Identify trends over time if date columns exist
  4. Flag promoters (>=9) and detractors (<=6) by customer/segment
  5. Extract key themes from text feedback if available
  6. Break down by segment if category columns exist

Present using CSAT Score Analysis template. Include data tables.
Add sample size warning if <20 rows.

8

Provide 2-3 actionable recommendations:

  • Address low scorers (specific outreach, root cause)
  • Amplify what high scorers love
  • Close feedback loops for detractors
    Be specific: name customers/segments, quantify impact.
                    To run this task you must have the following required information:

> CSV file with survey data including a score column (CSAT, NPS, rating)

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: Delighted, Wootric, SurveyMonkey, Zendesk, or custom exports.
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 per the interpretation guide. Look for: scores (CSAT/NPS/rating),
customers, dates, categories, text feedback. Write enriched output back to `./documents/tmp/success-data.json`
with: source, rowCount, columns, interpretations, detected (by type), possibleAnalyses, and data array.


7. [Read Customer Success Analytics Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/success.analytics.guide.md` (CSAT analysis output format and thresholds)

8. Analyze the survey data:
1. Use detected.scoreColumns (if multiple, ask user; if none, ask which column to use)
2. Calculate average, distribution by score value, response count
3. Identify trends over time if date columns exist
4. Flag promoters (>=9) and detractors (<=6) by customer/segment
5. Extract key themes from text feedback if available
6. Break down by segment if category columns exist

Present using CSAT Score Analysis template. Include data tables.
Add sample size warning if <20 rows.


9. Provide 2-3 actionable recommendations:
- Address low scorers (specific outreach, root cause)
- Amplify what high scorers love
- Close feedback loops for detractors
Be specific: name customers/segments, quantify impact.