- Print
- PDF
Basic
- Print
- PDF
Available in Classic and VPC
This document describes the Basic component of the response components of a chatbot answer.
The Basic component consists of the following three basic components.
- Text
- Image
- Button (The Button component includes the Quick Buttons component.)
These components allow you to set the chatbot's response to each feature in Chatbot Builder, and return the response results in JSON format.
Text component
The Text component consists of the title, subtitle, description, and URL.
Text component response body
The following is the response body of the Text component.
Field | Type | Required | Description |
---|---|---|---|
type | String | Required | Component type
|
title | String | Optional | Component title
|
subTitle | String | Optional | Subcomponent title
|
data | Object | Optional | Text component configuration information |
data.description | String | Optional | Component detailed descriptions
|
data.url | String | Optional | Component hyperlink URL
|
data.urlAlias | String | Optional | Component hyperlink URL alias
|
data.action | Action | Optional | Component action information
|
Text component response example
The following is a sample response of the Text component.
{
"type": "text",
"title": "optional, short bold text",
"subTitle": "optional, short gray text",
"data" :
{
"description" : "optional, a long text content",
"url" : "optional, a hyperlink at the bottom of description",
"urlAlias" :"optional, hyperlink show this alias",
"action": {Action Data}
}
}
Image component
The Image component consists of an image, along with title, subtitle, description, and URL.
Image component response body
The following is the response body of the Image component.
Field | Type | Required | Description |
---|---|---|---|
type | String | Required | Component type
|
title | String | Optional | Component title
|
subTitle | String | Optional | Subcomponent title
|
data | Object | Optional | Image component configuration information |
data.imageUrl | String | Required | Image URL
|
data.alt | String | Optional | Image description tooltip
|
data.imagePosition | String | Optional | Image position
|
data.description | String | Optional | Image detailed description |
data.url | String | Optional | Image hyperlink URL
|
data.urlAlias | String | Optional | Image hyperlink URL alias
|
data.action | Action | Optional | Component action information
|
Image component response example
The following is a sample response of the Image component.
{
"type": "image",
"title": "optional, short bold text",
"subTitle": "optional, short gray text",
"data" :
{
"imageUrl" : "https://ssl.pstatic.net/CloudFunctions.png",
"alt" : "optional, short hint show when hover on image",
"imagePosition" : "top",
"description" : "optional, details info of image",
"url" : "optional, a hyperlink at the bottom of description",
"urlAlias" : "optional, hyperlink show this alias",
"action": {Action Data}
}
}
Button component
The Button component consists of a button with title, subtitle, description, and URL along with an image. The Quick Buttons component is also included in the Button component.
Button component response body
The following is the response body of the Button component.
Field | Type | Required | Description |
---|---|---|---|
type | String | Required | Component type
|
title | String | Optional | Component title
|
subTitle | String | Optional | Subcomponent title
|
data | String | Required | Button component configuration information |
data.type | String | Required | Button type
|
data.iconUrl | String | Optional | Button icon URL
|
data.action | Action | Optional | Component action information
|
Button component response example
The following is a sample response of the Button component.
Basic Button
The following is a sample response of Basic Button.
{
"type": "button",
"title": "optional, text show on button",
"subTitle": "optional, short gray text",
"data" :
{
"type": "basic",
"iconUrl" : "https://ssl.pstatic.net/CloudFunctions.png",
"action": {Action Data}
}
}
Image Button
The following is a sample response of Image Button.
{
"type": "button",
"title": "optional, text show on button",
"subTitle": "optional, short gray text",
"data" :
{
"type": "imageButton",
"iconUrl" : "https://ssl.pstatic.net/CloudFunctions.png",
"action": {Action Data}
}
}
Quick Buttons component
This section describes the Quick Buttons component. This is the pinned group button at the bottom of the chat window. It is included in the button
component.
Quick Buttons response body
The following is the response body of Quick Buttons.
Field | Type | Required | Description |
---|---|---|---|
type | String | Required | Component type
|
title | String | Optional | Component name |
data | Object | Optional | Component configuration information |
data.type | String | Conditional | Component type
|
data.action | Object | Conditional | Component action information |
data.action.type | String | Conditional | Component action type
|
data.action.data | Object | Conditional | Component action details
|
data.action.data.postback | String | Conditional | Text postbacked to the chatbot |
data.action.data.displayText | String | Conditional | Quick Button name to be displayed on the chatbot |
data.action.data.postbackFull | String | Conditional | Text postbacked to the chatbot for Quick Button execution |
Quick Buttons response example
The following is a sample response of Quick Buttons.
{
"quickButtons": [
{
"type": "button",
"title": "Button Name",
"data": {
"type": "basic",
"action": {
"type": "postback",
"data": {
"postback": "UnexpiredForm\u241e47954\u241e0",
"displayText": "Button Name",
"postbackFull": "_T_UnexpiredForm\u241e47954\u241e0"
}
}
}
}
]
}