---
updatedAt: 2026-09-15T13:59:24.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Control Over Events, Tags and Promocodes

<HTMLBlock>{`
<p align="right" style="color: gray;">
  <a href="https://docs-ua.esputnik.com/docs/kontrol-trygeriv" style="color: gray; text-decoration: none;"><em>
    Read this article in Ukrainian ⮕
  </em></a>
</p>
`}</HTMLBlock>

There is always a risk that some technical or human error will occur that will cause the processes you have automated to fail. To find out about such problems promptly, set up alerts about:

* **Events** received during a specific period to ensure the correct functioning of workflows and segmentation by events. If the integration breaks, events stop flowing into the system, associated workflows do not run, and associated conditional segments are not updated.
* **Messages with specific** [tags](https://docs.esputnik.com/docs/adding-tags) sent over a specific period to maintain the expected frequency of mailings. Message tracking helps control mailing failures that are not related to the arrival of events: for example, due to a lack of funds.

> 📘 Note
>
> The most effective way to control triggers is to specify a lower limit on the daily number of events and message tags included in the workflow associated with that event. Therefore, we recommend that you assign tags to messages corresponding to the associated event.
>
> The daily count runs on a UTC calendar day, from 00:00 to 24:00 UTC, not on the account time zone.

* **The number of promocodes** in your eSputnik account to ensure that you have enough unused promocodes left because if they run out, messages that use the corresponding type stop working correctly: a bulk campaign with a promo code variable is paused, an email with a promo code variable in a workflow isn't sent, while a promo code substituted by the **Get promo code** block leaves the message to go out without a code.

## Creating Notification

1. Go to your profile settings → **Notifications** and click **New notification**.

<Image src="https://files.readme.io/6b15f07a18fbb16f29a643fe42bb5732458fbbbdfbfba77cd7d14f9e7485fc97-image.png" align="center" width="80% "  alt="Notifications settings page with the New notification button and account menu Settings option highlighted" />

2. Select the following parameters:

* **Type** (Event/Tag/Promocode),
* **Title**, or in the case of promotional codes – Type,
* **Amount**,
* **Period** (only for tags and events),
* **Notification type** (Alarm or Warning).

<Image src="https://files.readme.io/c8fb071-New_notification.webp" align="center" width="80% " alt="New notification dialog with Type set to Event, Amount set to 1, Period set to 1 day, and Type of notification set to Alarm" />

> 📘 Note
>
> We recommend using both types of notifications — **Warnings** and **Alarms**. For example, you can set a warning when there are 500 promocodes left in the system, and there is still time to respond, and an alarm for 50, when you immediately need to load the next list of promocodes.

3. Click **Create**.

You can set up as many notifications as you wish. But all of them will be transferred through one of the following event types:

* Warning — `alertSettingsWarningTriggerEvent`
* Alarm — `alertSettingsAlarmTriggerEvent`

<Image src="https://files.readme.io/cdfd6017f2fd2afbd7a58d47531d14aede5a4f9b6fa8a28a4887a43f12b5e040-image.png" align="center" width="80% "  alt="Event types page showing the alertSettingsWarningTriggerEvent and alertSettingsAlarmTriggerEvent events" />

The parameters of these events will contain the following data:

| <div style={{width:'250px'}}>Name</div> | Value                                                                                               |
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------- |
| `alertLevel`                            | WARNING/ALARM                                                                                       |
| `periodDays`                            | The period selected for counting (only for tags and events)                                         |
| `threshold`                             | The lower limit for tags/events/promocodes                                                          |
| `alertTrackingSourceType`               | Notification type (TAG, EVENT, PROMOCODE)                                                           |
| `alertTrackingSourceName`               | Tag or event title/promocode type                                                                   |
| `actualCount`                           | The number of sent messages/events/promo codes in the account at the time the notification was sent |
| `organisationName`                      | Your account name                                                                                   |

Create a message For each notification type – **Warning** and **Alarm** into which the parameter values from the event will be inserted, and a workflow through which this message will be sent.

## Substituting Event Parameters into the Message

Create email and/or SMS messages into which data from the event will be inserted using [Velocity variables](https://docs.esputnik.com/docs/introduction-to-velocity).

Insert the variables into the message involved in the workflow in the `$!name` format,  where `name` – the parameter name from which the value should be extracted is indicated in parentheses.

Since events can transmit data about both events and tags or promocodes, messages should be universal, for example:

`$!alertLevel` for the `$!organisationName` organization!

* **Notification type:** `$!alertTrackingSourceType`
* **Tag or event title/promocode type:** `$!alertTrackingSourceName`
* **The number of sent messages/events/promo codes in the account at the time the notification was sent:** `$!actualCount`
* **The period selected for counting (only for tags and events):** `$!periodDays`
* **The lower limit for tags/events/promocodes:** `$!threshold`

<Image src="https://files.readme.io/316304d5ac26ef204b34a81611a678d53cf8bc0651d9ec586dcbe13dc0794068-control-events.webp" align="center" width="80% " alt="Message template showing the alertLevel and organisationName variables in the heading and a bulleted list of other event variables" />

## Setting Workflow

Create 2 workflows – for the Warning and Alarm events – with the **Send obligatory (transactional) email** or the **Send transactional SMS tasks**.

Below is an example for the **Warning** workflow; the **Alarm** workflow should be done in the same way.

Fill in block fields:

1. Send obligatory (transactional) email:

* **Contact’s email:** manager's email address.
* **Message:** email with variables.

<Image src="https://files.readme.io/bb3e92a-alarms_5.webp" align="center" width="80% " alt="Workflow canvas with the Send obligatory (transactional) email block selected, showing the Message and Email fields highlighted" />

1. Send transactional SMS:

* **Message:** SMS with variables.
* **Phone:** manager’s phone number in full international format.

<Image src="https://files.readme.io/caf0ee4-alarms_6.webp" align="center" width="80% " alt="Workflow canvas with the Send transactional SMS message block selected, showing the Message and Phone fields highlighted" />

Connect events to workflows [according to the instructions](https://docs.esputnik.com/docs/configuring-workflow-startstop-conditions) and launch the workflows.

<Image src="https://files.readme.io/6e0e97db89ea04eb20ab3b2a4b4906edbb4e6750d0b04b4e286a1232980212d5-image.png" align="center" width="80% "  alt="Start/Stop configuration dialog with Event-based start, the alertSettingsAlarmTriggerEvent event, and Each time option highlighted" />

Now, whenever an event occurs related to one or another notification you created, the workflow will launch and send messages with information about the corresponding issues that need attention.