---
title: "Alert ID Randomization"
slug: "alert-id-randomization-1"
updated: 2023-01-06T15:50:01Z
published: 2023-01-06T15:50:00Z
---

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

# Alert ID Randomization

If you have any of these requirements:

- You want to receive Alerts with specific IDs associated with them
- Alert IDs associated with the Alerts must be random and in incremental order
- The last Critical Alert and the Improved Alert following it must share the same Alert ID

Then Alert ID Randomization is the solution.

To achieve this we have to use the following macros:

- `epoch=${timeepoch}`
- `timeid=${TimeFormat}`
- `groupitemid=${AlertGroupItemId}`

The following screenshots highlight the Alert IDs associated with each Critical Alert triggered and their Improved Alerts with the same Alert IDs – ![Alert1.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360078363811-Alert1.png) ![Alert2.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360078249272-Alert2.png) ![Alert3.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360078363831-Alert3.png) ![Alert4.png](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360078249292-Alert4.png)

Now the tricky part is if we only use `timeid=\${TimeFormat}` or `epoch=\${timeepoch}` as Macros, there are chances where a single node triggering multiple tests would end up sharing the same TimeID/Epoch value (*happens rarely*) but to counter this behavior, we already have Macros like `TestName/TestID` to help bucket Alerts related to each test separately but they wanted a granular approach (*In-terms of numbers/IDs only*).

For the same request, we added `groupitemid=\${AlertGroupItemId}` Macro, which adds a dedicated random ID to each alert type (*Timing/Availability/Content, etc based Alert Type*) which is configured for each individual test and this ID stays consistent for that specific Alert type. This way, they can not only keep general track of their Alerts (*critical/Improved*) on the basis of IDs but also have a dedicated ID to track the type of Alert which was triggered.

Alert Email Macros **–** *[https://docs.catchpoint.com/docs/alert-email-macros](https://docs.catchpoint.com/docs/alert-email-macros)*
