View a markdown version of this page

Contact data in the Connect Customer data lake - Amazon Connect Customer

Contact data in the Connect Customer data lake

The following tables contain contact data.

Contact record

Table name: contact_record

Description: The primary contact record containing comprehensive contact data including agent details, queue information, timestamps, device info, chat metrics, quality metrics, and contact chain references. This is the largest table in the data lake with over 100 columns.

Primary key: instance_id, contact_id

Partition key: initiation_timestamp (daily)

Join keys:

  • instance_id — Joins to all tables

  • contact_id — Joins to Contact Statistic Record, Contact Lens, Contact Evaluation Record, Contact Flow Events, AI tables

  • initial_contact_id, previous_contact_id, related_contact_id, next_contact_id — Self-joins for contact chains

  • agent_id — Joins to Agent Statistic Record (as user_id), Agent Queue Statistic Record (as user_id), Agent Event (as agent_arn), users (as user_id)

  • queue_id — Joins to Agent Queue Statistic Record, Contact Statistic Record

  • agent_routing_profile_id — Joins to routing_profiles (as agent_routing_profile_id)

  • agent_hierarchy_groups_level_*_id — Joins to agent_hierarchy_groups

  • campaign_Id — Joins to Outbound Campaign Events (as campaign_id)

Column Type Nullable Description
instance_id string No The ID of the Connect Customer instance.
aws_account_id string Yes The ID of the AWS account that owns the contact.
contact_id string No The ID of the contact in the contact record.
initial_contact_id string Yes The unique identifier for the contact associated with the first interaction between the customer and your contact center. Use the initial contact ID to track contacts between flows.
previous_contact_id string Yes The unique identifier for the contact before it was transferred. Use the previous contact ID to trace contacts between flows.
related_contact_id string Yes Each time a contact is connected to an agent, a new contact record is created. The contact records for a contact are linked together through the contactId fields: related.
next_contact_id string Yes Each time a contact is connected to an agent, a new contact record is created. The contact records for a contact are linked together through the contactId fields: initial, next, previous.
channel string Yes The method used to contact your contact center: VOICE, CHAT, TASK, EMAIL.
initiation_method string Yes How the contact was initiated. Valid values include: INBOUND, OUTBOUND, TRANSFER, CALLBACK, QUEUE_TRANSFER, EXTERNAL_OUTBOUND, MONITOR, DISCONNECT, and API .
initiation_timestamp Timestamp Yes The contact initiation Timestamp.
connected_to_system_timestamp Timestamp Yes The Timestamp marking the date and time the customer endpoint connected to Connect Customer, in UTC time. For INBOUND, this matches InitiationTimestamp. For OUTBOUND, CALLBACK, and API, this is when the customer endpoint answers.
last_update_timestamp Timestamp Yes The Timestamp, which shows the last time the data lake touched a record in the data lake.
scheduled_timestamp Timestamp Yes The date and time when this contact was scheduled to trigger the flow to run, in UTC time. This is supported only for the task channel.
transfer_completed_timestamp Timestamp Yes The Timestamp for the completion of the transfer.
disconnect_timestamp Timestamp Yes The contact disconnect Timestamp.
disconnect_reason string Yes The reason for disconnect of the call.
queue_duration_ms bigint Yes The duration that a contact spent waiting in the queue in milliseconds.
queue_dequeue_timestamp Timestamp Yes The Timestamp of contacts transferred out of the queue from another queue during a Customer queue flow.
queue_enqueue_timestamp Timestamp Yes The Timestamp of contacts transferred into the queue from another queue during a Customer queue flow.
queue_name string Yes The name of the queue.
queue_arn string Yes ARN of the queue.
queue_id string Yes ID of the queue.
agent_connection_attempts bigint Yes The number of times Amazon Connect attempted to connect this contact with an agent.
agent_connected_to_agent_timestamp Timestamp Yes The Timestamp the contact was connected to the agent.
agent_interaction_duration_ms bigint Yes The total time that agents spent interacting with customers  in milliseconds.
agent_customer_hold_duration_ms bigint Yes Total time that agents and contact were on hold  in milliseconds.
agent_number_of_holds bigint Yes The count of contacts that were placed on hold by the agent
agent_longest_hold_duration_ms bigint Yes The longest time, in whole seconds, that the customer was put on hold by the agent.
agent_after_contact_work_start_timestamp Timestamp Yes The Timestamp marking the start of the AfterContactWork state.
agent_after_contact_work_end_timestamp Timestamp Yes The Timestamp marking the end of the AfterContactWork state.
agent_after_contact_work_duration_ms bigint Yes The total time that an agent spent doing ACW for a contact in milliseconds. In some businesses, also known as Call Wrap Up time.
attributes map(string,string) Yes A contact attribute represents this data as a key-value pair. You might think of it as a field name together with the data entered into that field.
agent_username string Yes The user name of the agent, as entered in their Connect Customer user account.
agent_arn string Yes The ARN of the agent, as created in their Connect Customer user account.
agent_id string Yes The ID of the agent, as created in their Connect Customer user account.
instance_arn string Yes The ARN of the Connect Customer instance.
agent_hierarchy_groups_level_1_name string Yes The hierarchy name the agent is assigned to, for first level.
agent_hierarchy_groups_level_1_arn string Yes The hierarchy ARN the agent is assigned to, for first level.
agent_hierarchy_groups_level_1_id string Yes The hierarchy ID the agent is assigned to, for first level.
agent_hierarchy_groups_level_2_name string Yes The hierarchy name the agent is assigned to, for second level.
agent_hierarchy_groups_level_2_arn string Yes The hierarchy ARN the agent is assigned to, for second level.
agent_hierarchy_groups_level_2_id string Yes The hierarchy ID the agent is assigned to, for second level.
agent_hierarchy_groups_level_3_name string Yes The hierarchy name the agent is assigned to, for third level.
agent_hierarchy_groups_level_3_arn string Yes The hierarchy ARN the agent is assigned to, for third level.
agent_hierarchy_groups_level_3_id string Yes The hierarchy ID the agent is assigned to, for third level.
agent_hierarchy_groups_level_4_name string Yes The hierarchy name the agent is assigned to, for fourth level.
agent_hierarchy_groups_level_4_arn string Yes The hierarchy ARN the agent is assigned to, for fourth level.
agent_hierarchy_groups_level_4_id string Yes The hierarchy ID the agent is assigned to, for fourth level.
agent_hierarchy_groups_level_5_name string Yes The hierarchy name the agent is assigned to, for fifth level.
agent_hierarchy_groups_level_5_arn string Yes The hierarchy ARN the agent is assigned to, for fifth level.
agent_hierarchy_groups_level_5_id string Yes The hierarchy ID the agent is assigned to, for fifth level.
agent_routing_profile_name string Yes The name of routing profile for the agent.
agent_routing_profile_arn string Yes The ARN of routing profile for the agent.
agent_routing_profile_id string Yes The ID of the routing profile for the agent.
agent_voice_enhancement_mode string Yes The voice enhancement mode used by the agent. Valid values: VOICE_ISOLATION | NOISE_SUPPRESSION | NONE. A value of null indicates this mode has not yet been set for this user.
aws_contact_trace_record_format_version string Yes The record format version.
campaign_Id string Yes The ID associated with an outbound campaign to assist with tracking campaigns.
customer_endpoint_type string Yes The type of the customer endpoint. Valid value is TELEPHONE_NUMBER.
customer_endpoint_address string Yes The customer or external third party participant endpoint address.
transferred_endpoint_type string Yes The customer or external third party participant transferred endpoint type.
transferred_endpoint_address string Yes The customer or external third party participant transferred endpoint address.
system_endpoint_type string Yes The type of the system endpoint. Valid value is TELEPHONE_NUMBER.
system_endpoint_address string Yes The system endpoint type address.
recording_deletion_reason string Yes If the recording was deleted, this is the reason entered for the deletion.
recording_location string Yes The location, in Amazon S3, for the recording.
recording_status string Yes The recording status. Valid values: AVAILABLE | DELETED | NULL.
recording_type string Yes The recording type. Valid values: AUDIO.
answering_machine_detection_Status string Yes The status of whether an answering machine was detected.
voice_id_result_authentication_result string Yes The voice authentication information for the call.
voice_id_result_fraud_detection_watch_list_id string Yes The fraud detection information for the call for watch list.
voice_id_result_speaker_id string Yes The fraud detection result produced by Voice ID, processed against the current session state and streamed audio of the speaker.
voice_id_result_fraud_detection_result string Yes The fraud detection result information for the call.
voice_id_result_fraud_detection_fraudster_Id string Yes The fraud detection information for the call detecting a fraudster.
external_third_party_interaction_duration_ms bigint Yes The interaction duration for external third party in milliseconds.
voice_id_result_authentication_minimum_speech_ms bigint Yes The minimum authentication score required for a user to be authenticated. Values MIN 0 and MAX 100.
voice_id_result_authentication_score bigint Yes The minimum authentication score required for a user to be authenticated. Values MIN 0 and MAX 100.
voice_id_result_authentication_score_threshold bigint Yes The minimum authentication score required for a user to be authenticated. Values MIN 0 and MAX 100.
voice_id_result_fraud_detection_risk_score_known_fraudster bigint Yes The detection of fraudsters in a watchlist score for Known Fraudster category.
voice_id_result_fraud_detection_risk_score_synthetic_speech bigint Yes This score is presented as a combined risk score for Voice Spoofing.
voice_id_result_fraud_detection_risk_score_voice_spoofing bigint Yes The fraud risk score based on Voice Spoofing, such as playback of audio from Text-to-Speech systems recorded audio.
voice_id_result_fraud_detection_score_threshold bigint Yes The threshold for detection of fraudsters in a watchlist that was set in the flow for the contact.
agent_pause_duration_ms bigint Yes Agent pause duration for a contact in seconds.
voice_id_result_speaker_enrolled Boolean Yes Enrolled: The caller is enrolled in voice authentication.
voice_id_result_speaker_opted_out Boolean Yes Opted out: The caller has opted out of voice authentication.
media_streams_items array(struct(type:string)) Yes Information about the media stream used during the contact. Valid values: AUDIO, VIDEO, CHAT.
voice_id_result_fraud_detection_reasons_items array(string) Yes Contains fraud types: Known Fraudster and Voice Spoofing.
tags_references_items map(string,string) Yes Adds the specified tags to the specified resource.
contact_details map(string,string) Yes The details for the contact between agent and caller.
contact_evaluations map(string,struct(form_id:string,evaluation_arn:string,status:string, start_timestamp:timestamp,end_timestamp:timestamp,delete_timestamp:timestamp, export_location:string)) Yes The list with the fields and data in the evaluation form.
references array(struct(name:string, type:string, value:string, status: string, arn: string)) Yes Contains links to other documents that are related to a contact. Type: URL | ATTACHMENT | NUMBER | STRING | DATE | EMAIL_MESSAGE
additional_email_recipients array(struct(to_list: array(struct(display_name: string, address: string)), cc_list: array(struct(display_name: string, address: string)), from_recipient: struct(display_name: string, address: string))) Yes Contains the entire list of email address and display names from the email contact.
agent_state_transitions array(struct(state_start_timestamp:timestamp,state_end_timestamp:timestamp, state:string)) Yes Information about the state transitions of the agent.
recordings array(struct(storage_type:string,location:string,media_stream_type:string, participant_type:string,fragment_start_number:string,fragment_stop_number:string, start_timestamp:timestamp,stop_timestamp:timestamp,status:string, deletion_reason:string)) Yes Information about a voice recording, chat transcript, or screen recording.
agent_device_platform_name string Yes Name of the platform that the agent used for the call.
agent_device_platform_version string Yes Version of the platform that the agent used for the call.
agent_device_operating_system string Yes Operating system that the agent used for the call.
customer_device_platform_name string Yes Name of the platform that the customer used for the call.
customer_device_platform_version string Yes Version of the platform that the customer used for the call.
customer_device_operating_system string Yes Operating system that the agent customer for the call.
disconnect_details_potential_disconnect_issue string Yes Indicates the potential disconnection issues for a call. This field is not populated if the service does not detect potential issues.
last_resumed_timestamp Timestamp Yes The date and time this contact was last resumed, in UTC time.
last_paused_timestamp Timestamp Yes The date and time this contact was last paused, in UTC time.
customer_voice_activity_greeting_start_timestamp Timestamp Yes The date and time that measures the beginning of the customer greeting from an outbound voice call, in UTC time.
customer_voice_activity_greeting_end_timestamp Timestamp Yes The date and time that measures the end of the customer greeting from an outbound voice call, in UTC time.
total_pause_duration_ms bigint Yes Total pause duration, including before and after the agent was connected.
total_pause_count bigint Yes Total number of pauses including when the contact was not connected.
quality_metrics_agent_audio struct Yes Information about the quality of the agent's media connection. This is a measure of how the agent sounded to the customer.
quality_metrics_customer_audio struct Yes Information about the quality of the customer's media connection. This is a measure of how the customer sounded to the agent.
segment_attribute map(string, string) Yes A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters.
data_lake_last_processed_timestamp Timestamp Yes Timestamp, which shows the last time the data lake processed the record. This can include transformation and backfill. This field cannot reliably be used to determine data freshness.
chat_contact_metrics_total_messages bigint Yes The number of chat messages on the contact
chat_contact_metrics_conversation_close_time_ms bigint Yes The time it took for a contact to end after the last customer message
chat_contact_metrics_conversation_turn_count bigint Yes The number of conversation turns in a chat contact
chat_contact_metrics_agent_first_response_timestamp Timestamp Yes The agent first response timestamp for a chat contact.
chat_contact_metrics_agent_first_response_time_ms bigint Yes The time for an agent to respond after obtaining a chat contact.
chat_contact_metrics_total_bot_messages bigint Yes The total number of bot and automated messages on a chat contact.
chat_contact_metrics_total_bot_message_length_in_chars bigint Yes The total number of characters from bot and automated messages on a chat contact.
chat_contact_metrics_multi_party Boolean Yes A flag indicating whether multiparty chat or supervisor barge were enabled on this contact
chat_agent_metrics_participant_id string Yes The Agent's participant id.
chat_agent_metrics_participant_type string Yes The Agent's participant type.
chat_agent_metrics_conversation_abandon Boolean Yes A flag indicating whether the chat conversation was abandoned by an Agent.
chat_agent_metrics_messages_sent bigint Yes The number of chat messages sent by Agent.
chat_agent_metrics_num_responses bigint Yes The number of responses sent by Agent to Customer.
chat_agent_metrics_message_length_in_chars bigint Yes The number of chat characters sent by Agent.
chat_agent_metrics_total_response_time_ms bigint Yes The total chat response time by Agent.
chat_agent_metrics_max_response_time_ms bigint Yes The maximum chat response time by Agent.
chat_agent_metrics_last_message_timestamp Timestamp Yes The Timestamp of last chat message by Agent.
chat_customer_metrics_participant_id string Yes The Customer's participant id.
chat_customer_metrics_participant_type string Yes The Customer's participant type.
chat_customer_metrics_conversation_abandon Boolean Yes A flag indicating whether the chat conversation was abandoned by an Customer
chat_customer_metrics_messages_sent bigint Yes The Number of chat messages sent by Customer.
chat_customer_metrics_num_responses bigint Yes The number of responses sent by Customer.
chat_customer_metrics_message_length_in_chars bigint Yes The number of chat characters sent by Customer.
chat_customer_metrics_total_response_time_ms bigint Yes The total chat response time by Customer.
chat_customer_metrics_max_response_time_ms bigint Yes The maximum chat response time by Customer.
chat_customer_metrics_last_message_timestamp Timestamp Yes The Timestamp of last chat message by Customer.
q_in_connect_session_arn string Yes The ARN of Connect AI agents session.
ai_agents array(struct) Yes The AI Agent information of the contact. Each object includes ai_use_case (string), ai_agent_version_id (string), and ai_agent_escalated (boolean).
customer_phone_number_prefix string Yes The prefix of the customer phone number.

