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 of label or
imageUrl must be included.
|
imageUrl |
The image for the action | string | At least a single label or
imageUrl property must be included.
|
style |
The rendering style of the button | "primary" ,
"danger" , "default" |
No |
displayType |
The rendering for the type of action element (button, link, or icon) | "button" , "link" ,
"icon" |
No |
channelExtensions |
The channel-specific extension properties associated with the action | 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 JSON object | 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 |
ShareAction
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "share" | Yes |
LocationAction
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "location" | Yes |
{
"type": "location",
"label": "Share location",
"imageUrl": "http://images.example.com/location-clipart-location-pin-clipart-1.jpg"
}
PopupAction
PopupAction
uses the Action
properties along with its own:
Name | Description | Type | Required? |
---|---|---|---|
type |
The action type | "popup" |
Yes |
popupContent |
The content that displays within the pop-up window. | The message payload (refer to the following JSON example) | Yes |
{
"type": "popup",
"label": "Give Feedback",
"popupContent": {
"formRows": [
{
"columns": [
{
"width": "stretch",
"fields": [
{
"displayType": "text",
"label": "What was the issue with this response?"
},
{
"displayType": "multiSelect",
"options": [
{
"label": "Inaccurate",
"value": "inaccurate"
},
{
"label": "Inappropriate",
"value": "inappropriate"
}
],
"id": "system_feedback_reasons",
"required": true
},
{
"displayType": "textInput",
"id": "system_feedback_comments",
"placeholder": "Additional feedback"
}
]
}
]
},
{
"columns": [
{
"fields": [
{
"displayType": "action",
"action": {
"postback": {
"rating": "negative",
"action": "cancel",
},
"label": "Cancel",
"type": "postback"
},
}
]
},
{
"fields": [
{
"displayType": "action",
"action": {
"postback": {
"rating": "negative",
"system.state": "invokeLLM"
},
"label": "Submit Feedback",
"type": "submitForm"
},
}
]
}
]
}
],
"type": "editForm",
"title": "Give your feedback",
"formColumns": 1,
}
}
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 .
|
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? |
---|---|---|---|
title |
The attachment title | string | No |
type |
The attachment type | string (valid values: audio, file, image, video) | Yes |
url |
The download URL for the attachment | string | Yes |
{
"title": "Oracle Open World Promotion",
"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 |
{
"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
}
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 |
FormRow
Name | Description | Type | Required? |
---|---|---|---|
id |
The ID of the form row | String | No |
columns |
A list of columns displayed in the form row. | Array <Column> | Yes |
selectAction |
The actions that's executed when the form has been selected. When users hover over the form, the action's label displays as a tool tip (when supported by the channel). | Action | No |
separator |
Setting this property to true inserts a separator line above the content in the form row. | Boolean | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Column
Name | Description | Type | Required? |
---|---|---|---|
id |
The ID of the column | String | No |
fields |
A list of fields that display vertically within the
column. These fields must be ReadOnlyField
instances when the column is used in a FormRow
within a Form . The fields can be both read-only and
editable fields when the FormRow is used within an
EditFormMessagePayload .
|
Array<Field> | Yes |
verticalAlignment |
The vertical alignment of the column with respect to the other columns in the same form row. | String | No |
width |
Determines the width of the column within the form
row. Allowable values are auto (the default) and
stretch . When set to stretch ,
the column takes all the remaining width after any auto-width
columns are rendered. If there are multiple columns set to
stretch , they evenly divide the remaining
width.
|
String | No |
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? |
---|---|---|---|
id |
The ID of the form | String | No |
title |
The form title | String | No |
fields |
An array of fields | Array <Field> | Yes |
actions |
An array of actions | Array <BotsAction> | No |
formRows |
A list of rows which can include both editable and
read only fields. You can define either the list of fields (using
the fields and optionally, the
formColumns properties), or a list of rows
using this property. The fields and
formRows are mutually exlusive.
|
Action | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Row
Name | Description | Type | Required? |
---|---|---|---|
fields |
An array of fields | <Field> | Yes |
selectAction |
The action that is executed when the row is selected. The label of the action is shown as tooltip when users hover above the row. | Action | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
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 | String | Yes |
label |
The field key | String | Yes |
marginTop |
The amount of vertical space between this field and the previous field within the same column | "none" ,
"medium" ,"large" |
No |
labelFontSize |
The font size used for the field label | "small" , "medium" ,
"large" |
No |
labelFontWeight |
The positioning of the label within its cell | "light" , "medium" ,
"bold" |
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 |
onHoverPopupContent |
The content that displays when users hover over a field. | Message Payload | No |
Text Field
Name | Description | Type | Required? |
---|---|---|---|
displayType |
The element type. | text (a String value)
|
Yes |
truncateAt |
The position at which lengthy text gets truncated and where an ellipsis mark (which indicates the value has been truncated) displays. | Number | No |
fontSize |
The font size used for the field value | "small" , "medium" ,
"large" |
No |
fontWeight |
The font weight used for the field value | "light" , "medium" ,
"bold" |
No |
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 auto-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 |
EventContextProperties
CloudEvent
context
properties.
Name | Description | Type | Required? | Example |
---|---|---|---|---|
dataschema |
Identifies the schema that the data adheres to. | URI | No | "/dw/approval_payload.json" |
datacontenttype |
The content type of the data that's contained in the data attribute. | String | No | "application/json" |
source |
The resource that produced the event. | URI | No |
"objectstorage" |
time |
The time of the event expressed in RFC 3339 timestamp format. | Timestamp | No | "2021-01-10T21:19:24Z" |
specversion |
The version of the CloudEvents specification. | String | No | "1.0" |
id |
The ID of the CloudEvents specification. | String | No | "123e4567-e89b-12d3-a456-426614174000" |
subject |
The event’s subject in the context of the event producer and/or event type. | String | No | "mynewfile.jpg" |
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 inboundEvent Message
Message
.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "inboundEvent" |
Yes |
eventType |
The event type (defined in the event catalog) | String | Yes |
eventVersion |
The event type version (defined in the event catalog) | String | Yes |
eventData |
The business data | JSONObject | Yes |
contextProperties |
The event context properties | Event context properties | No |
{
"messagePayload": {
"eventData": {
"size": "Medium",
"type": "Cheese"
},
"eventVersion": "1.0",
"eventType": "com.pizzastore.pizza.orderserved",
"type": "inboundEvent",
"contextProperties": {
"id": "6ce23f09-bff7-4369-8467-0c510e971aaf",
"source": "pizza/service",
}
},
"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 autoSumbit 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 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 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.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | string | Yes |
headerText |
The header text displayed above the message text. | string | No |
footerText |
The footer text displayed below the message text and actions, but before the global actions. | string | No |
actions |
A list of actions related to the message | Array<Action> |
No |
footerForm |
A form layout that displays below the footer text of the message and above its global actions. | Skill Form Message | No |
globalActions |
A list of global actions related to the text | Array<Action> | No |
channelExtensions |
The channel-specific extension properties associated with the message | JSONObject | No |
Bot Text Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "text" |
Yes |
text |
The message text | string | Yes |
{
"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"
}
}
]
},
"userId": "guest"
}
Skill Location Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "location" |
Yes |
location |
The location | Location | Yes |
Skill Attachment Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "attachment" |
Yes |
attachment |
The attachment sent | Attachment | Yes |
File uploads from the host site may fail and throw a console error similar to the following:
https://<oda-instance>/chat/v1/attachments from origin <client site> has been blocked by CORS policy: No Access-Control-Allow-Origin header is present on the requested resource
This
is because the host site's CORS (Cross-Origin Resource Sharing) settings, which block all
cross-origin HTTP requests, may also block upload requests from the client instance to
the Oracle Digital Assistant attachment server. If you run into this problem, update the
host site's security policy to allow the domain for the Digital Assistant instance.
Because the conversation uses WebSocket connections, CORS does not impact the
conversation.
Passing File Names
x-oda-meta-file-name
x-oda-meta-file-type
Feedback Messages
channelExtensions
object field that is set as {
"displayType": "stars" }
. It applies the following properties to the Skill Message.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "text" |
Yes |
text |
The message text | string | Yes |
channelExtensions |
An object describing extensions to the payload. | { “displayType”: “stars” } |
Yes |
{
"messagePayload":{
"text":"How would you like to rate us?",
"type":"text",
"actions":[
{
"postback":{
"variables":{
"rating":"1"
},
"system.botId":"61C8D800-23AF-4DDD-B5AF-D79AB3F3BE67",
"action":"1",
"system.state":"giveFeedback"
},
"label":"1",
"type":"postback"
},
{
"postback":{
"variables":{
"rating":"2"
},
"system.botId":"61C8D800-23AF-4DDD-B5AF-D79AB3F3BE67",
"action":"2",
"system.state":"giveFeedback"
},
"label":"2",
"type":"postback"
},
{
"postback":{
"variables":{
"rating":"3"
},
"system.botId":"61C8D800-23AF-4DDD-B5AF-D79AB3F3BE67",
"action":"3",
"system.state":"giveFeedback"
},
"label":"3",
"type":"postback"
},
{
"postback":{
"variables":{
"rating":"4"
},
"system.botId":"61C8D800-23AF-4DDD-B5AF-D79AB3F3BE67",
"action":"4",
"system.state":"giveFeedback"
},
"label":"4",
"type":"postback"
},
{
"postback":{
"variables":{
"rating":"5"
},
"system.botId":"61C8D800-23AF-4DDD-B5AF-D79AB3F3BE67",
"action":"5",
"system.state":"giveFeedback"
},
"label":"5",
"type":"postback"
}
],
"channelExtensions":{
"displayType":"stars"
}
},
"source":"BOT",
"userId":"<userID>"
}
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 |
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 |
{
"messagePayload": {
"type": "card",
"layout": "horiztonal",
"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"
}
Skill Postback Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "postback" |
Yes |
text |
The message text | string | No |
postback |
The postback | A string or a JSONObject | Yes |
Skill Form Message
fields
array with key-value pairs that represent a field. It
applies the following properties to the Skill Message.
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 |
{
"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 Message
fields
array that represents individual cells. It applies the
following properties to the Skill Message.
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 |
tableTitle | The table title | string | No |
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 |
{
"type":"table",
"headerText":"A-Team",
"tableTitle": "Document",
"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 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. It applies the following properties to the Skill Message.
This message type is used for SQL dialogs.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "tableForm" |
Yes |
tableTitle |
The table title | string | No |
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 |
{
"type":"tableForm",
"headerText":"A-Team",
"tableTitle": "Document",
"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 Outbound Event Message
Message
.
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type | "outboundEvent" |
Yes |
eventType |
The event type (defined in the event catalog) | String | Yes |
eventVersion |
The event type version (defined in the event catalog) | String | Yes |
eventData |
The business data | JSONObject | Yes |
contextProperties |
The event context properties | Event Context Properties | No |
{
"messagePayload": {
"eventData": {
"size": "Medium",
"type": "Cheese"
},
"eventVersion": "1.0",
"eventType": "com.pizzastore.pizza.ordercreated",
"type": "outboundEvent",
"contextProperties": {
"tenancy": "odaserviceinstance00",
"specversion": "1.0",
"id": "7a923f09-bff7-4369-8467-0c510e971aaf",
"source": "hello/app",
"time": 1659357000,
"type": "com.pizzastore.pizza.ordercreated",
"channelname": "System_Global_Test",
"version": "1.0",
"userid": "3910088",
"contenttype": "application/json"
}
}
}
Skill Edit Form Message
Name | Description | Type | Required? |
---|---|---|---|
type |
The message type. In this case, it's
"editForm" .
|
"editForm" |
Yes |
title |
A representative title for the edit form | String | No |
fields |
A list of fields which can include both editable and read only fields. | Array<Field> | Yes |
formColumns |
The number of columns in which the form fields should
be grouped. The property is applicable only when you also set the
field property.
|
Integer | No |
formRows |
A list of rows which can include both editable and
read only fields. You must set either the
fields property and formRows is
required. They are mutually exclusive.
|
Array<FormRow> | |
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 includes 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"
}