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

# Alerts

> Send a WhatsApp template or an email automatically when a record is filed or moves stage, an agent escalates, an agent hits a knowledge gap, or another system calls in.

Alerts tell you, your team or the customer when something happens. Use them to email the sales team about every new site visit, to WhatsApp the customer when their booking is confirmed, or to message a manager when an agent escalates.

Open them from **Notifications** in the sidebar.

![The Notifications page with the WhatsApp and email senders and one alert](https://mintcdn.com/magicwebs/Y5otz65o1vDClhV_/images/console/notifications.png?fit=max\&auto=format\&n=Y5otz65o1vDClhV_\&q=85\&s=c401a01f104ed49410ae64fc4007972b)

## Senders

At the top, two cards show where alerts go out from:

* **WhatsApp**: your connected WhatsApp number. WhatsApp alerts can only send approved templates.
* **Email**: ready out of the box. Under **Senders**, set the sender name and reply-to address, and **Send a test email**.

## Create an alert

Choose **New alert**.

![The New alert dialog with event, channel, email template variables and recipients](https://mintcdn.com/magicwebs/lXS3DuVdQz1WpiFT/images/console/notifications-new-alert.png?fit=max\&auto=format\&n=lXS3DuVdQz1WpiFT\&q=85\&s=67ae7d1ee051f9c87084b8784a46d592)

**1. Name it**

For example "Email sales on new site visit".

**2. Pick the event**

| Event | Fires when |
| - | - |
| **Record filed** | An agent or your team files a record. Narrow it to one record book |
| **Record updated** | A record's details change |
| **Stage changed** | A record moves stage. Narrow it to one book and the stage it moved to |
| **New order** | An order is filed in the Orders book |
| **Escalation** | An agent hands a conversation to a person |
| **Knowledge gap** | An agent can't answer a question from the knowledge base |
| **Incoming webhook** | Another system POSTs to the alert's own URL |

**3. Choose WhatsApp or email**

* **WhatsApp**: pick a synced, approved template and fill each blank with text or a `{{variable}}` from the event.
* **Email**: pick an email template (see below).

The dialog lists every variable the event offers, such as the customer's name or the record's reference and details. Click one to copy it.

**4. Choose who gets it**

**The customer**, team members, or numbers and email addresses you type.

**5. Save and test**

Choose **Create alert**, then **Send test** to send it once with made-up details.

## Email templates

On the **Email templates** tab, choose **New email** and write the **Subject** and **Message** in plain text or HTML. Use `{{variables}}` from the event, for example `{{record.reference}}`, `{{record.person.name}}` or `{{record.details.visit_date}}`. Preview it, then **Save email**.

![The email template used for new site visits](https://mintcdn.com/magicwebs/lXS3DuVdQz1WpiFT/images/console/notifications-email-templates.png?fit=max\&auto=format\&n=lXS3DuVdQz1WpiFT\&q=85\&s=9669177273684c8e2f7d9dc9587d9ce6)

## WhatsApp templates

The **WhatsApp templates** tab lists templates synced from WhatsApp Manager. Approve them there first, then choose **Sync templates**. Pick one to **Send it now** or **Use in an alert**.

## Activity

The **Activity** tab lists every alert sent or not sent, who it went to and when. For anything that didn't go, it explains **Why it did not send**. Each alert card also shows sent and not-sent counts and its last error. Use the switch on a card to turn an alert off.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.