Contact statistic record

Table name: contact_statistic_record

Description: Contains pre-computed contact statistics and boolean flags for KPI calculation, including timing metrics and classification flags for contact handling, transfers, and abandonment.

Primary key: instance_id, contact_id

Join keys:

  • instance_id — Joins to all tables

  • contact_id — Joins to Contact Record, Contact Lens, Contact Evaluation Record, Contact Flow Events

  • queue_id — Joins to Contact Record, Agent Queue Statistic Record

  • agent_id — Joins to Contact Record (as agent_id), Agent Statistic Record (as user_id), Agent Queue Statistic Record (as user_id), users (as user_id)

Column Type Nullable Description
instance_id string No The ID of the Connect Customer instance.
aws_account_id string Yes The ID of the AWS account that owns the contact.
contact_id string No The ID of the contact.
channel string Yes The method used to contact your contact center: VOICE, CHAT, TASK, EMAIL.
queue_id string Yes ID of the queue.
agent_id string Yes ID of the agent.
initiation_method string Yes Values for INITIATION_METHOD: INBOUND | OUTBOUND | TRANSFER | QUEUE_TRANSFER | CALLBACK | API
disconnect_timestamp Timestamp Yes The contact disconnect Timestamp.
enqueue_timestamp Timestamp Yes The Timestamp of contacts transferred into the queue from another queue during a Customer queue flow.
contact_flow_time_ms bigint Yes The time a contact spent in a contact flow.
abandon_time_ms bigint Yes The time that contacts waited in the queue before being abandoned.
queue_time_ms bigint Yes The time that a contact spent waiting in the queue.
queue_answer_time_ms bigint Yes The time that contacts waited in the queue before being answered by an agent.
handle_time_ms bigint Yes The time that an agent spent on contacts. Agent interaction + Customer Hold + ACW
customer_hold_time_ms bigint Yes The time that customers spent on hold after being connected to an agent.
agent_interaction_time_ms bigint Yes The time that customer spent to interact with agent.
agent_interaction_outbound_time_ms bigint Yes The time that agents spent interacting with a customer during an outbound contact.
agent_interaction_and_hold_time_ms bigint Yes The time that customer spent to interact with agent and put on hold.
after_contact_work_time_ms bigint Yes The time that an agent spent doing ACW for a contact.
after_contact_work_outbound_time_ms bigint Yes The time that agents spent doing After Contact Work (ACW) for an outbound contact.
is_connected bigint Yes

