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.
These are the base types used in all messages sent from the
user to the skill and vice versa. They are the building blocks
of all messages.
This action is used to submit an input form to the skill when it satisfies the
client side validation. It adds the following properties to the Action properties:
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.
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).
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.
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 🔗
Represents an array of fields along with a title. Used in
Table-Form messages for nested forms of a table row.
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.
Represents an editable field. All editable fields inherit the the field properties and have the following additional properties:
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 🔗
The single-select field inherits all of the Editable Field properties and has the following additional properties:
Name
Description
Type
Required?
displayType
The field type
"singleSelect"
Yes
defaultValue
The default selection
Primitive data types (string, number, boolean,
etc.)
The layout style used to render the single select options. The default layout is list.
"list",
"radioGroup"
No
layoutDirection
The layout direction (horizontal or vertical) for the radio buttons when layoutStyle is set to radioGroup. By default, the layout direction is set as vertical, but you can set it as horizontal.
String
No
Multi-Select 🔗
The multi-select field inherits all of the Editable Field properties and has the following additional properties:
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.)
The layout direction (horizontal or vertical) for the checkboxes when layoutStyle is set to checkboxes. By default, the layout direction is set as vertical, but you can also set it as horizontal.
String
No
DatePicker 🔗
The date picker field inherits the Editable Field properties and has the following additional properties:
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 🔗
The time picker field inherits the Editable Field properties and has the following additional properties:
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 🔗
The toggle field inherits all of the Editable Field properties and has the following additional properties:
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 🔗
The text input field inherits Editable Field properties and has the following additional properties:
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 🔗
The number input field inherits Editable Field properties and has the following additional properties:
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 🔗
Event context properties represent the 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 🔗
All of the messages that are part of a conversation have the following
structure:
This represents the form submission message that's sent after the user has submitted
a form by a SubmitFormAction. It has the following properties:
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.
Represents a location message. It applies the following properties to the Skill Message.
Name
Description
Type
Required?
type
The message type
"location"
Yes
location
The location
Location
Yes
Skill Attachment Message 🔗
Represents an attachment message. It applies the following properties to the Skill Message.
Name
Description
Type
Required?
type
The message type
"attachment"
Yes
attachment
The attachment sent
Attachment
Yes
Note
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 🔗
Use the following headers to retrieve the name of a file (including video, audio, or
image files) that's uploaded to the ODA file server:
x-oda-meta-file-name
x-oda-meta-file-type
You can return these headers with GET or HEAD requests. Use HEAD if a custom
component doesn't need the file's contents.
Feedback Messages 🔗
This represents a feedback rating component, which takes a user’s feedback using a
rating gauge (typically a star rating system). Its payload is similar to a text message, but it has an additional
channelExtensions object field that is set as {
"displayType": "stars" }. It applies the following properties to the Skill Message.
Represents a set of choices that are displayed for the user, either horizontally as
carousels or vertically as lists. It applies the following properties to the Skill 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 🔗
Represents a single card in the message payload.
Name
Description
Type
Required?
title
The title of the card, displayed as the first line on the
card.
Represents a postback. It applies the following properties to the Skill 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 🔗
Represents a message that returns the results of a query in a form that's read only.
The message consists of an array of form results. Each form result contains a
fields array with key-value pairs that represent a field. It
applies the following properties to the Skill Message.
Note
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
{
"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 🔗
Represents a message that returns the results of a query in table form The message
consists of an array of headings and an array of rows. The rows themselves contain a
fields array that represents individual cells. It applies the
following properties to the Skill Message.
Note
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
This message combines the 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.
Note
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 🔗
Represents the outbound event messages that can be sent by the server. It applies
the following properties to the 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)
Represents an editable form message (input form). The message consists of a Field array.
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
fieldsproperty 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.