Events
Events are sent to a chat through thesend_event method and returned in chat and thread responses.
File
The File event indicates about an uploaded file.Request
Custom event properties organized by namespace and property name. See
Properties.
The file URL. It must point to the Text CDN. Use the URL returned by
upload_file.Response
Custom event properties organized by namespace and property name. See
Properties.
Sample File in response
Form
The Form event contains an empty form to be filled out by the customer. It doesn’t matter how the form is configured or what fields it has — it can be any event of typeform. Currently, the Form events are not supported natively in Text, but you can leverage this feature in a custom chatting solution.
Request
Custom event properties organized by namespace and property name. See
Properties.
The fields in the form. See Form fields.
Response
Custom event properties organized by namespace and property name. See
Properties.
The form type. Common values include
prechat, postchat, and
ask_for_email. This field is absent from chats started before the field
was introduced.The fields in the form. See Form fields.
Sample Form in response
Filled form
The Filled form event contains data from a form (prechat or postchat survey).Request
Custom event properties organized by namespace and property name. See
Properties.
The completed form fields. See Filled form fields.
Response
Custom event properties organized by namespace and property name. See
Properties.
The form type. Common values include
prechat, postchat, and
ask_for_email. This field is absent from chats started before the field
was introduced.The completed form fields. See Filled form fields.
Sample Filled form in response
Message
The Message event contains a text message to other chat users.Request
The message text. The raw text can be up to 16 KB. A single UTF-8 character
can use up to 4 bytes. Split longer text into multiple messages.
Custom event properties organized by namespace and property name. See
Properties.
Response
Custom event properties organized by namespace and property name. See
Properties.
Sample Message in response
Rich message
Rich message (RM) event contains a rich message data structure.Request
Custom event properties organized by namespace and property name. See
Properties.
The template that determines how the rich message is displayed. Possible
values:
cards, sticker, quick_replies, ecommerce.Response
Custom event properties organized by namespace and property name. See
Properties.
Sample Rich message in response
Custom
Custom event is an event with customizable payload.Request
Custom event properties organized by namespace and property name. See
Properties.
Response
The event creation timestamp generated by the server in RFC 3339 format with
microsecond precision.
Custom event properties organized by namespace and property name. See
Properties.
Sample Custom event in response
System message
System message event is a native system event sent in specific situations.Request
The system message type. See System message
types.
Response
The event creation timestamp generated by the server in RFC 3339 format with
microsecond precision.
The system message type. See System message
types.
Sample System message in response
System
System event is an extension and a future replacement for System message. Similarly, it is a native system event sent in specific situations. Request It is not possible to send a System event in API version 3.6.Response
The system that generated the event. See System event
sources.
The system event subtype. See System event
subtypes.
The event creation timestamp generated by the server in RFC 3339 format with
microsecond precision.
Sample System event in response
Users
Users represent agents and customers participating in chats.Agent
Fields
The timestamp of the most recent event seen by the agent, in RFC 3339
format. All earlier events are considered seen.
Sample agent data structure
My profile
Fields
The agent’s routing status. Possible values:
accepting_chats,
not_accepting_chats, offline. The offline value applies only to bot
agents.The timestamp of the most recent event seen by the agent, in RFC 3339
format. All earlier events are considered seen.
Sample My profile data structure
Customer
Fields
The email address suggested for the customer based on tracked activity,
such as a form submission. The customer has not confirmed this address.
This field is independent of
email and is not used for identity merging
or segment membership, including built-in lead segments.If
true, the customer’s name is a placeholder set by Text according to the
organization’s language settings, including custom translations.The timestamp of the most recent event seen by the customer, in RFC 3339
format. All earlier events are considered seen.
The ID shared by the customer records that the Customer Data Platform
merges into a single
customer.
For every customer record in the resulting group, the value is the master
customer’s
id. A customer record that the Customer Data Platform has not
merged with another record uses its own customer id. The value can change
when customers are merged or unmerged, so do not use it as a permanent
identifier for a person. Agent Chat API methods do not accept cluster_id
as a customer ID. Returned when Customer Data Platform data is available for
the customer.The customer’s segment memberships.
Sample Customer data structure
Cart
Fields
Sample Cart data structure
Cart item
Fields
Sample cart item data structure
Customer property
Customer properties are identified by the UUID generated in the Create customer property definition method. The property’s type is set on creation.Fields
The current property value. Its type is determined by the property
definition’s
CustomerPropertyType.Sample customer property data structure
Segment membership
A segment membership records whether a customer satisfies a segment definition. For more information, see Customer segments.Sample Segment membership data structure
Fields
The date and time when
is_member last changed. This field is returned if
the customer belonged to the segment at least once.Account IDs of agents credited with the customer joining the segment. This
field is returned when an agent’s change added the customer to the segment.
Other common structures
These structures describe shared objects used throughout the Agent Chat API.Access
Sample Access data structure
Chats
Fields
The chat thread. See Threads.
Sample chat data structure
Chat summaries
Chat summary is similar to the chat data structure. The difference is that chat contains athread object, while chat summary includes last_thread_summary and last_event_per_type.
Fields
Custom chat properties organized by namespace and property name. See
Properties.
The groups that can access the chat. See Access.
Sample chat summary data structure
Form fields
A component of the Form event.Sample Form fields
Filled form fields
A component of the Filled form event.Sample Filled form fields
Properties
Properties are key-value stores. You can set them on a chat, thread, or event. For more information, see the Configuration API documentation.Sample Properties data structure
Threads
Fields
The AI-generated thread summary. This field is present only for inactive
threads when the
auto_summary_enabled
chat property is enabled or when the summary was requested through
Request thread summary.The thread’s queue information. This field is present while the chat is
waiting for an available agent.
The fragments of the thread that match the search query. This field is
returned by
list_archives when the highlights parameter is provided.The server-generated thread creation timestamp in RFC 3339 format with
microsecond precision.
Sample Thread data structure
Sample restricted Thread data structure
Sample Thread with legacy summary
Thread summary
Text generates thread summaries with"version": 1. A stored summary without version uses the legacy format.
- Version 1
- Version 0 (legacy)
Fields
Sample thread summary data structure
Deleted event
The Deleted Event is returned to agents with thenormal role in place of the original event.
Fields
Sample Deleted event in response