RCS Suggestions
The RCS Suggestions are interactive User Interface elements that allow you to respond quickly or trigger specific actions. They can represent either reply options or action buttons within an RCS message. This can be positioned in different locations depending on the intended end user experience:
- Within a card:
When suggestions are part of a card, the suggestions[] array should be defined inside the content object, as shown in the example above.
- As a floating chip list:
If suggestions need to appear as floating chips, the suggestions[] array should be added at the top (main) level of the payload.
- Both card-level and floating suggestions:
If both types are required, both approaches can be implemented simultaneously. Refer to the example above for guidance.
The Reply Suggestions allow you to respond quickly by selecting one of the predefined options.
Suggestions and Actions Field Reference
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| Reply | reply | *Reply | Optional | Quick reply option |
| Action | action | *Action | Optional | User action |
Reply
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| Text | text | *String | Yes | Visible reply text |
| PostbackData | postbackData | *String | Yes | Callback payload |
| ButtonID | buttonId | *String | Optional | Button identifier |
Action
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| Text | text | String | Yes | Action label |
| PostbackData | postbackData | String | Yes | Callback payload |
| ButtonID | buttonId | String | Optional | Button identifier |
| OpenUrlAction | openUrlAction | *OpenUrlAction | Optional | Open website |
| DialAction | dialAction | *DialAction | Optional | Dial phone number |
| ViewLocationAction | viewLocationAction | *ViewLocationAction | Optional | Show map location |
| CreateCalendarEventAction | createCalendarEventAction | *CreateCalendarEventAction | Optional | Create calendar event |
| AskLocationAction | askLocationAction | *AskLocationAction | Optional | Request user location |
OpenUrlAction
File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
URL |
| String | Yes | Target URL |
Application |
| String | Optional | App to open. The following are the values supported: OPEN_URL_APPLICATION_UNSPECIFIED, WEBVIEW, BROWSER |
WebviewViewMode |
| String | Optional | Webview mode. The following are the values supported: WEBVIEW_VIEW_MODE_UNSPECIFIED, FULL, HALF, TALL |
Description |
| String | Optional | URL description |
DialAction
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| PhoneNumber | phoneNumber | String | Yes | Phone number to dial |
View Location
| File name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| LatLong | latLong | *LatLong | Yes | Coordinates |
| Label | label | String | Yes | Location label |
LatLong
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| Latitude | latitude | float64 | Yes | Latitude |
| Longitude | longitude | float64 | Yes | Longitude |
CalendarEventAction
| File Name | JSON Key | Type | Required | Description |
|---|---|---|---|---|
| StartTime | startTime | String | Event start time | |
| EndTime | endTime | String | Event end time | |
| Title | title | String | Event title | |
| Description | description | String | Event description |
Reply Suggestion
{
"reply": {
"text": "Yes",
"postbackData": "user_said_yes",
"buttonId": "btn_yes"
}
}Action Suggestion
{
"action": {
"text": "Call Support",
"postbackData": "call_support",
"dialAction": {
"phoneNumber": "+1800123456"
}
}
}Action Types
The following are the action types supported:
Open URL Action
{
"openUrlAction": {
"url": "https://www.airindia.com/in/en/book.html",
"application": "WEBVIEW", //OPEN_URL_APPLICATION_UNSPECIFIED, WEBVIEW, BROWSER
"webviewViewMode": "FULL" // WEBVIEW_VIEW_MODE_UNSPECIFIED, FULL, HALF, TALL
}
}Dial Action
{
"dialAction": {
"phoneNumber": "+1234567890"
}
}View Location Action
{
"viewLocationAction": {
"latLong": {
"latitude": 40.7128,
"longitude": -74.0060
},
"label": "New York Office"
}
}Calendar Event Action
{
"createCalendarEventAction": {
"startTime": "2024-01-15T10:00:00Z",
"endTime": "2024-01-15T11:00:00Z",
"title": "Meeting Title",
"description": "Meeting description"
}
}Ask Location Action
{
"askLocationAction": {}
}Updated about 3 hours ago
