Class

OperatorMessage

OperatorMessage

Message sent by the operator.

Members

object

# nullable attachment

Attachments add more context to a message, enhance user experience and make it more interactive.
Properties:
Name Type Description
type string Must be one of OperatorMessage#ATTACHMENT_TYPES
options Array.<object> Used with SINGLE_CHOICE type. Must be array of objects containing all the available options for selection.
options[].text string Text displayed to user as a choice label.
options[].value string Value of the choice sent as a response on user interaction.
image_url string Used with SINGLE_CHOICE type. When present must be type of string. URL of an image displayed on top of the choices expressing clear intent of the cards.
files Array.<object> Used with FILES type. Must be an array of objects containing file information.
files[].id string File ID.
files[].size string File size in bytes.
files[].content_type string File mimetype, for example `application/pdf`.
files[].deleted string Whether the file has been deleted.
files[].url string URL to download the file. This is null if `deleted` is true.
object

# ATTACHMENT_TYPES

Properties:
Name Type Description
SINGLE_CHOICE string
FILES string
string

# content

Content of the message.
string

# created_at

An ISO-8601 timestamp of when the message was sent.
string

# id

Identifier of the message. This identifier can be used to track a single message's status updates through time and to avoid re-rendering the entire list of messages when the status of only a single message has changed.
object

# nullable metadata

Metadata property can be used by the integrator to customize a message when rendering it with a custom renderer function.

Object properties are defined by the integrator.

string

# sender

Sender type, always Chat#SENDERS.OPERATOR