Actions allow your chatbot to do things behind the scenes when the chatbot user interacts with your chatbot, such as setting or clearing variables, adding or removing tags, subscribing a chatbot user to broadcasts, scheduling notifications, storing data, running scripts, or sending custom analytics.
Actions can be added to entry points, conversations, passages, logic, the condition tabs and Else section within logic, and any button-like bot message content type or expected user response, such as:
Entry point actions are triggered every time the chatbot user enters your chatbot from that entry point, before the chatbot starts the first passage of the conversation, and before any conversation, passage, or message actions.
Conversation actions are triggered every time the chatbot switches to that conversation, including if a conversation has been resumed, or if a passage has been configured to retain the previous conversation context. Conversation actions trigger before any passage or message actions.
Passage and logic actions are triggered when the chatbot starts the passage or logic, before the chatbot checks the logic conditions or sends the first message bubble of the passage. Actions in logic condition tabs and Else sections are triggered when the condition or Else section is met, before the chatbot runs the script or starts the passage defined in the logic.
Message actions are triggered when the chatbot user interacts with the button or quick reply with the configured action.
You can:
- Configure an action. You can add as many actions as you need.
- Delete an action.
When a bot message or Quick Reply has an action attached, it displays an icon to indicate the type of action that has been configured.
| Action | Description |
|---|---|
|
Save value to variable |
Save a value to a variable for this chatbot user. This will overwrite any existing value the chatbot user has for that variable. If the variable has an expiry, the expiry timer is reset. You can save a value based on the title of the button, passage, conversation, or entry point, or define your own value using placeholder chips or your own text. Variable values can also be set in scripts. |
|
Reset value of variable |
Set the value of a variable back to its default value. If the variable does not have a default value configured, it is set to blank. You can also set an expiry time to automatically reset the variable's value after a specified period. |
|
Reset values of all variables |
Set the values of all variables back to their default value. Any variable that does not have a default value configured is set to blank. You can also reset all variable values in scripts. |
| Save user data |
Store the value of the button label or a value you define to the chatbot user's context data. You can use this data elsewhere in the chatbot as a variable. See more information on the Save data configuration fields. |
| Remove user data | Remove the data stored for this variable from the chatbot user's context data. |
| Subscribe to broadcasts | Subscribe the chatbot user to broadcasts. |
| Unsubscribe from broadcasts | Unsubscribe the chatbot user from broadcasts. |
| Schedule an event notification |
Schedule a notification for this chatbot user. For example, a reminder message for an appointment they have booked. The date and time the notification is sent is determined by the notification settings, relative to when it is scheduled for the chatbot user. |
| Unschedule an event notification | Remove a scheduled event notification for this chatbot user. For example, if they have cancelled the appointment, they should not receive a reminder message. |
|
Set a Mixpanel user profile property |
Updates the chatbot user's Mixpanel profile to add a property with the name and value you set. If the property already exists for the chatbot user, the existing value is overwritten. |
| Send a custom event to analytics |
Send a custom event to your integrated analytics platform. You can define the name of the event, and optionally define the value that is sent. See more information on the Send a custom event to analytics configuration fields. |
| Send a Facebook page event | Send an event to the Facebook page configured for your Meta Messenger integration. |
| Run script | Select a script to be run when the chatbot user presses this button or Quick Reply. |
| Add tag |
Add a tag to the chatbot user conversation to provide metadata and direct livechat requests in your integrated livechat platform. See Tags. You can also add tags using scripts. Tags that you have removed from your livechat platform are shown as expired. Expired tags cannot be added. See Expired tags. |
| Remove tag |
Remove a tag from the chatbot user conversation. You can also remove tags using scripts. |
| Remove all tags |
Remove all tags from the chatbot user conversation. You can also remove all tags using a script. |
Save value to a variable
Define the value you want to save, and the variable you want to save it to.
| Field | Description |
|---|---|
| With | Clear this checkbox to define your own value to use. |
| = |
The value to store to the variable. The value defaults to the title of the button, passage, conversation or entry point that triggered the action. Clear the With checkbox to define your own value. Type @ to use the value of a placeholder chip such as a constant, entity, or another variable. |
| to |
The variable you want to store the value in. Any value currently stored in this variable is overwritten. The maximum length that can be stored in a variable is 4096 characters. |
Save data
Define the name and value to save.
| Field | Description |
|---|---|
| Name | The name used to access the data in the store. If this name is already in use, the existing value will be overwritten. |
| Override Value | By default, this action stores the button label as the value. Select this setting to define the value to store. |
| Value |
The value you want to store. The maximum length of data that can be stored to one data field is 4096 characters. |
Send a custom event for analytics
Define the name and value to send.
| Field | Description |
|---|---|
| Name | The name of the event you want to send. |
| Override Value | By default, this action sends the button label as the value. Select this setting to define the value to store. |
| Value | The value you want to send. |