> ## Documentation Index
> Fetch the complete documentation index at: https://docs.windbackai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Churn Risk Prediction

> Predict which customers are at risk of churning before they cancel.

# Churn Risk Prediction

Windback continuously scores every customer in your project to predict how likely they are to churn. Scores update daily so you can intervene before a cancellation happens.

## How It Works

The scoring algorithm analyzes **13 negative signals** and **5 positive signals** drawn from billing data, product usage, and support activity. Each signal carries a configurable weight, and the final score is normalized to a 0-100 scale where higher means more risk.

### Negative Signals

| #  | Signal                      | What It Measures                                     |
| -- | --------------------------- | ---------------------------------------------------- |
| 1  | **No events in 14 days**    | Customer has gone completely silent                  |
| 2  | **Declining usage**         | Week-over-week drop in event volume                  |
| 3  | **Support tickets**         | Rising number of open or recent tickets              |
| 4  | **Failed payments**         | One or more payment attempts have failed             |
| 5  | **Short sessions**          | Average session duration is falling                  |
| 6  | **Feature drop-off**        | Customer stopped using features they previously used |
| 7  | **Billing downgrades**      | Customer moved to a lower-tier plan                  |
| 8  | **Login gaps**              | Increasing time between logins                       |
| 9  | **API error spikes**        | Sudden increase in client-side API errors            |
| 10 | **Competitor page visits**  | Visits to known competitor comparison pages          |
| 11 | **Cancel page views**       | Customer viewed the cancellation page                |
| 12 | **NPS detractors**          | NPS response of 0-6                                  |
| 13 | **Payment method expiring** | Card on file expires within 30 days                  |

### Positive Signals

Positive signals reduce the overall risk score:

| # | Signal               | What It Measures                           |
| - | -------------------- | ------------------------------------------ |
| 1 | **Feature adoption** | Customer is actively adopting new features |
| 2 | **Billing upgrades** | Customer upgraded to a higher-tier plan    |
| 3 | **Team invites**     | Customer invited new team members          |
| 4 | **API usage growth** | Steady increase in API call volume         |
| 5 | **High NPS**         | NPS response of 9-10                       |

## Risk Levels

Scores map to four risk levels:

| Level        | Score Range | Recommended Action                        |
| ------------ | ----------- | ----------------------------------------- |
| **Critical** | 80 - 100    | Immediate personal outreach               |
| **High**     | 60 - 79     | Automated win-back email + internal alert |
| **Medium**   | 40 - 59     | Monitor closely, consider a check-in      |
| **Low**      | 0 - 39      | No action needed                          |

<Tip>Focus your team's energy on **Critical** and **High** customers. Medium-risk customers often recover on their own once a product issue is resolved.</Tip>

## Auto-Email Delivery Modes

When a customer crosses a risk threshold, Windback can notify them (or you) automatically. Choose one of two delivery modes.

<Tabs>
  <Tab title="Direct">
    Windback sends the email to the customer on your behalf using your configured sender domain. No code required.

    * Emails are generated by Windback AI and match the tone you select (friendly, professional, urgent).
    * You can preview and edit templates in the dashboard before they go out.

    <Note>Direct mode requires a verified sender domain. Go to **Settings > Email** to configure one.</Note>
  </Tab>

  <Tab title="Webhook">
    Windback sends a webhook payload to your endpoint so you can trigger your own workflows -- Slack alerts, CRM updates, custom emails, etc.

    See [Churn Risk Webhook Delivery](/features/churn-risk-webhook) for the full payload reference and setup instructions.
  </Tab>
</Tabs>

## Configuration API

Manage churn-risk settings programmatically with the configuration endpoints.

### Get Current Config

```bash theme={null}
curl https://api.windbackai.com/api/v1/projects/:slug/churn-risk/config \
  -H "Authorization: Bearer <token>"
```

**Response:**

```json theme={null}
{
  "enabled": true,
  "delivery_mode": "direct",
  "risk_threshold": 60,
  "webhook_url": null,
  "email_tone": "friendly",
  "check_interval_hours": 24
}
```

### Update Config

```bash theme={null}
curl -X PUT https://api.windbackai.com/api/v1/projects/:slug/churn-risk/config \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "delivery_mode": "webhook",
    "risk_threshold": 70,
    "webhook_url": "https://example.com/hooks/churn",
    "email_tone": "professional",
    "check_interval_hours": 12
  }'
```

<Warning>Changing `delivery_mode` takes effect immediately. Any in-flight emails for the previous mode will still be delivered.</Warning>

## Dashboard Features

The **Churn Risk** page in your project dashboard gives you a real-time view of your customer base.

<CardGroup cols={2}>
  <Card title="Risk Distribution">
    A breakdown of how many customers fall into each risk level, updated daily.
  </Card>

  <Card title="Customer List">
    Filterable table of all customers with their current score, top signals, and last activity date.
  </Card>

  <Card title="Score History">
    A per-customer timeline showing how their risk score has changed over the past 90 days.
  </Card>

  <Card title="Alert Log">
    A record of every auto-email or webhook delivery, including delivery status and timestamps.
  </Card>
</CardGroup>

<Info>Churn risk scoring requires at least 7 days of event data before scores become meaningful. New projects will see scores populate after the initial data collection period.</Info>
