# How to set up event notifications

You can set up event notifications to be sent to [Back Office users](https://docs.b2core.b2broker.com/back-office-guide/system/users#users) through the following channels: email, SMS, Slack, or Telegram.

## Prerequisites

The following prerequisites are required before setting up event notifications:

* If you plan to send event notifications through Slack or Telegram, create and configure a corresponding bot, and then specify the bot token in the **Slack bot** or **Telegram bot** field on the **System** > **Settings** page.

  To learn how to obtain the bot tokens, refer to [How to set up a Slack bot](https://docs.b2core.b2broker.com/how-to-articles/manage-communication-platforms/how-to-set-up-a-slack-bot) and [How to set up a Telegram bot](https://docs.b2core.b2broker.com/how-to-articles/manage-communication-platforms/how-to-set-up-a-telegram-bot).
* If you plan to send event notifications as direct Slack or Telegram messages to Back Office users, specify for each user their Slack and Telegram identifiers in the **Slack chat Id** and **Telegram chat Id** fields on the [Back Office user details page](https://docs.b2core.b2broker.com/back-office-guide/system/users#details).

  To learn how to get a user’s Telegram identifier, refer to [How to get Telegram chat, group and channel identifiers](https://docs.b2core.b2broker.com/how-to-articles/manage-communication-platforms/how-to-get-telegram-chat-group-and-channel-identifiers).
* Create notification templates for each channel through which you plan to deliver event notifications. To do this, navigate to **System** > **Templates**, and then select a channel for which you want to create templates.

  To view the examples of email, SMS, Slack, and Telegram templates, refer to[Templates](https://docs.b2core.b2broker.com/back-office-guide/system/templates).

After fulfilling the prerequisites, set up an event notification as follows:

{% stepper %}
{% step %}
Navigate to **System** > **Event Notifications**, and click **+Create** in the upper-right corner of the page.
{% endstep %}

{% step %}
In the **Event** dropdown, select an event for which you want to trigger notifications when the event occurs (for details, refer to [Event types for triggering event notifications for Back Office users](https://docs.b2core.b2broker.com/back-office-guide/references/event-types-for-triggering-event-notifications-for-back-office-users)).
{% endstep %}

{% step %}
In the **Description** field, specify a short description for the event notification.
{% endstep %}

{% step %}
In the **Users** field, specify the email addresses of Back Office users that will receive notifications. To add all Back Office users to the list of notification recipients, click **All users**.
{% endstep %}

{% step %}
Enable one or several channels to deliver notifications. The available options: **Email**, **Sms**, **Slack,** and **Telegram**.

* After enabling the **Email** or **Sms** option, expand the **Template** dropdown and select a notification template.

<figure><img src="https://514898401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGoRxAprhHu1goANW7FXt%2Fuploads%2Fgit-blob-ed4fcaffc8455e65a0fa90fb0910e25abd8ca226%2Femail-sms-notification-channels.png?alt=media" alt="Email and Sms notification options"><figcaption><p>Email and Sms notification options</p></figcaption></figure>

* After enabling the **Slack** or **Telegram** option, do the following:
  * Select **Private** to send notifications to the recipients as direct Slack or Telegram messages.

    The messages are sent to the chats that are specified in the **Slack chat Id** and **Telegram chat Id** fields on the [Back Office user details page](https://docs.b2core.b2broker.com/back-office-guide/system/users#details).
  * Select **Group** to send notifications to a specific group or channel.
  * In the displayed **Group Id** field, specify the identifier of a group or channel to which notifications will be delivered (for details, refer to [How to get Telegram chat, group, and channel identifiers](https://docs.b2core.b2broker.com/how-to-articles/manage-communication-platforms/how-to-get-telegram-chat-group-and-channel-identifiers)).
  * In the **Template** dropdown, select a notification template.

<figure><img src="https://514898401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGoRxAprhHu1goANW7FXt%2Fuploads%2Fgit-blob-541555f7fe59b8d0563e375e943b7fe9464039bf%2Fslack-telegram-notification-channels.png?alt=media" alt="Slack and Telegram notification options"><figcaption><p>Slack and Telegram notification options</p></figcaption></figure>
{% endstep %}

{% step %}
In the **Enabled** dropdown, select **Enabled** to send notifications after the selected event occurs.
{% endstep %}

{% step %}
Click **Save** to save the notification settings.
{% endstep %}
{% endstepper %}
