Overview
Here’s a breakdown of how WhatsApp treats data it receives from Botpress:Botpress Type | WhatsApp Type |
---|---|
text | Text Object |
text with Markdown | Text Object |
image | Media Image Object |
audio | Media Audio Object |
video | Media Video Object |
file | Media File Object |
location | Location Object |
Choices
Choices in Botpress are mapped to Interactive Objects of the typelist
in WhatsApp.
WhatsApp renders choices differently depending on how many choices you specify in Botpress:
Amount of Choices in Botpress | How They’re Rendered in WhatsApp |
---|---|
1-3 | Buttons |
4-10 | Dropdown |
11 or More | Multiple dropdowns (up to 10 choices each) |
Labels
In WhatsApp, choices require a label. Since Botpress Studio doesn’t currently support labels for choice Cards, WhatsApp uses “Choose…” by default.Character Limit
In WhatsApp:- Button titles are limited to 19 characters
- Dropdown choice titles are limited to 23 characters
Title in Botpress | WhatsApp Button | WhatsApp Dropdown |
---|---|---|
”This is a title in Botpress" | "This is a title in …" | "This is a title in Botp…” |
Cards
Cards in Botpress are mapped to Interactive Objects of the typelist
in WhatsApp.
Links
WhatsApp only supports one link (label and URL) on a Card. If your Botpress Card has multiple links, WhatsApp will split them into multiple empty Cards.Reply Button
WhatsApp only supports 3 “reply” action buttons on a Card. If your Botpress Card has more than three of these buttons, WhatsApp will split them into multiple Cards.Stickers
WhatsApp will treat an image as a Sticker if it meets the following conditions:- The image is in WebP format
- The image is exactly 512x512 in size
- The image is less than 512kb
Files
When sending a file to WhatsApp, the file’s name will be changed to whatever is specific in the Title field of the Send Message Card. If you leave Title field blank, the file will be renamed with a generic name (“file”) before being sent to WhatsApp. The WhatsApp message will still display the original file’s name below the file itself.You can also set a custom file name by sending the file using an Execute Code Card and specifying a value for the
filename
attribute.