For the complete documentation index, see llms.txt. This page is also available as Markdown.

Events

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

Events are a versatile way to trigger a flow whenever either:

  • a variable changed

  • a silence was detected

Note that Events are not the same as Track events, which are used for analytics purposes.

Variables Changed event

Using a Variables Changed event will allow you to trigger a block whenever a variable value is changed. This can happen for example within a Condition block, a button, or even when an entity is detected. In other words, the bot will continue to the next block set to happen when this change of variable was detected.

To add an Variables Changed event to your bot:

  1. Open the Events page under the Bot builder tab, on the left-hand side of the screen.

  2. Click on Create event.

  3. Fill in the event with the features that you would like. In this example, we want to trigger the block called Variable changed whenever the test_variable changed.

  4. Click on Create.

Please note that if you want to create an event triggered when a variable changed, that variable needs to be created beforehand, otherwise you won't find it in the dropdown menu.

Create a Variables changed event

This results in the following flow:

A flow example where a Variables Changed event takes place.

And this flow will result in this type of conversation:

An example of conversation using a Variables changed event.

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

Access the changed variables from your Debugger tab.

Silence Detected event

Silence Detected events allow you to steer the conversation to a new block when the user doesn't respond for a defined period of time. The duration of silence can range from 1 minute to a maximum of 1440 minutes (24 hours).

Silence Detected events are not the same as Delays, which are a way to wait before the bot goes to the next block. Learn more about Delays here.

To add a Silence Detected event to your bot:

  1. Open the Events page under the Bot builder tab, on the left-hand side of the screen.

  2. Click on Create event.

  3. Fill in the name, trigger and duration (in minutes) that you would like to wait before the next block. In this example, we trigger the block called Next block after 1 minute.

  4. Click on Create.

Create a Silence Detected event.

You can create multiple Silence Detected events within one bot. All of them will start counting at the same time, i.e. your bot will prompt the user at several intervals. It's best practice to not create multiple Silence Detected events with the same duration so that users aren't spammed with multiple messages in a row.

Whatsapp Flow Completed event

Whatsapp Flow Completed events allow you to handle the events created by whatsapp when a user completes a whatsapp flow . To add a Whatsapp Flow Completed event to your bot:

  1. Open the Events page under the Bot builder tab, on the left-hand side of the screen.

  2. Click on Create event. And choose Whatsapp flow completed as trigger

  3. Fill in the name, destination variable and bot dialog to visit

  4. Click on Create.

The data the user provided when completing the flow will be saved in the chosen destination variable and the bot will continue from the dialog chosen in the Bot dialog to visit field.

You can only define one Whatsapp Flow Completed event per bot version. If your conversation includes multiple whatsapp flows you should make sure to handle the possible differences in the destination bot dialog

Last updated

Was this helpful?