A flag indicating whether connected_to_system_timestamp is not null.

is_connected is populated when connected_to_system_timestamp is not null and is set to the date and time the customer endpoint connected to Connect Customer, in UTC time. For INBOUND, this matches InitiationTimestamp. For OUTBOUND, CALLBACK, and API, this is when the customer endpoint answers.

Note that is_handled indicates whether the call was connected to an agent.

is_abandoned bigint Yes A flag indicating whether a contact is abandoned. (Determined by not having been handled by an agent, not being transferred by a flow and not having a next contact.)
is_agent_hung_up_first bigint Yes A flag indicating whether a contact is disconnected where the agent disconnected before the customer.
is_handled bigint Yes A flag indicating whether the call was connected to an agent.
is_handled_incoming bigint Yes A flag indicating whether a contact is an incoming contact that was handled by an agent, including inbound contacts and transferred contacts.
is_handled_outbound bigint Yes A flag indicating whether a contact is an outbound contact that was handled by an agent.
is_callback_handled bigint Yes A flag indicating whether a contact is a callback and handled by an agent.
is_api_handled bigint Yes A flag indicating whether a contact is initiated using an Connect Customer API operation and handled by an agent.
is_put_on_hold bigint Yes A flag indicating whether a contact is put on hold.
is_hold_disconnect bigint Yes A flag indicating whether a contact is disconnected while the customer was on hold.
is_hold_agent_disconnect bigint Yes A flag indicating whether a contact is disconnected by the agent while the customer was on hold.
is_hold_customer_disconnect bigint Yes A flag indicating whether a contact is disconnected by the customer while the customer was on hold.
is_incoming bigint Yes A flag indicating whether a contact is an incoming contacts, including inbound contacts and transferred contacts.
is_callback_contact bigint Yes A flag indicating whether a contact is callback.
is_api_contact bigint Yes A flag indicating whether a contact is initiated using an Connect Customer API operation.
is_queued bigint Yes A flag indicating whether a contact is put in queue.
is_queued_and_handled bigint Yes A flag indicating whether a contact is put in queue and handled by agent.
is_transferred_in bigint Yes A flag indicating whether a contact is transferred in.
is_transferred_in_from_handled bigint Yes A flag indicating whether a contact is transferred in from a contact handled by agent.
is_transferred_in_from_queued bigint Yes A flag indicating whether a contact is transferred to the queue from another in a Transfer to queue contact flow.
is_transferred_out bigint Yes A flag indicating whether a contact is transferred out.
is_transferred_out_from_handled bigint Yes A flag indicating whether a contact is transferred in from a contact handled by agent.
is_transferred_out_from_queued bigint Yes A flag indicating whether a contact is transferred from the queue to another queue in a Transfer to queue contact flow.
is_transferred_out_internal bigint Yes A flag indicating whether a contact is transferred to an internal source.
is_transferred_out_external bigint Yes A flag indicating whether a contact is transferred from the queue to an external source.
is_transferred_out_external_from_contact_flow bigint Yes A flag indicating whether a contact is transferred to an external destination by contact flow.
data_lake_last_processed_timestamp Timestamp Yes Timestamp, which shows the last time the data lake processed the record. This can include transformation and backfill. This field cannot reliably be used to determine data freshness.