This document explains the JSON schema used to structure metadata for chat transcripts. This schema is necessary for accurately representing and processing chat conversations.
Chat transcript metadata schema
This schema describes the data structure data of chat transcripts. The core components are described in the following sections:
Core transcript information
The following properties provide the fundamental information about the transcript itself:
comm_type
(string). The type of communication this transcript belongs to. It can be chat or call for calls with blended SMS functionality.comm_id
(integer). An identifier for the communication, for example — chat or call to which this transcript is related.transcript_version
(string). The version of the transcript format. This is required for backward compatibility when parsing transcripts.assigned_at
(string, date-time). The timestamp for when the chat was assigned.timezone
(string). The timezone in which the chat was conducted.
Message Definitions
The definitions
section contains reusable schema components that define the
structure of different message types within the transcript. This provides
flexibility in handling various content formats:
text
(object): represents a text messagetype
(string): must be "text"content
(string): the actual text content of the messagelang
(string): the language of the text content
text_template
(object): represents a templated text messagetype
(string): must betext_template
content
(string): the text template content, which might include placeholders
markdown
(object): represents a message using Markdown formattingtype
(string): must beMarkdown
content
(string): the Markdown template content
markdown_template
(object): represents a templated Markdown messagetype
(string): must bemarkdown_template
.content
(string): the Markdown template content, possibly with placeholders
photo
(object): represents a message containing a phototype
(string): must bephoto
media_id
(integer): the ID of the media file for the photo
video
(object): represents a message containing a videotitle
(string): title of the videovideo
(object): details about the videourl
(string): URL of the videotext
(string): text alternative to the video URL
media_id
(integer): media ID to retrieve the video URL if not directly provided
image
(object): represents a message containing an imagetitle
(string): title of the imageimage
(object): details about the imageurl
(string): URL of the imagetext
(string): text alternative to the image URL
document
(object): represents a message containing a documenttitle
(string): title of the documentdocument
(object): details about the documenturl
(string): URL of the document.text
(string): text alternative to the document URL
inline_button
(object): represents a set of inline buttonstitle
(string): title of the inline button setbuttons
(array): array of button objectstitle
(string): title of the buttonaction
(string): name of the action indicated by the buttonlink
(string): URL link for quick reply link actions
sticky_button
(object): represents a set of sticky buttonstitle
(string): title of the sticky button setbuttons
(array): array of button objectstitle
(string): title of the buttonaction
(string): name of the action indicated by the buttonlink
(string): URL link for quick reply link actions
content_card
(object): represents a content cardcards
(array): array of content card objectstitle
(string): title of the content cardbody
(string): body text of the content card
server_message
(object): represents a message retrieved from the servermessage_id
(integer): ID of the stored server messagecontent
(string): content of the message retrieved from the server
action
(object): represents an action taken during the chat. It can be one of the following:action_escalation
(object): represents an escalation actionaction
(string): must be "escalation"escalation_reason
(string): the reason for the escalation.menu_id
(integer): the ID to which the communication should be escalatedlanguage
(string): ISO 689 language code of the queue to which to escalate
action_deflection
(object): represents a deflection actionaction
(string): must bedeflection
deflection_type
(string): the type of deflectionsip_parameters
(object or null): SIP parameters to forward as part of the deflection, if present
action_end
(object): represents an end actionaction
(string): must beend
noti
(object): represents a notification message. It can be one of various notification types:noti_transfer_started
(object): notification for a transfer starting.type
(string): must benoti
event
(string): must be "transferStarted"target
(string): the target destination of the transfer, for example — menu or agent.agent
(object): the agent that started the transferid
(integer): ID of the agentemail
(string): email of the agentname
(string): name of the agent
noti_verification_requested
(object): notification for a verification requesttype
(string): must benoti
event
(string): must beverificationRequested
agent
(object): the agent requesting verificationid
(integer): ID of the agent requesting verificationemail
(string): email of the agent requesting verificationname
(string): name of the agent requesting verification
noti_end_user_verified
(object): notification for when an end-user is verifiedtype
(string): must benoti
event
(string): must beendUserVerified
Other
noti_\*
types define notifications for various events like photo requests, video requests, cobrowsing events, task virtual agent events, agent joining, and transfer or escalation status changes.noti_custom
(object): represents a custom notification.type
(string): must benoti
event
(string): must becustom
detail
(object): custom event detailskey
(string): key representing the custom event detaildata
(object): custom defined event payload
Transcript entries
entries
(array): An array of objects, where each object represents an individual message sent in the chat.timestamp
(string): the timestamp when the message was senttype
(string): the type of message, referencing one of the definitions described earlier, for example —text
,photo
,noti
.body
(object): the content of the message, conforming to the structure defined by the message's type. It usesoneOf
to allow for different body types.role
(string): the role of the participant who sent the message. Possible values includeend_user
,agent
,manager
,virtual_agent
,external_agent
,task_virtual_agent
,system
.user_data
(object): data for the user who sent the message, unless it's an end_user or system message.name
(string): the user's nameid
(integer): the user's unique ID
avatar_url
(string): storage URL for the user's avatar