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

# Custom alerts

> Ping me when CSAT drops below 80% — without waiting for the daily brief.

Capacity breach alerts and agent CSAT auto-flag handle the two biggest "you need to know NOW" cases out of the box. Custom alerts let you define your own thresholds for any of the eight signals.

## Out-of-the-box alerts

These fire from Slack without any setup:

* **Capacity breach alert** — when your weeks-to-breach drops to 8 or fewer, with a 24h cooldown. Wired in [Slack delivery](/help/slack#capacity-breach-alerts).
* **Agent CSAT auto-flag** — when an agent's CSAT trajectory sustains falling 3+ weeks with a ≥2pp drop. Wired in [Slack delivery](/help/slack#agent-csat-alerts).

Both fire **event-driven** as of wave 4: the moment a metric write (manual save, Intercom refresh, CSV import) crosses the threshold, Forepost evaluates and posts. The hourly cron still runs as a safety net but most users will see alerts within seconds of a real change.

## Defining your own alerts

For everything else, custom alert rules let you say "ping me when *X* is above/below *N*".

### Available metrics

| Metric               | Direction that matters                           |
| -------------------- | ------------------------------------------------ |
| CSAT                 | usually `lt 80` ("ping me below 80%")            |
| Volume               | usually `gt 1500` ("ping me on a spike")         |
| First response       | `gt 4` (hours)                                   |
| AI deflection        | `lt 50` ("ping me if deflection collapses")      |
| Open tickets         | `gt 300` ("ping me on a queue blowout")          |
| Agent utilisation    | `gt 85` ("ping me when the team's at the cliff") |
| Backlog age          | `gt 14` (days, "ping me on forgotten issues")    |
| One-touch resolution | `lt 50` ("ping me on efficiency drops")          |

### Cooldown

Each rule fires at most once every 6 hours. Same metric crossing the threshold twice in a day is one alert, not two. This is shorter than the breach/agent cooldown because user-defined rules tend to be "I want to know now" rather than "warn me sparingly."

### How to add a rule

**Settings → Delivery → Custom alerts.** The section lists your existing rules and gives you a small form to add a new one: metric dropdown, comparator (`<` or `>`), threshold, optional label. **Add** appends it to your list. Each rule shows `last fired` when it's posted to Slack at least once. Delete a rule by clicking **Delete** on its row.

The API is also available directly:

```bash theme={null}
POST   /alert-rules                  # create
GET    /alert-rules                  # list
PATCH  /alert-rules/:id              # update (enabled, threshold, label)
DELETE /alert-rules/:id              # delete
```

## Why these rules don't go via email

Custom alerts are Slack-only. Email is a poor medium for "right now" notifications; if Slack delivery isn't configured for your workspace, alerts won't fire even if a rule is enabled. The capacity breach + agent CSAT alerts have the same constraint.

## What custom alerts can't do (yet)

* **Window-based comparators.** "CSAT dropped 5pp in 24h" isn't possible yet — only absolute "lt"/"gt" thresholds. The trajectory math already exists for the Weekly Watch; surfacing it as a rule type is a follow-up.
* **Email/webhook delivery.** Slack only.
* **Per-agent rules.** Rules evaluate the workspace-level metric, not per-agent. For per-agent CSAT decline, the built-in auto-flag already handles it.

## Privacy

Alert rules live in the same D1 row scope as your workspace. No external service sees them. Slack-posted alerts use your existing incoming webhook (the same one the Daily Brief uses), so no new permission is required.
