This document provides an explanation of the JSON schema used to structure metadata for call sessions. This schema is crucial for accurately representing and processing call sessions.
Call session metadata schema
This schema describes the structure of data related to call session metadata. The key components are described in the following sections.
Core information
These properties capture the core information of the call:
id
(integer). The identifier for each call session. This is the primary key that distinguishes one call from another.lang
(string). The ISO 689 language code used during the call, for example —en
for English ores
for Spanish. This is crucial for language-specific analysis and reporting.call_type
(string). The type of call, using a legacy set of types. Examples include — Voice Inbound (App), Voice Outbound, and Voice Internal. This helps categorize calls based on their origin and purpose.session_type
(string): a duplicate of call_typesession_type_v2
(string). The type of call, using the current set of types. This is similar to call_type but may include more granular distinctions, like Voice Inbound (Mobile) or Voice Inbound (IVR using Mobile).status
(string). The current status of the call. Possible values includescheduled
,queued
,connected
,finished
,failed
, anddeflected
. This tracks the call's progression through its lifecycle.subStatus
(string). Provides a more detailed status of the call. Possible values includewaiting_for_agent
,in_queue
, andconnected_with_agent
.created_at
(string, date-time): the precise timestamp when the call record was createdqueued_at
(string, date-time, or null): the timestamp when the call entered the queue, or null if it was never queuedassigned_at
(string, date-time, or null): the timestamp when the call was assigned to an agent, or null if it wasn't assignedconnected_at
(string, date-time, or null): the timestamp when the call was successfully connectedends_at
(string, date-time, or null): the timestamp when the call endedscheduled_at
(string, date-time, or null): the timestamp when the call was scheduled, or null if it was an immediate callupdated_at
(string, date-time): the timestamp when the call data was last modifiedwait_duration
(integer): the total time the customer spent waiting, in secondscall_duration
(integer): the total duration of the call, in secondshold_duration
(integer): the total time the customer was placed on hold, in seconds, or null if there was no hold timerating
(integer or null): the customer satisfaction (CSAT) rating provided by the customer, or null if no rating was givenhas_feedback
(boolean): a flag indicating whether the customer provided feedback after the callvoip_provider
(string): the VoIP provider used for the call. This field is deprecated and will always returndeprecated
.out_ticket_id
(string): the identifier of the ticket created in the external CRM systemout_ticket_url
(string, uri): the URL of the CRM ticketis_out_ticket_account
(boolean): indicates whether the CRM ticket represents a customer (true) or a call interaction (false)verified
(boolean): indicates if the interaction was verified through the verification smart actionrecording_url
(string, uri, or null): the URL of the call recording, or null if no recording is availablerecording_permission
(string). The status of the customer's recording permission. Possible values includenot_asked
,granted
, ordenied
.voicemail_reason
(string). The reason a voicemail was left, if applicable. Options includenot_voicemail
,temporary_redirection
, andafter_hour_deflection
.
Agent and virtual agent information
These sections explain who or what handled the call:
agent_info
(object). This field can hold information about either a human agent or a virtual agent. It uses the one of keyword to specify that it can be one of two types.agent
(object): information about the human agent:id
(integer): the agent's IDagent_number
(string or null): an identifier assigned to the agentemail
(string, email): the agent's email addressname
(string): the agent's full namelast_name
(string): the agent's last namefirst_name
(string): the agent's first nameavatar_url
(string, uri): the URL of the agent's avatar image
virtual_agent
(object): information about the virtual agent:id
(integer): the virtual agent's IDname
(string): the virtual agent's nameavatar_url
(string, uri): the URL of the virtual agent's avatar image
Menu navigation
selected_menu
(object or null): information about the menu the customer selected during the callid
(integer): the ID of the menuname
(string): the name of the menuparent_id
(integer or null): the ID of the parent menu, if anyposition
(integer): the menu position relative to other menus at the same leveldeleted
(boolean): whether the menu has been deletedmenu_type
(string): the type of menu. For example —ivr_menu
orsms_menu
.hidden
(boolean): whether the menu is visible and available for use
menu_path
(object or null): describes the hierarchical path of menus the customer navigateditems_count
(integer): the number of menus in the pathname
(string): a slash-separated string of menu names. For example — dupport or billing.materialized_path
(string): a slash-separated string of menu IDs
End-user details
end_user
(object): information about the customerid
(integer): the customer's internal IDidentifier
(string or null): an external identifier for the customerout_contact_id
(string or null): the customer's ID in the CRM
Call deflection
deflection
(string): indicates if and how the call was deflected. For example —no_deflection
,over_cap_phone
,after_hours_voicemail
.deflection_details
(array): provides a detailed log of deflections that occurred during the call. Each entry includes:id
(integer): the identifier for the deflection log recordcall_id
(integer): the identifier of the calltransfer_id
(integer or null): the identifier of the transfer associated with the deflection, if applicabledeflection
(string): the type of deflectioncreated_at
(string, date-time): timestamp when the deflection occurredfrom_menu_path
(object or null): menu path from which the call was deflectedto_menu_path
(object or null): menu path to which the call was deflectedto_sip_uri
(string or null): SIP URI to which the call was deflected, if applicableto_sip_headers
(object): SIP headers with which the call was deflected, if applicable
Call handling durations
handle_durations
(array): an array of objects, each representing a segment of the call handled by an agent. This is useful for analyzing agent handling time.id
(integer): the identifier for the handle durationagent_id
(integer): ID of the agentacw_duration
(integer): after call work durationbcw_duration
(integer): before call work durationcall_duration
(integer): call duration during this segmentmenu_path_id
(string or null): ID of the menu pathmenu_path
(string): name of the menu pathlang
(string): language usedbarged
(boolean): whether the call was barged in ontransfer
(boolean): whether a transfer occurredtransfer_id
(string or null): ID of the transfertransfer_cold
(boolean or null): whether the transfer was coldstarted_at
(string, date-time): start timestampended_at
(string, date-time): end timestampscheduled_at
(string, date-time, or null): scheduled timestamphold_duration
(integer or null): hold duration during this segmentassigned_connection_duration
(integer): duration the end user waited while the agent was connected during this phasesession_breakthrough
(object): details on assignment of the call breaking through an agent's unavailable status, if applicable
Queue durations
queue_durations
(array): an array of objects, each representing a segment of the call where the customer was in a queue. This is crucial for analyzing wait times and service levels.id
(integer): the identifier for the queue durationagent_id
(integer): ID of the agentended_at
(string, date-time): end timestamplang
(string): language usedmenu_path_id
(integer): ID of the menu pathmenu_path
(string): name of the menu pathqueue_duration
(integer): duration of the queue segmentstarted_at
(string, date-time): start timestamptransfer_cold
(boolean): whether the call was cold transferredtransfer
(boolean): whether a transfer occurredtransfer_id
(integer): ID of the transferservice_level_abandon_time_threshold
(integer): time threshold for service level abandonmentservice_level_event
(string): service level event status. For example —excluded
,in_sla
,not_in_sla
.service_level_target_percent
(integer): target percentage for service level complianceservice_level_target_time
(integer): target time for service level compliance
Virtual agent escalations
virtual_agent_deflected_escalations
(array): details of escalations from virtual agents that were deflectedid
(integer): the identifierdeflection
(string): deflection typeescalation_id
(integer): escalation event identifierescalation_reason
(string): reason for escalationescalated_at
(string, date-time): escalation timestampmenu_path_id
(integer): menu path IDmenu_path
(string): menu pathlang
(string): languagevirtual_agent
(object): virtual agent details
Virtual agent handling durations
virtual_agent_handle_durations
(array): segments of time the call was handled by a virtual agentid
(integer): the identifiervirtual_agent
(object): virtual agent detailscall_duration
(integer): duration of the segmentescalation_reason
(string): reason for escalationfinish_reason
(string): reason the interaction finishedsentiment
(integer): end-user sentimentresponse_count
(integer): virtual agent response countfallback_response_count
(integer): fallback response countinitiated_by
(string): how the virtual agent session was initiatedmenu_path_id
(integer): menu path IDmenu_path
(string): menu pathlang
(string): languagetransfer
(boolean): whether the call was transferredtransfer_id
(integer): transfer event identifierstarted_at
(string, date-time): start timestampended_at
(string, date-time): end timestamp
End-user handling durations
consumer_handle_durations
(array): durations the end-user was on the callid
(integer): the identifiercall_duration
(integer): end-user segment durationhold_duration
(integer): end-user hold durationstarted_at
(string, date-time): start timestampended_at
(string, date-time): end timestamp
End-user event durations
consumer_event_durations
(array): details of end-user call events. For example — CSAT or payment.id
(integer): the identifierduration
(integer): event durationtype
(string): event typeevent
(string): event outcomemenu_path_id
(integer): menu path IDmenu_path
(string): menu pathlang
(string): languagestarted_at
(string, date-time): start timestampended_at
(string, date-time): end timestamp
End-user in-menu durations
consumer_in_menu_durations
(array): durations of end-user interactions within menusid
(integer): the identifierduration
(integer): duration within the menuevent
(string): menu interaction outcomemenu_path_id
(integer): menu path IDmenu_path
(string): menu pathlang
(string): languagestarted_at
(string, date-time): start timestampended_at
(string, date-time): end timestamp
Participants
participants
(array): information about each participant in the call. For example — customer, agent, virtual agent.id
(integer): the identifier for the participanttype
(string): type of participant. For example — end_user, agent, virtual_agent, etc.entry_type
(string): how the participant entered the calluser_id
(integer or null): user ID if the participant is an agentend_user_id
(integer or null): end-user ID if the participant is the customervirtual_agent_id
(integer or null): virtual agent ID if the participant is a virtual agentvirtual_agent_params
(object): custom metadata used by the virtual agentstatus
(string): status of the participant. For example — waiting, connected, finished, etc.fail_reason
(string): reason for failure, if anyconnected_at
(string, date-time): timestamp when the participant connectedphone_number
(string): phone number of the participantcall_id
(integer): identifier for the callcall_duration
(integer): call duration for the participanthold_duration
(integer or null): hold duration for the participantended_at
(string, date-time): timestamp when the participant's involvement endedadapter_fail_code
(integer or null): numeric code corresponding to fail reasonadapter_fail_message
(string or null): human-readable description offail_reason
, if available.
Recordings
recordings
(array): information about call recordingsid
(integer): the identifier for the recordingcall_id
(integer): call identifierconference_sid
(string): VoIP provider's call identifierduration
(integer): recording durationrecording_type
(string): type of recordingredaction_times
(array): time segments that were redactedstarted_at
(string, date-time): recording start timestamp
Offer events
offer_type
(string or null): manner in which the call was offered to the agentoffer_events
(array): events where the call was offered to agentscasting_time
(date-time): time the call was offeredgroup
(string): Group to which the call was offered
Other details
answer_type
(string or null): how the call was answered. For example — manual or auto.outbound_number
(string): outbound phone number usedwait_time_sms
(array): wait time SMS interactionsin_call_sms
(array): SMS interactions during the calldispositions
(array): dispositions recorded during the callemail
(string, email, or null): customer's email addressfeedback
(string or null): customer feedbacksmart_action_text
(string or null): text of any smart action takencustom_data_secured
(object or null): custom, securely signed datacustom_data_not_secured
(object or null): custom, non-securely signed data
Key definitions
The schema also includes a definitions section, which defines reusable schema components:
menu_path
: a hierarchical menu pathagent
: a human agentvirtual_agent
: a virtual agentdeflection
: defines the possible deflection statuses