Rich Messaging
Bot Builder supports several kinds of rich media for use in your bot's messages. Rich media enhances messaging with options such as list pickers, buttons, and links. This allows you to provide a richer experience for your contacts compared to plain text messages.
When you include rich media in bot messages, always set up rich messaging fallback. This ensures that the contact receives the message even if the channel doesn't support the media type.
Supported Rich Media Types
Bot Builder supports the following rich media types:
Rich Media Type | Details |
---|---|
Buttons |
Description: Create a set of buttons that contacts can click. Buttons are persistent in the conversation history. This means that later in the conversation, contacts can scroll up in the chat window and use a button. Channel support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 3 Variable support: Yes Button actions: Trigger an intent or open an URL |
Description: Cards can combine images, structured text, and buttons into one message. Channel support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 10 Variable support: Yes Button actions: Trigger an intent or open an URL |
|
Description: Send a URL with an image included. The contact can click on the link or image to visit the URL. Channel support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 1 Variable support: Yes Click actions: Open URL (default option, cannot be modified) |
|
List pickers |
Description: Create a list of options the customer can choose from. Channel support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 10 options Variable support: Yes Click actions: Trigger an intent or send text |
Description: Upload a multimedia file. Supported file types:
Channel support:
Max number per message: 1 Variable support: Yes Click actions: Can click to open the multimedia, depending on the channel. |
|
Description: Similar to buttons; offer a list of options for the customer to choose from, usually to help narrow down their intent. Quick replies are not persistent in the conversation history. This means they don't remain available for use later in the conversation. After a new message appears in the chat, the quick replies disappear. Channel support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 12 Variable support: Yes Click actions: Trigger an intent or send text |
|
Adaptive Cards |
Description: Developed by Microsoft, Adaptive Cards are a method of creating rich messaging Elements in digital messaging such as buttons, images, menus, and option pickers. content. They're an open card exchange format that allows you to send UI content in a common and consistent way. Learn more about using Adaptive Cards with your bot. Channel Support:
For channels A way for contacts to interact with agents or bots. A channel can be voice, email, chat, social media, and so on. that don't support Max number per message: 1 Variable support: Yes Click actions: Submit or open URL |
Variables in Rich Media
You can use variables in most of the supported rich media types. In Bot Builder, slots Entity extracted from contact's message and saved for use in bot responses. Similar to a variable. are used as variables. The value the slot contains replaces the variable when the bot sends the message. You must ensure that the slot collects the correct value before using it as a variable during the interaction. This allows you to substitute information into messages containing rich media, as long as you have a slot that captures the information.
To add a variable, use this syntax: {slot_name}. If the slot contains a nested JSON object, you can access the values in the object using dot notation: {slotName.parameter}.
For example, if you want the bot to greet the contact with their first name, you would need a slot to hold the first name and a way to fill the slot, such as a pre-chat form. If the slot is contact_firstName, you would enter this text in the greeting message the bot sends: Hello {contact_firstName}!
Rich Media Click Actions
Many rich media types are interactive. The contact can click them and cause something to happen in the chat. There are three possible click actions. Each rich media type supports up to two of the three possible actions. The click actions are:
- Trigger Intent: This option allows you to configure the intent The meaning or purpose behind what a contact says/types; what the contact wants to communicate or accomplish that triggers when the rich media is clicked. This determines the bot's next response. You can also choose an entity A piece of information gathered from the contact's messages during conversations with a bot. to fill when the rich media is clicked, and specify the value to fill it with.
- Open URL: This option opens a web page in a new tab. This can enrich the conversation by, for example, directing to a website to provide more details on a product than what the bot would provide in a conversation.
- Send Text: This option sends the text of the rich media option to the bot as the next message from the contact. The bot must be able to recognize an intent based on the message.
Adaptive Cards have their own on-click actions that are separate from what's listed in this section. Refer to the Adaptive Cards documentation for more information.
Rich Messaging Fallback
Rich messages contain options that are more than just plain text. Some digital channels Any channel, contact, or skill associated with Digital Experience., like digital chat, support rich messages. Other channels, like SMS, only support plain text.
Rich messaging fallback is a plain text alternative you can configure. Channels that don't support rich messages display the fallback instead of the rich message. You can configure a default fallback option for each rich message content type. You can override the default for individual messages.
Rich messaging fallback is different from action or NLU fallback, which is fallback used when the bot's confidence in the predicting the intent doesn't neet the configured threshold limit.
Rich Message Support by Channel
Use the following table to determine which channels will send which types of rich content. Any rows with a and any channels not listed will use rich messaging fallback.
Buttons | Cards | Multimedia* | Quick Replies | Rich Links | List Picker | |
---|---|---|---|---|---|---|
Apple Messages for Business |
|
|||||
Digital Experience Chat | ||||||
Facebook Messenger | ||||||
Google Business Messaging | ||||||
images only |
||||||
Other Channels |
*Multimedia file type and size restrictions apply:
- Images: PNG, JPG, GIF, or BMP format; 5 MB or smaller
- Videos: AVI, MPEG-4, or WEBM format; 200 MB or smaller
- Audio: MP3 format; 15 MB or smaller
- PDF, Microsoft Word, Excel, or Powerpoint: 15MB or smaller