> For the complete documentation index, see [llms.txt](https://docs-convai.wavy.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-convai.wavy.global/bot-answers/events.md).

# Events

Chatlayer.ai Events are used to trigger a flow, based on an event that happens for a certain conversation. Multiple types of events allow for widely varying use cases.

To add an event, go to the Events module under Bot dialogs

![](/files/-MFgE1kJNeiW4mUC2V5o)

Create a new event and give it a name. In the dropdown, select which type of event you want to create.

## Variables changed event

This event allows you to guide the user towards a specific flow whenever a variable is changed. While creating a new “variables changed” event, you can select:

* Which variable do you want to watch
* Which bot dialog should be triggered whenever this variable changes

Whenever the variable is changed, for example in a go to, when a button is clicked or when an entity is detected, the event will be triggered. If the bot dialog triggered by the event has multiple messages, or connects to other bot dialogs with a go to, all of these will be shown.

If the bot dialog from where the variable was changed connects to other bot dialogs, these will be shown after the bot dialog of the event.

![](/files/-MFgE1kK-WF7I5PO7UgH)

In this flow, for example, a variable is changed in a quick reply in the “Change variable” bot dialog that triggers an event. This event triggers the “Event triggered” bot dialog, which has a “Go to” that points to “Event triggered step 2”. After these messages the flow is redirected to the "Send back after event" action, where the following configuration is placed.

![](/files/-MFgE1kLq-wm-M7-zL-N)

This results in the following flow:

![](/files/-MFgE1kMU7_LQ6QASywg)

The changed variables are also stored in the user session, where you can access them in the `events.variablesChanged` array.

![](/files/-MFgE1kNHQFqRhhj0MXa)

Chatlayer.ai customers often use the variables changed event to perform an API request through an [API action](/integrations/custom-back-end-integrations.md) whenever a specific variable changes.

## Silence detected event

{% hint style="warning" %}
The silence detected event is only visible when you have the voice channel enabled for your account.
{% endhint %}

This event allows you to configure where the user should be routed if the bot detects a silence longer than a value that you can choose.

![](/files/-MFgE1kO5lUxW6pS-ufY)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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-convai.wavy.global/bot-answers/events.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.
