> For the complete documentation index, see [llms.txt](https://docs-en.dydu.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-en.dydu.ai/custom-analytics/configuration/alerts.md).

# 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**.
