Message with buttons
What is message with buttons?
A message with buttons is used to display a text message to the user along with several clickable options, encouraging the user to take a specific action. The maximum message length is 640 characters. You can add up to 3 buttons under each message, each assigned to one of the available actions.
Avoid long messages. It is better to shorten the content, divide it into several separate messages, and use bullet points or emojis for better clarity of the communication.
Each message can have three versions depending on the user’s gender. To use this option, hover over the area around the text field to display the appropriate button.
Remember to always complete the third option in case the user’s gender is not recognized.
Audio version
Each text message can also be provided in an audio version. This is especially helpful when configuring voice bots. In the audio version of the message, use phonetic transcription, a shorter message, or SSML for better control over how the voice bot reads specific parts of the text, such as numbers, names, or abbreviations. More information about voice bot configuration can be found here
Remember not to use bullet points and emojis in the audio versions of messages.
Buttons
Button configuration
Each button should have a simple name that describes the action to be taken when it is clicked. For buttons used in bots on Instagram or Messenger, the maximum button name length is 20 characters. For bots used on websites, the maximum button name length is 40 characters.
WhatsApp does not support buttons. You can still add them in the bot’s structure, but they will not be visible in the conversation on WhatsApp. This can be circumvented by adding NLP to the buttons. More information about using NLP with buttons can be found below.
After clicking
Each button can perform one of the following actions.
Go to block
For this button, the user will be shown the block specified in the configuration. During configuration, you can use an existing block or create a new block from this view.
Call
The user will initiate a phone call to the phone number specified in the configuration or stored in a variable.
Remember to set the correct country code prefix for manually entered phone numbers.
URL
The user will be redirected to the specified webpage, which can be opened at 100%, 70%, or 40% of the screen height.
Remember to provide the full URL address, including https://.
Go to next item “Next”
The user will be shown the next element of the current block.
Go to Messenger Webview
The user will have a web page opened without leaving the Messenger conversation, with capabilities such as downloading user IDs, closing the page at a specified time, etc. (more information available here).
Go to block stored in the variable
The user is redirected to a block stored in a user variable, meaning different users may be directed to different blocks.
The most commonly used variables for this case are
{{last_visited_block_id}}and{{last_shown_block_id}}.
Button visibility
Each button can be displayed to only specific groups of users. To use this feature, you need to select the “Display to” tab visible in the button configuration window, activate the option “Show when condition is met,” and choose the condition that must be met for the user to see the button.
Available options are:
- User variable – the button will be displayed only to those users for whom the variables meet specific values defined in the condition.
- Active contest – the button will be displayed only when there is an active contest available for the bot.
- Time range – the button will be visible only during the specified period.
- Recurring date – the button will be displayed only on specified days of the week, within a chosen time range.
A button can also be hidden from all users without exception. This is useful, for example, when we want to temporarily disable a part of the scenario without deleting it from the bot structure.
Actions
For each type of button, you can also assign actions to be performed when the user clicks the button. Available actions include:
- Save user data
- Enable moderator mode
- Statistical event
These actions can be set for the following types of buttons:
- Go to block
- URL
- Go to next element (“Next”)
- Go to block stored in a variable
You can find more information about actions here.
NLP
For each type of button, you can also define intents. Intents are phrases that a user can type or say during a conversation with a voice bot, which will move them to the next stage of the scenario.
For buttons in a message with buttons, remember to include all variations of a given word or versions of words with typos.
NLP can be set for the following types of buttons:
- Go to block
- Go to next element (“Next”)
- Go to block stored in a variable
You can find more information about NLP and intents [here](link to NLP and intents information).