Suggestion messages
Overview
Suggestion messages add interactivity to your Viber messages by providing users with clickable buttons and action options. These interactive elements guide users toward specific actions like visiting your website or making a call. Only 1 button is possible per message. All suggestion messages are categorized as promotional due to their marketing and engagement-focused nature.
Rules and restrictions
The following actions are supported by Viber as rich card buttons:
| Action | Remarks |
|---|---|
| OpenURL | Maximum length of label is 30 characters, URL required. |
| Dial | Maximum length of label is 30 characters, phone number required. |
The following restrictions apply for a suggestion:
| Field | Required | Remarks |
|---|---|---|
| label | Yes | Maximum length is 30 characters. |
| url | Only for OpenURL | Must be a valid URL |
| phoneNumber | Only for Dial | Must be a valid phone number |
Suggestion message with openURL example
In the example below, we send a suggestion message that contains elements that Viber will display as an open URL action.
{
"messages": {
"msg": [
{
"from": "Your sender",
"to": [
{
"number": "Phone number"
}
],
"allowedChannels": [
"Viber", "SMS"
],
"body": {
"type": "auto",
"content": "SMS fallback Text"
},
"richContent": {
"conversation": [
{
"text": "CM.com - Be part of it.",
"suggestions": [
{
"action": "OPENURL",
"label": "Visit CM.com",
"url": "https://www.cm.com/",
"postbackdata": "WEBSITE"
}
]
}
]
}
}
]
}
}
Suggestion message with dial action example
In the example below, we send a suggestion message that contains elements that Viber will display as a dial action.
{
"messages": {
"msg": [
{
"from": "Your sender",
"to": [
{
"number": "Phone number"
}
],
"allowedChannels": [
"Viber", "SMS"
],
"body": {
"type": "auto",
"content": "SMS fallback Text"
},
"richContent": {
"conversation": [
{
"text": "CM.com - Be part of it.",
"suggestions": [
{
"action": "DIAL",
"label": "Call us",
"dial": {
"phoneNumber": "0031612345678"
},
"postbackdata": "DIAL"
}
]
}
]
}
}
]
}
}
Updated 2 days ago