# Alerts

## Create a custom alert

Use alerts to track key data changes for your bot.

{% hint style="info" %}
Note: alerts can only be applied to metrics available in custom statistics. Refer to the **Annex** section to see all available metrics.
{% endhint %}

### First step: create a predefined source

Before creating an alert, you must first create a **predefined source**, which corresponds to the type of data your alert needs to track.

To do this, go to **Custom Statistics > Configuration > Predefined Sources**.

### Second step: configure your alert

1. Go to **Custom Statistics > Configuration > Alerts** and click on the "Add an alert" button.

<figure><img src="/files/EQk2NJQ2RfHJoiNaD3YA" alt=""><figcaption></figcaption></figure>

2. Fill in the following fields:

<figure><img src="/files/mrkIT9jLjY7m61sa4J7M" alt=""><figcaption></figcaption></figure>

* **Label (required)** : This is the name of your alert.
* **Predefined Source** : Choose the predefined source you created from the dropdown list.
* **Trigger Type** : This corresponds to how the data will be displayed. You can choose between **Absolute** (data will be displayed as a number) and **Relative** (data will be displayed as a percentage).
* **Threshold** :

  * **Is less than** : The alert will trigger when the indicator is **below** the threshold.
  * **Is greater than** : The alert will trigger when the indicator is **above** the threshold.

  *For example, if you set an absolute minimum threshold of 10 on the number of conversations during a given period, you will receive an alert when the bot has fewer than 10 conversations during that period.*
* **Comparison Period** : This is a timeframe during which the threshold will be calculated. *For instance, if you set the period to "week," the alert will trigger if the total number of conversations during the week is below/above the defined threshold.*
* **Comparison To** (*available only when using a relative threshold*) : This allows you to specify the timeframe against which the comparison period will be compared.\
  \&#xNAN;*For example, if you set the comparison period as "day" with a relative minimum threshold of 10%, choosing "previous day" means the alert will trigger if there are fewer than 10% new conversations compared to the previous day. This feature is useful for monitoring the rate of change in a data source.*

3. Save your alert by clicking on "**Add**".
4. Your alert will appear in the top left corner of your screen.
5. You can delete your alert by clicking on the trash bin icon.

<figure><img src="/files/kpqCj4aAC0jZYqVWnkFc" alt=""><figcaption></figcaption></figure>

To view the results of your alerts, go to **Custom Statistics > Alerts**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-en.dydu.ai/custom-analytics/configuration/alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
