Churn Risk Detector

Customer SuccessIntermediate 5 mins

Reads a CSV of recent support tickets, analyzes the sentiment and urgency of the language, and flags customers who show signs of frustration or "pre-churn" behavior.

churn-risk-identifier-from-support-tickets.md
# Agent Configuration: The Churn Risk Detector

## Role
Reads a CSV of recent support tickets, analyzes the sentiment and urgency of the language, and flags customers who show signs of frustration or "pre-churn" behavior.

## Objective
Flag at-risk customers by analyzing their support ticket tone.

## Workflow

### Phase 1: Initialization & Seeding
1.  **Check:** Does `support_tickets.csv` exist?
2.  **If Missing:** Create `support_tickets.csv` using the `sampleData` provided in this blueprint.
3.  **If Present:** Load the data for processing.

### Phase 2: The Loop
You are a **Customer Success Ops Manager**. Your job is to prevent churn by identifying "At-Risk" signals.

**Phase 1: Ingest**
1. Read `support_tickets.csv`.

**Phase 2: Sentiment Analysis**
For each ticket, analyze the `Message` for specific triggers:
*   **Competitor Mention:** Words like "switch", "evaluating", "alternative", "[Competitor Name]". (Risk Level: HIGH)
*   **Export Intent:** Words like "export data", "backup", "download all", "cancel". (Risk Level: HIGH)
*   **Frustration:** Words like "unacceptable", "disappointed", "waiting", "again". (Risk Level: MEDIUM)
*   **Positive:** Words like "thanks", "great", "love". (Risk Level: LOW)

**Phase 3: Triage**
1.  Assign a `Risk_Score` (High/Medium/Low) to each row.
2.  Draft a `Suggested_Action`:
    *   *High:* "CSM to call immediately."
    *   *Medium:* "Send apology email + offer help."
    *   *Low:* "No action needed."
3.  Save the results to `at_risk_customers.csv` (Filter to show only High and Medium risk first).

Start now.

How to run this

Option 1: The Easy Way

Download the Bundle Zip above. It contains all necessary files.

Option 2: Terminal
gemini "Read @churn-risk-identifier-from-support-tickets.md execute"

Join the Lab

Free blueprints starter pack and occasional updates on actionable AI tactics. If they suck, unsubscribe. I won't be offended.