Buttons in messages
Buttons are used to allow the client to select a response option within a message. Sending messages with buttons is available in the following services:
- Scenario Dialogs
- Quick Replies
- Scenario Chat Bots
- Internal messengers (Bitrix24, kommoCRM, Altegio, and other CRMs)
Some communication channels do not support the button option — they will not be displayed in messages.
The table shows messengers and social networks where buttons can or cannot be sent.
|
Support buttons |
Do not support buttons |
|
|
How to add buttons to a message:
- Specify the button name inside triple curly braces.
Example: {{{Decline Button}}} - Follow the rules:
- Do not send buttons together with a file:
- For message type “file”, buttons are displayed as text
- Start the message with text:
- A message consisting only of buttons will not be sent
- Do not send buttons together with a file:
- Consider button length limits:
- WABA / WACA — up to 20 characters; maximum number of buttons: 40.
- Telegram Bot (classic) — up to 140 characters; maximum number of buttons under one message: 40.
- Telegram Bot (Inline) — up to ~18,880 characters (limit is unstable, depends on formatting); maximum number of buttons under one message: 40.
- Viber Bot — up to 250 characters; maximum number of buttons under one message: 40.
Sending messages with buttons via different communication channels
Add a button to the message according to the instructions in the previous section. Conditions may vary across different channels:
Buttons in a message can be displayed in a row or a column. The format depends on how they are written in the text.
Row format: Buttons are displayed in a single line. To set this format, add a space between buttons.
Example: {{{Button 1}}} {{{Button 2}}} {{{Button 3}}}
Column format: Buttons are displayed one below another. To set this format, remove the space between buttons or add a line break between them.
Examples:
- {{{Button 1}}}{{{Button 2}}}
- {{{Button 1}}}
{{{Button 2}}}
- No more than 3 buttons per message
- If the limit is exceeded, the message is split
Features:
- Buttons can be duplicated via bot or CRM automation
- Due to app updates, buttons may work нестабильно
Additional button types:
These are buttons displayed inside the chat window as message elements. Used for:
- selecting a response option without typing text;
- opening a link;
- simplifying interaction with a bot or scenario.
Features:
- Displayed directly in the message
- Supported in Telegram Bot
- May contain text or a link
- Do not require manual input
Adding an Inline button:
- Add the marker {{{inline}}} to the message text
- Specify the message text and buttons in triple curly braces:
“Select:
{{{inline}}} {{{test1}}} {{{test}}} {{{tetet}}}
{{{test2}}} {{{434434}}}
{{{test3}}} {{{rrrrr}}}”
You can also add links to Inline buttons:
{{{Button 1 url=https://www.google.com}}}
{{{Button 2 url=https://help.chatapp.online}}}
Specify the required URL after the string “1 url=”.
The “Contact Request” button allows requesting the user’s phone number.
This functionality is available only for:
- Telegram Bot
To add the button: specify the button text with the parameter requestContact
Example: Share your phone number with us {{{Share phone number requestContact}}}
After clicking the button, the user sends their contact details. In Scenario Dialogs, an incoming message is received containing:
- Full name of the contact
- Phone number
The phone number is automatically saved in the field: chat.phone
The received phone number can be used:
- in the bot builder via the field chat.phone
- for data transfer to external systems
Important: the number is sent only with user consent — it cannot be obtained automatically (Telegram Bot API and MAX Bot API limitation).
Additionally:
- The phone number is linked to the user’s chat
- In Bitrix24, the number is sent to the ChatApp open line
- The number is saved in the CRM contact if:
- the previous dialog is completed
- a new chat is started
Buttons can be added in any message sending block.
Workflow:
- Send a message with buttons
- Wait for the client’s response
- Check the selected option
- Route the scenario according to the corresponding branch
Источник: