Message Model
To use features like headless mode and delegate, you need to understand both user and skill messages. Everything that's received or sent from the Oracle Chat Server is represented as a message, one that's sent from the user to the skill, or from the skill to the user.
Action
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | string | Yes |
label |
The descriptive label text for the action. | string | At least one label or
imageUrl must be present.
|
imageUrl |
The image for the action | string | At least one label or
imageUrl must be present.
|
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
PostbackAction
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "postback" |
Yes |
postback |
The postback that's returned when the user selects an action. | A string or JSONObject | Yes |
{
"type": "postback",
"label": "Large Pizza",
"imageUrl": "https://example.com/images/gallery/locations/11.jpg",
"postback": {
"state": "askSize",
"action": "getCrust"
}
}
CallAction
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "call" | Yes |
phoneNumber |
The phone number to call | string | Yes |
{
"type": "call",
"label": "Call Support",
"imageUrl": "http://example.com.ar/files/2016/05/cuidado.jpg",
"phoneNumber": "18005555555"
}
urlAction
Requests the client to open a website in a new tab or in an in-app browser.
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "call" | Yes |
URL |
The URL of the website that's displayed. | string | Yes |
{
"type": "url",
"label": "Open URL",
"imageUrl": "http://example.com.ar/files/2016/05/cuidado.jpg",
"url": "https://example.com/images/gallery/locations/11.jpg",
}
SubmitFormAction
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "submitForm" |
Yes |
postback |
The postback payload, which might include an action
proeprty to trigger navigation. The value of this property should be
set in the FormSubmissionMessagePayload .
<<XREF>>
|
JSONObject | No |
{
"type": "submitForm",
"label": "Submit",
"postback": {
"system.botId": "6803DE12-DAA9-4182-BD54-3B4D431554F4",
"system.flow": "ExpenseFlow",
"system.state": "editFormMapVar"
}
}
Attachment
Name | Description | Type | Required? |
---|---|---|---|
type |
The attachment type | string (valid values: audio ,
file , image ,
video )
|
Yes |
url |
The download URL for the attachment | string | Yes |
title |
The name of the uploaded file | string | No |
{
"type": "image",
"url": "https://www.oracle.com/us/assets/hp07-oow17-promo-02-3737849.jpg"
}
Card
Name | Description | Type | Required? |
---|---|---|---|
title |
The title of the card, displayed as the first line on the card. | string | Yes |
description |
The description of the card | string | No |
imageUrl |
The URL of the image that is displayed. | string | No |
URL |
The website URL that's opened by a tap. | string | No |
actions |
An array of actions related to the text | array | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Location
Name | Description | Type | Required? |
---|---|---|---|
title |
The location title | string | No |
URL |
The URL for displaying the location on a map | string | No |
latitude |
The GPS coordinate's longitude value | double | Yes |
longitude |
The GPS coordinate's latitude value | double | Yes |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
{
"title": "Oracle Headquarters",
"url": "https://www.google.com.au/maps/place/37°31'47.3%22N+122°15'57.6%22W",
"longitude": -122.265987,
"latitude": 37.529818
}
Heading
Table
or
Table-Form
object.
Name | Description | Type | Required? |
---|---|---|---|
label |
The heading label | String | Yes |
alignment |
The positioning of the label within the cell | "left" , "right" ,
"center" |
Yes |
width |
The suggested percentage of the table width that should be provided to the heading. | No | |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Field
Table
, Form
, and Table-Form
objects, provided as key-value pair.
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "text" , "link" |
Yes |
label |
The field key | String | Yes |
value |
The field value | String | No |
linkLabel |
A short label for the link value if displayType
is link .
|
String | No |
alignment |
The positioning of the label within its cell | "left" , "right" ,
"center" |
No |
width |
The suggested percentage of the table width that should be provided to the field | No | |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
selectFieldOption
Name | Description | Type | Required? |
---|---|---|---|
label |
The display text | string | Yes |
value |
The value for option | Primitive data types (string, number, boolean, etc.) | No |
channelExtensions |
The channel-specific extension properties associated with the field option. | JSONObject | No |
Read Only Field
Name | Description | Type | Required? |
---|---|---|---|
value |
The field value | string | Yes |
width |
The suggested percentage of the total available width that the field should occupy in a table layout. | number | No |
alignment |
The alignment of the value within a table column. The
default alignment is right .
|
"left" , "center"
and "right" |
No |
Text Field
The text field inherits all of the read only field properties. The
displayType
value for this field is
"text"
.
Link Field
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "link" |
Yes |
linkLabel |
The label used for the hyperlink | string | No |
imageUrl |
The URL of the image that opens a link when clicked. | string | No |
Media Field
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "media" | Yes |
mediaType |
The field media type | "video" , "audio" ,
"image" |
Yes |
Action Field
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "action" |
Yes |
action |
The action that should be performed when the user clicks the action button. | Action | Yes |
Editable Field
Name | Description | Type | Required? |
---|---|---|---|
id |
The field ID | string | Yes |
placeholder |
A description of the input that's expected from the user. This text displays when the user has not yet made a selection or entered a value. | string | No |
required |
Whether this input is required to submit the form | boolean | No |
clientErrorMessage |
The field-level error message that's displayed below
the field when a client-side validation error occurs. If not
provided, the SDK defaults to
editFieldErrorMessage .
|
string | No |
serverErrorMessage |
The field level error message that's displayed below the field when a server-side validation error occurs. This error message must be included in the payload sent by the skill. | string | No |
autoSubmit |
When set to true , the form is partially submitted when the user has entered a value
for the field.
|
No |
Single-Select
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "singleSelect" |
Yes |
defaultValue |
The default selection | Primitive data types (string, number, boolean, etc.) | No |
options |
An array of options presented to the user. | A selectFieldOption array
|
Yes |
layoutStyle |
The layout style used to render the single select
options. The default layout is list .
|
"list" ,
"radioGroup" |
No |
Multi-Select
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "multiSelect" |
Yes |
defaultValue |
The default selection | An Array<object> of primitive data types (a string, number, boolean, etc.) | No |
options |
An array of options presented to the user | A selectFieldOption array
|
Yes |
layoutStyle |
The layout style used to render the options. | "list" ,
"checkboxes" |
No |
DatePicker
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "datePicker" |
Yes |
defaultValue |
The initial value for this field. The format must be YYYY-MM-DD. | string | No |
minDate |
The minimum, or earliest, date allowed. The format must be YYYY-MM-DD. | string | No |
maxDate |
The maximum, or latest, date allowed. The format must be YYYY-MM-DD. | string | No |
TimePicker
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "timePicker" |
Yes |
defaultValue |
The initial value for this field, entered as HH:mm in 24-hour format. | string | No |
minTime |
The minimum, or earliest, time allowed, entered as HH:mm in 24-hour format. For example, 00:00. | string | No |
maxTime |
The maximum, or latest, time allowed, entered as HH:mm, in 24-hour format. For example, 13:00. | string | No |
Toggle
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "toggle" |
Yes |
defaultValue |
The initial selected value. If you want the toggle
to be initially on, set the default value to the same value as
valueOn .
|
string | No |
valueOff |
The value when toggle is off | string | Yes |
valueOn |
The value when toggle is on | string | Yes |
labelOff |
The label for the "off" value | string | No |
labelOn |
The label for the "on" value | string | No |
TextInput
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "textInput" |
Yes |
defaultValue |
The initial value for this field | string | no |
validationRegularExpression |
A regular expression indicating the required format for this text input | string | no |
multiline |
The flag that determines whether to render multiple lines of input | boolean | no |
minLength |
The minimum length of input that the user must provide | integer | no |
maxLength |
The maximum number of characters allowed in the text input field | integer | no |
inputStyle |
The input style used by the client. Allowable values
are: "text" , "tel" ,
"url" ,"email", and
"password" .
|
string | no |
NumberInput
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The field type | "numberInput" |
Yes |
defaultValue |
The initial value for this field | Integer | No |
minValue |
A smallest allowable number | Integer | No |
maxValue |
The largest allowable number. | Integer | No |
Row
Name | Description | Type | Required? |
---|---|---|---|
fields |
An array of fields | Array <field> | Yes |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Form
Table-Form
messages for nested forms of a table row.
Name | Description | Type | Required? |
---|---|---|---|
title |
The form title | String | No |
field |
An array of fields | Array <field> | Yes |
actions |
An array of actions | Array <BotsAction> | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
PaginationInfo
Represents the paging information for the results in the Table
,
Form
, and Table-Form
objects.
Name | Description | Type | Required? |
---|---|---|---|
totalCount |
The total results count | number | Yes |
rangeSize |
The range size of the results per page | number | Yes |
status |
The paging status message | string | Yes |
currentRangeSize |
The size of curent range of results | number | Yes |
rangeStart |
The starting offset of the current range of results | number | Yes |
nextRangeSize |
The size of the next range of results | number | Yes |
hasPrevious |
Indicates whether there is a previous set of results | boolean | Yes |
hasNext |
Indicates whether there is a next set of results | boolean | Yes |
Conversation Message
Name | Description | Type | Required? |
---|---|---|---|
messagePayload |
The message payload | Message | Yes |
userId |
The user ID | string | Yes |
{
"messagePayload": {
"text": "show menu",
"type": "text"
},
"userId": "guest"
}
User Message
Represents a message sent from the user to the skill.
User Text Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "text" |
Yes |
text |
The message text | string | Yes |
{
"messagePayload": {
"text": "Order Pizza",
"type": "text"
},
"userId": "guest"
}
User Postback Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "postback" |
Yes |
text |
The postback text | string | No |
postback |
The postback of the selected action | A string or JSONObject | Yes |
{
"messagePayload": {
"postback": {
"variables": {
"pizza": "Small"
},
"system.botId": "69BBBBB-35BB-4BB-82BB-BBBB88B21",
"system.state": "orderPizza"
},
"text": "Small",
"type": "postback"
},
"userId": "guest"
}
User Attachment Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "attachment" |
Yes |
attachment |
The attachment metadata | Attachment | Yes |
{
"messagePayload": {
"attachment": {
"type": "image",
"url": "http://oda-instance.com/attachment/v1/attachments/d43fd051-02cf-4c62-a422-313979eb9d55"
},
"type": "attachment"
},
"userId": "guest"
}
User Form Submission Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type. | "formSubmission" |
Yes |
submittedFields |
Key-value pairs of the submitted field values. The key is the name (ID) of the field. | JSONObject | Yes |
postback |
The postback payload, which might include an action property to trigger navigation. The value of this property should be taken from the SubmitFormAction. | JSONObject | No |
partialSubmitField |
The ID of the field that triggers a partial form submission. Fields with the autoSubmit property set to true can trigger a partial form submission. | String | No |
{
"messagePayload": {
"submittedFields": {
"Attendees": [
"Toff van Alphen"
],
"Type": "Public transport",
"Description": "expense",
"Subject": "Expense",
"Date": "2023-06-07",
"Time": "18:58",
"Amount": 6,
"TipIncluded": "true"
},
"partialSubmitField": "Attendees",
"type": "formSubmission"
},
"userId": "guest"
}
User Location Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "location" |
Yes |
location |
The user location information | Location | Yes |
{
"messagePayload": {
"location": {
"latitude": 45.9285271,
"longitude": 132.6101925
},
"type": "location"
},
"userId": "guest"
}
Skill Message
Represents the message sent from the skill to the user.
Skill Text Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "text" |
Yes |
text |
The message text | string | Yes |
headerText |
The header text for cards | string | No |
footerText |
The footer text for cards | string | No |
actions |
An array of actions related to the text. | array | No |
globalActions |
An array of global actions related to the text. | array | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
{
"messagePayload": {
"type": "text",
"text": "What do you want to do?",
"actions": [
{
"type": "postback",
"label": "Order Pizza",
"postback": {
"state": "askAction",
"action": "orderPizza"
}
},
{
"type": "postback",
"label": "Cancel A Previous Order",
"postback": {
"state": "askAction",
"action": "cancelOrder"
}
}
],
"channelExtensions": {
"displayType":"stars"
}
},
"userId": "guest",
"msgId": "message_id",
"source": "BOT"
}
Location Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "location" |
Yes |
location |
The location | location |
No |
headerText |
The header text for the message | string | No |
footerText |
The footer text for the message | string | No |
actions |
An array of actions related to the text | Array<Action> | No |
globalActions |
An array of global actions related to the text | Array<Action> | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Skill Attachment Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "attachment" |
Yes |
attachment |
The attachment sent | Attachment | Yes |
headerText |
The card's header text | string | No |
footerText |
the card's footer text | string | No |
actions |
An array of actions related to the text. | array | No |
globalActions |
An array of global actions related to the text. | array | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Skill Card Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "card" |
Yes |
layout |
Whether to display the messages horizontally or vertically. | string (values: horizontal ,
vertical )
|
Yes |
cards |
An array of cards to be rendered. | array | Yes |
headerText |
The cards' header text | string | No |
actions |
An array of actions related to the text. | array | No |
globalActions |
An array of global actions related to the text. | array | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
{
"messagePayload": {
"type": "card",
"layout": "horizontal",
"cards": [
{
"title": "Hawaiian Pizza",
"description": "Ham and pineapple on thin crust",
"actions": [
{
"type": "postback",
"label": "Order Small",
"postback": {
"state": "GetOrder",
"variables": {
"pizzaType": "hawaiian",
"pizzaCrust": "thin",
"pizzaSize": "small"
}
}
},
{
"type": "postback",
"label": "Order Large",
"postback": {
"state": "GetOrder",
"variables": {
"pizzaType": "hawaiian",
"pizzaCrust": "thin",
"pizzaSize": "large"
}
}
}
]
},
{
"title": "Cheese Pizza",
"description": "Cheese pizza (i.e. pizza with NO toppings) on thick crust",
"actions": [
{
"type": "postback",
"label": "Order Small",
"postback": {
"state": "GetOrder",
"variables": {
"pizzaType": "cheese",
"pizzaCrust": "thick",
"pizzaSize": "small"
}
}
},
{
"type": "postback",
"label": "Order Large",
"postback": {
"state": "GetOrder",
"variables": {
"pizzaType": "cheese",
"pizzaCrust": "thick",
"pizzaSize": "large"
}
}
}
]
}
],
"globalActions": [
{
"type": "call",
"label": "Call for Help",
"phoneNumber": "123456789"
}
]
},
"userId": "guest",
"msgId": "message_id",
"source": "BOT"
}
Skill Table Message
fields
array that represents individual cells.
This message type is used for SQL dialogs.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "table" |
Yes |
headings |
An array of table headings | Array<Heading> | Yes |
rows |
An array of table rows. Each row contains a
fields array that represents the table cells.
|
Array<Row> | Yes |
paginationInfo |
The paging information for the results in the table | PaginationInfo | No |
actions |
An array of actions related to the table | Array<Action> | No |
globalActions |
An array of global actions | Array<Action> | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
{
"type":"table",
"headerText":"A-Team",
"headings":[
{
"width":20,
"label":"First Name",
"alignment":"left"
},
{
"width":20,
"label":"Last Name",
"alignment":"left"
},
{
"width":35,
"label":"Title",
"alignment":"left"
},
{
"width":25,
"label":"Phone",
"alignment":"right"
}
],
"rows":[
{
"fields":[
{
"displayType":"text",
"width":20,
"label":"First Name",
"alignment":"left",
"value":"Aaron"
},
{
"displayType":"text",
"width":20,
"label":"Last Name",
"alignment":"left",
"value":"Adams"
},
{
"displayType":"text",
"width":35,
"label":"Title",
"alignment":"left",
"value":"Demo Builder"
},
{
"displayType":"text",
"width":25,
"label":"Phone",
"alignment":"right",
"value":"1234567890"
}
]
},
{
"fields":[
{
"displayType":"text",
"width":20,
"label":"First Name",
"alignment":"left",
"value":"Bob"
},
{
"displayType":"text",
"width":20,
"label":"Last Name",
"alignment":"left",
"value":"Brown"
},
{
"displayType":"text",
"width":35,
"label":"Title",
"alignment":"left",
"value":"Multi-lingual Expert"
},
{
"displayType":"text",
"width":25,
"label":"Phone",
"alignment":"right",
"value":"1234567890"
}
]
},
{
"fields":[
{
"displayType":"text",
"width":20,
"label":"First Name",
"alignment":"left",
"value":"Charlie"
},
{
"displayType":"text",
"width":20,
"label":"Last Name",
"alignment":"left",
"value":"Chase"
},
{
"displayType":"text",
"width":35,
"label":"Title",
"alignment":"left",
"value":"Flow Builder"
},
{
"displayType":"text",
"width":25,
"label":"Phone",
"alignment":"right",
"value":"1234567890"
}
]
},
{
"fields":[
{
"displayType":"text",
"width":20,
"label":"First Name",
"alignment":"left",
"value":"David"
},
{
"displayType":"text",
"width":20,
"label":"Last Name",
"alignment":"left",
"value":"Davidson"
},
{
"displayType":"text",
"width":35,
"label":"Title",
"alignment":"left",
"value":"Machine Learning Expert"
},
{
"displayType":"text",
"width":25,
"label":"Phone",
"alignment":"right",
"value":"1234567890"
}
]
},
{
"fields":[
{
"displayType":"text",
"width":20,
"label":"First Name",
"alignment":"left",
"value":"Eric"
},
{
"displayType":"text",
"width":20,
"label":"Last Name",
"alignment":"left",
"value":"Eastman Junior"
},
{
"displayType":"text",
"width":35,
"label":"Title",
"alignment":"left",
"value":"Docker Expert"
},
{
"displayType":"text",
"width":25,
"label":"Phone",
"alignment":"right",
"value":"1234567890"
}
]
}
],
"paginationInfo":{
"currentRangeSize":5,
"rangeStart":0,
"nextRangeSize":-3,
"hasPrevious":false,
"hasNext":false,
"totalCount":5,
"rangeSize":8,
"status":"Showing 1-5 of 5 items"
}
}
Skill Form Message
fields
array with key-value pairs that represent a field.
This message type is used for SQL dialogs.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "form" |
Yes |
forms |
An array of form results. Each result contains a
fields array that represents the form
fields.
|
Array<Row> | Yes |
formColumns |
The number of columns in which the fields of the form should be grouped. | 1, 2 | Yes |
paginationInfo |
The paging information for the results in the form | PaginationInfo | No |
actions |
An array of actions related to the form | Array<Action> | No |
globalActions |
An array of global actions | Array<Action> | No |
channelExtensions |
The channel-specific extension properties associated with the message | A JSONObject | No |
{
"type":"form",
"headerText":"A-Team",
"forms":[
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Aaron"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Adams"
},
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Demo Builder"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/aaron-adams-4862752"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left"
}
]
},
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Bob"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Brown"
},
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Multi-lingual Expert"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/Bobbrown"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left",
"value":"Bob is a member of the cloud architects team which is specialized in enterprise mobility and cloud development. Bob has been directly involved with Oracle middleware since 2005 during which he held different roles in managing highly specialized teams."
}
]
},
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Charlie"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Chase"
},
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Flow Builder"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/Charlie-chase-97a418"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left",
"value":"Charlie is a member of the enterprise mobility team. Charlie has 20+ years experience with custom development. Charlie is an expert on mobile cloud services and development tools. He is the creator of productivity tools. His latest passion is building chatbots with a minimum amount of custom code."
}
]
}
],
"formColumns":2,
"paginationInfo":{
"currentRangeSize":3,
"rangeStart":0,
"nextRangeSize":2,
"hasPrevious":false,
"hasNext":true,
"totalCount":5,
"rangeSize":3,
"status":"Showing 1-3 of 5 items"
},
"globalActions":[
{
"postback":{
"variables":{},
"action":"system.showMore"
},
"label":"Show More",
"type":"postback"
}
]
}
Skill Table-Form Message
Table
and Form
message
types. It represents a message that returns the results of a query in the form of a
table. Each each row of the table has a read-only form in addition to the row
information.
This message type is used for SQL dialogs.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "tableForm" |
Yes |
headings |
An array of table headings | Array<Heading> | Yes |
rows |
An array of table rows. Each row contains an array of fields that represent the table cells. | Array<Row> | Yes |
forms |
An array of form results that correspond to each
table row. Each form contains a fields array that
represents the form fields.
|
Array<Form> | Yes |
formColumns |
The number of columns in which the fields of the form should be grouped. | 1, 2 | Yes |
paginationInfo |
An array of global actions related to the text | Array<Action> | No |
actions |
An array of actions related to the table form | Array<Action> | No |
globalActions |
An array of global actions | Array<Action> | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
{
"type":"tableForm",
"headerText":"A-Team",
"headings":[
{
"width":47,
"label":"First Name",
"alignment":"left"
},
{
"width":47,
"label":"Last Name",
"alignment":"left"
}
],
"rows":[
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Aaron"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Adams"
}
]
},
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Bob"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Brown"
}
]
},
{
"fields":[
{
"displayType":"text",
"label":"First Name",
"alignment":"left",
"value":"Charlie"
},
{
"displayType":"text",
"label":"Last Name",
"alignment":"left",
"value":"Chase"
}
]
}
],
"forms":[
{
"title":"View details Aaron Adams",
"fields":[
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Demo Builder"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/Aaron-adams-4862572"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left"
}
]
},
{
"title":"View details Bob Brown",
"fields":[
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Multi-lingual Expert"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/Bobbrown"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left",
"value":"Bob is a member of the cloud architects team which is specialized in enterprise mobility and cloud development. Bob has been directly involved with Oracle middleware since 2005 during which he held different roles in managing highly specialized teams."
}
]
},
{
"title":"View details Charlie Chase",
"fields":[
{
"displayType":"text",
"label":"Title",
"alignment":"left",
"value":"Flow Builder Fanatic"
},
{
"displayType":"text",
"label":"Phone",
"alignment":"left",
"value":"1234567890"
},
{
"linkLabel":"Open Link",
"displayType":"link",
"label":"Contact",
"alignment":"left",
"value":"https://www.example.com/in/Charlie-chase-97a418"
},
{
"displayType":"text",
"label":"Bio",
"alignment":"left",
"value":"Charlie is a member of the enterprise mobility team. Charlie has 20+ years experience with custom development. Charlie is an expert on mobile cloud services and development tools. He is the creator of productivity tools. His latest passion is building chatbots with a minimum amount of custom code."
}
]
}
],
"formColumns":2,
"paginationInfo":{
"currentRangeSize":3,
"rangeStart":0,
"nextRangeSize":2,
"hasPrevious":false,
"hasNext":true,
"totalCount":5,
"rangeSize":3,
"status":"Showing 1-3 of 5 items"
},
"actions":[
{
"postback":{
"variables":{
},
"action":"system.showMore"
},
"label":"Show More",
"type":"postback"
}
],
"footerText":"Tap on a row to see personal details"
}
Skill Edit Form Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type. In this case, it's
"editForm" .
|
"editForm" |
Yes |
fields |
A list of fields which can include both editable and read only fields. | Array<Field> | Yes |
title |
A representative title for the edit form | String | No |
formColumns |
The number of columns in which the form fields should be grouped. | Integer (1)
The SDK supports only one column for Release 23.06. |
No |
errorMessage |
A form-level error message that displays when the user has submitted invalid data but the error cannot be linked to an individual field. | String | No |
actions |
An array of actions related to the edit form. This
array should include a SubmitFormAction An error displays in the browser console when the
SubmitFormAction is not included in the
actions array.
|
Array<Action> | No |
globalActions |
An array of global actions | Array<Action> | No |
channelExtensions |
A set of channel-specific extension properties
The |
JSONObject | No |
{
"messagePayload": {
"headerText": "Create Expense",
"type": "editForm",
"title": "Fill in the below form",
"fields": [
{
"displayType": "textInput",
"serverErrorMessage": "Invalid Text Input",
"defaultValue": "Expense",
"minLength": 5,
"id": "Subject",
"label": "Subject",
"placeholder": "Enter subject of the expense",
"clientErrorMessage": "Subject is required and must be between 5 and 15 characters",
"maxLength": 15,
"required": true
},
{
"displayType": "textInput",
"defaultValue": "expense",
"multiLine": true,
"id": "Description",
"label": "Description",
"placeholder": "What is expense justification",
"clientErrorMessage": "Description is required",
"required": true
},
{
"displayType": "datePicker",
"defaultValue": "2023-06-07",
"maxDate": "2023-06-22",
"id": "Date",
"label": "Expense Date",
"placeholder": "Pick a date in the past",
"clientErrorMessage": "Expense date is required and must be in the past.",
"required": true
},
{
"displayType": "timePicker",
"defaultValue": "18:58",
"id": "Time",
"label": "Expense Time",
"placeholder": "What time was the expense",
"clientErrorMessage": "Time is required. Please fill a value",
"required": true
},
{
"displayType": "numberInput",
"minValue": 5,
"defaultValue": 6,
"maxValue": 500,
"id": "Amount",
"label": "Amount",
"placeholder": "Enter expense amount",
"clientErrorMessage": "Amount is required and must be between 5 and 500.",
"required": true
},
{
"autoSubmit": true,
"displayType": "toggle",
"defaultValue": "true",
"labelOn": "Yes",
"id": "TipIncluded",
"label": "Tip Included?",
"valueOff": "false",
"labelOff": "No",
"valueOn": "true"
},
{
"displayType": "singleSelect",
"serverErrorMessage": "Invalid Selection",
"defaultValue": "Public transport",
"options": [
{
"label": "Public transport",
"value": "Public transport"
},
{
"label": "Flight",
"value": "Flight"
}
],
"layoutStyle": "list",
"id": "Type",
"label": "Expense Type",
"placeholder": "Select expense type",
"clientErrorMessage": "Expense type is required",
"required": true
},
{
"displayType": "multiSelect",
"defaultValue": [
"Toff van Alphen"
],
"options": [
{
"label": "Toff van Alphen",
"value": "Toff van Alphen"
},
{
"label": "Roger Federer",
"value": "Roger Federer"
}
],
"layoutStyle": "checkboxes",
"id": "Attendees",
"label": "Attendees",
"placeholder": "Select attendees",
"clientErrorMessage": "Please select atleast one attendee",
"required": true
}
],
"formColumns": 1,
"actions": [
{
"postback": {
"system.botId": "6803DE12-DAA9-4182-BD54-3B4D431554F4",
"system.flow": "ExpenseFlow",
"system.state": "editFormMapVar"
},
"label": "Submit",
"type": "submitForm"
}
],
"channelExtensions": {
"replaceMessage": "True"
}
},
"source": "BOT",
"userId": "guest"
}
Skill Raw Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "raw" |
Yes |
payload |
The channel-specific payload | JSONObject | Yes |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |