# Alerts

Source: https://outflare.ai/docs/guides/alerts/

> Hear about hot replies and hot website visitors as they happen, in the app, by email to the right person, in Slack, and as a webhook.

**Shipped** Alerts for hot replies and hot website visitors, in the app, by email, in Slack, as a webhook, in the digest and for agents.

An alert says something needs a person now. Outflare raises one once for each thing that happens:

| Alert | When | Who it's for |
| --- | --- | --- |
| Hot replies (`reply.hot`) | A reply is labelled interested, meeting booked or question, by the built-in rules, a person, or [your own AI model](/docs/guides/inbox/#ai-labelling-with-your-own-key) at 80% or more. A label waiting for review alerts once someone confirms it. | The person the reply is assigned to, else whoever made the sequence. |
| Hot website visitors (`visitor.hot`) | A known person or company reaches your hot score on the website, at most once a week each ([website visitors](/docs/guides/website-visitors/)). | The owners and admins. |
| A number crossed a line (`insight.threshold`) | A saved trend's number went over a line you set under [Trends](/docs/guides/trends/#alert-on-a-number), once per crossing. | Whoever set the alert up, else the owners and admins. |
| New errors (`error.new_issue`) | Your site or server threw an error nobody has seen before, or one you resolved came back ([Errors](/docs/guides/errors/)). At most ten an hour for a brand. | Everyone who can read analytics in the app. Emails are off until you switch them on, on the Errors page or here; then the owners and admins. |
| Customers waiting on Telegram (`telegram.waiting`) | A customer wrote to a [company Telegram account](/docs/guides/team/#summaries-and-alerts) and nobody has answered for four hours, once per wait. | The account's holder, else the owners and admins. |
| Telegram account handovers (`telegram.handover`) | A synced company Telegram account was given to someone; its recent customer chats are summarised for them. | The new holder, else the owners and admins. |

Each alert is:

- **Kept in the app** under **Settings → Alerts**, newest first, with a link to the reply or visitor.
- **Sent as the `alert.raised` [webhook](/docs/api/webhooks/)**, with ids only, so Slack, a CRM or Zapier can act on it.
- **Counted in the [digest](/docs/guides/digests/)**.
- **Emailed** to the person it's for, to every owner and admin, or to nobody, as you choose.
- **Posted to Slack**, in a channel you pick, through your own Slack.

## Alert emails

Alert emails come from Outflare's account email, the one that sends sign-in links, so there is nothing to set up. They say what happened and link to it, and never quote the reply. Each person gets at most 50 a day; the rest wait in the app. Whoever caused an alert, such as the person who labelled the reply, isn't emailed about it.

Under **Settings → Alerts**, owners and admins choose who gets each kind by email: **The person it's for** (the default for every kind but new errors, whose emails start as Nobody; owners and admins when there is nobody in particular), **Owners and admins**, or **Nobody**. Anyone can **Mute** a kind for themselves.

To mute many kinds at once, use **Show** (for example **Not muted for me**, or by who gets the email) or the search box to narrow the list. Then click **Mute all for me**, which mutes every kind shown in one click. Tick boxes let you pick only some, and **Undo** puts back exactly what that click changed. **Unmute all for me** works the same way.

A brand can choose differently from the workspace through the API:

```sh
curl -X PUT https://outflare.example.com/v1/brands/$BRAND/alerts/settings \
  -H "Authorization: Bearer $OUTFLARE_TOKEN" -H "Content-Type: application/json" \
  -d '{"brand_id": "'$BRAND_ID'", "kind": "visitor.hot", "email": "off"}'
```

`email` is `owner`, `admins`, `off`, or `null` to follow the workspace again. Changing settings needs `workspace.manage`.

## Slack

Connect your Slack under **Connectors → Slack**: sign in with Slack, or paste a bot token from a Slack app of your own (bot scopes `chat:write`, `chat:write.public`, `channels:read` and `groups:read`). Outflare only posts, and never reads your messages. Then pick a channel for each kind of alert under **Settings → Alerts**. Each post says what happened and has a button to open it in Outflare. Without a Slack connection, nothing is posted.

Through the API, list the channels with `GET /v1/workspaces/{ws}/alerts/channels?integration_id=` and pick one:

```sh
curl -X PUT https://outflare.example.com/v1/brands/$BRAND/alerts/settings \
  -H "Authorization: Bearer $OUTFLARE_TOKEN" -H "Content-Type: application/json" \
  -d '{"kind": "reply.hot", "slack_integration_id": "'$SLACK_ID'", "slack_channel": "C0123456789"}'
```

Send both as `null` to stop posting.

## API and agents

`GET /v1/brands/{brand}/alerts` lists alerts, newest first, with a `title`, a line of `text` and the app `path` that has each one. Filter with `kind` and page with `before` (`next_before` from the last page). You see the kinds your role can read: hot replies need `inbox.read`, hot visitors `customers.read`, and brand-limited people see their brands' alerts and the shared ones.

`GET /v1/brands/{brand}/alerts/settings` shows the kinds and who gets each, and `PUT /v1/brands/{brand}/alerts/mutes` with `kind` and `muted` mutes one for you, or with `kinds` (a list, all or none) mutes many at once. Agents use `list_alerts`, `get_alert_settings`, `set_alert_settings`, `list_alert_channels` and `mute_alerts`.

## In your CRM

Hot replies can also land in HubSpot as a note on the contact and a follow-up task for the lead's owner, through your own HubSpot connection. Set `push_replies` and `reply_tasks` on it ([Calendars and HubSpot](/docs/integrations/calendars-and-hubspot/)).
