View a markdown version of this page

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

Contact analytics data in the Connect Customer data lake

The following tables contain contact analytics data.

Conversational analytics

Table name: contact_lens_conversational_analytics

Description: Contains Contact Lens analytics data including sentiment scores, talk and non-talk time, interruptions, talk speed, and response times for voice and chat contacts.

Primary key: instance_id, contact_id

Partition key: disconnect_timestamp (daily)

Join keys:

  • instance_id — Joins to all tables

  • contact_id — Joins to Contact Record, Contact Statistic Record, Contact Evaluation Record, Contact Flow Events, AI Agent, AI Session, AI Prompt, AI Tool

Column Type Nullable Description
aws_account_id string Yes The ID of the AWS account that owns the contact.
version string Yes Indicates real-time or post call/chat analysis.
instance_id string No The ID of the Connect Customer instance.
instance_arn string Yes The ARN of the Connect Customer instance.
contact_id string No The ID of the contact being evaluated.
channel string Yes The method used to contact your contact center: VOICE, CHAT.
language_locale string Yes Language used to analyze contact - AI features.
feature string Yes Will always have the same value "contact_lens_conversational_analytics".
categories array(string) Yes Array of categories assigned to the contact.
disconnect_timestamp Timestamp Yes The contact disconnect Timestamp.
greeting_time_agent_ms bigint Yes First response time of agents on chat, indicating how quickly they engage with customers after joining the chat.
non_talk_time_total_ms bigint Yes Total non-talk time in a voice conversation. Non-talk time refers to the combined duration of hold time and periods of silence exceeding 3 seconds, during which neither the agent nor the customer is engaged in conversation.
talk_time_total_ms bigint Yes Time that was spent talking during a voice contact across either the customer or the agent.
talk_time_agent_ms bigint Yes Time that was spent talking during a voice contact by the agent.
talk_time_customer_ms bigint Yes Time that was spent talking during a voice contact by the customer.
total_conversation_duration_ms bigint Yes The total time from the start of the conversation until the last word spoken by either the agent or the customer.
talk_speed_agent_wpm float Yes Words per minute spoken by the agent.
talk_speed_customer_wpm float Yes Words per minute spoken by the customer.
interruptions_time_total_ms bigint Yes Amount of time agent or customer were speaking at the same time.
interruptions_time_agent_ms bigint Yes Amount of time the agent spoke while the customer was already speaking.
interruptions_time_customer_ms bigint Yes Amount of time the customer spoke while the agent was already speaking.
interruptions_total_count bigint Yes Count of times interruptions were detected during a conversation.
interruptions_agent_count bigint Yes Count of time an agent interruption was detected during a conversation
interruptions_customer_count bigint Yes Count of times a customer interruption was detected during a conversation
sentiment_overall_score_agent float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is overall sentiment score for the agent during the call. The overall sentiment score is the average of the scores assigned during each portion of the call.
sentiment_overall_score_customer float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is overall sentiment score for customer during the call. The overall sentiment score is the average of the scores assigned during each portion of the call.
sentiment_interaction_score_customer_with_agent float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is sentiment score of customer with agent.
sentiment_interaction_score_customer_without_agent float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is sentiment score of customer without the agent.
sentiment_end_score_agent float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is sentiment score for agent at the end of the call.
sentiment_end_score_customer float Yes A sentiment score is an analysis of text, and a rating of whether it includes mostly positive, negative, or neutral language. This is sentiment score for customer at the end of the call.
response_time_average_agent_ms bigint Yes For chat, average time to send a response after the customers last message.
response_time_average_customer_ms bigint Yes For chat, average time to send a response after the agents last message.
response_time_maximum_agent_ms bigint Yes For chat, maximum time to send a response after the customers last message.
response_time_maximum_customer_ms bigint Yes For chat, maximum time to send a response after the customers last message.
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.

Contact evaluation record

Table name: contact_evaluation_record

Description: Stores contact evaluation data at the form, section, and question level, including scores, answers, and generative AI automation results for quality management.

Primary key: evaluation_id, item_reference_id, instance_id

Partition key: initiation_timestamp (daily)

Join keys:

  • instance_id — Joins to all tables

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

  • user_id — Joins to Agent Statistic Record, Agent Queue Statistic Record, Agent Event, users

  • evaluator_id — Joins to Agent Statistic Record, Agent Event, users (as user_id)

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

Column Type Nullable Description
aws_account_id string Yes The ID of the AWS account that owns the contact.
instance_id string No The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
evaluation_id string No primary key, ID of the evaluation to disambiguate multiple evaluations done of the call with the same form (by different evaluators).
item_reference_id string No primary key - might represent form/ section/ sub-section/ question depending on type.
item_type string Yes Defines "Form/Section/sub-section/question or indicates a deleted record.
contact_id string Yes The ID of the contact being evaluated.
evaluation_submitted_timestamp Timestamp Yes Timestamp when contact was evaluated.
score double Yes Score in percentage value for forms/sections/questions.
weighted_score double Yes Score adding up to 100% of form, for example, 2 sections - one of 80, other out of 20.
automatic_fail Boolean Yes Boolean to indicate if automatic fail was applied.
evaluator_id string Yes user_ID of evaluator.
numeric_answer double Yes Value for question where answer type is numeric.
answer_reference_id string Yes for single select answer type.
to_delete Boolean Yes Set to true if Form/Section/sub-section/question was deleted.
disconnect_timestamp Timestamp Yes The contact disconnect Timestamp.
initiation_timestamp Timestamp Yes The contact initiation Timestamp.
user_id string Yes The user_id of person being evaluated.
queue_id string Yes The queue_id of queue which contact was handled from.
channel string Yes The method used to contact your contact center: VOICE, CHAT, TASK, EMAIL.
contact_aggregation_timestamp Timestamp Yes Timestamp used for building aggregated agent, queue and weekly aggregation tables.
evaluated_contact_with_status string Yes The connection status of the evaluated contact at the time of evaluation. Valid Values: disconnected | notDisconnected. disconnected indicates the evaluated contact had ended (a disconnect timestamp exists). notDisconnected indicates the evaluated contact was still active at the time of evaluation (no disconnect timestamp).
evaluation_source string Yes Indicates the origin of the evaluation process. This field indicates whether the evaluation was performed manually, with the assistance of automation or entirely automatically (without human review before submission). Assistance of automation encompasses pre-configured automation to answer a question (for example, auto-filling an answer based on a conversational analytics category) or asking AI for assistance while evaluating the contact.
resubmitted Boolean Yes Indicates whether the evaluation has been resubmitted. This field helps quickly identify evaluations which were resubmitted to perform audits of the evaluation process.
evaluation_type string Yes Helps distinguish between different types of evaluations, such as standard evaluations and calibration evaluations. This provides the ability to only include relevant types of evaluations while performing analysis, for example, only standard evaluations should be used to calculate the aggregated score of an agent.
calibration_session_id string Yes Holds a unique identifier for a calibration session. This field is essential for identifying evaluations associated with a calibration session.
item_title string Yes Column captures the title of the form item. This can be a form, section, subsection or question title depending on item_type.
form_version string Yes Indicates the version number of the evaluation form used. This field helps identify different versions of the evaluation form for analysis and reporting.
acknowledgement_status string Yes Acknowledgement status of the evaluation. Valid values: ACKNOWLEDGED|UNACKNOWLEDGED
acknowledger_id string Yes user_id of the person who acknowledged the evaluation.
evaluation_acknowledged_timestamp Timestamp Yes Timestamp when the evaluation was acknowledged.
acknowledger_comment string Yes Comment left by the user who acknowledged the evaluation.
item_disabled Boolean Yes The itemDisabled column indicates whether the item is in the disabled state at the time of submission from a condition defined in the evaluation form.
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.
multi_select_answer_reference_ids array(string) Yes Value for question where answer type is multi-select.
date_time_answer Timestamp Yes Value for question where answer type is dateTime.
answer_option string Yes The selected answer option text for a single-select answer type.
multi_select_answer_options array(string) Yes The selected answer option text for a multi-select answer type.
item_note string Yes The note text added to the evaluation item.
original_evaluator_id string Yes The user_ID of the evaluator who originally submitted the evaluation.
evaluated_participant_role string Yes The role of the evaluated contact participant.
evaluated_participant_id string Yes The ID of the evaluated contact participant.
is_sampled Boolean Yes Whether the evaluation was created by a sampling job.
is_reviewed Boolean Yes Indicates that the evaluation was reviewed.
automation_gen_ai_text_answer string Yes The generative AI-generated answer for an evaluation question where the answer type is text.
automation_gen_ai_answer_reference_id string Yes The reference ID of the generative AI-generated answer for an evaluation question where the answer type is single select.
automation_gen_ai_answer_justification string Yes The justification provided by generative AI for its automated evaluation answer.
is_automation_answer_accepted Boolean Yes Indicates whether the generative AI-generated answer was accepted and used as the final answer for the evaluation question.
earned_points bigint Yes The total points earned for a question, section, or form.
max_base_point bigint Yes The maximum base points that can be earned for a question, section, or form, excluding bonus points.
performance_category string Yes The performance category for a question, section, or form. Valid values: NEEDS_IMPROVEMENT | EXCEEDS_EXPECTATION.
evaluation_measurement_scope string Yes The type of metric. Valid values: BUSINESS_OUTCOME. Null when the evaluation does not include a business outcome metric.
evaluation_measurement_name string Yes The name of the business outcome metric. Valid values: CSAT, CHURN_PROPENSITY, SELF_SERVICE_SUCCESS, PARTIAL_SELF_SERVICE_SUCCESS, SALE_SUCCESS. Null when the evaluation form question is not associated with a business outcome metric. Not all evaluation forms include questions for every metric.
evaluation_measurement_score double Yes The score for the associated business outcome metric. Range: 0.0 to 5.0. Null when the evaluation form question is not associated with a business outcome metric.

Sample queries for business outcome metrics

The following example query in Amazon Athena returns business outcome evaluation scores by metric:

SELECT evaluation_measurement_name, AVG(evaluation_measurement_score) AS avg_score, COUNT(*) AS evaluation_count FROM "contact-evaluation-record-resource-link-table-name" WHERE instance_id = 'your-instance-id' AND evaluation_measurement_scope = 'BUSINESS_OUTCOME' AND evaluation_submitted_timestamp >= TIMESTAMP 'start-date' AND evaluation_submitted_timestamp < TIMESTAMP 'end-date' GROUP BY evaluation_measurement_name ORDER BY evaluation_measurement_name;

The following example query in Amazon Athena joins business outcome scores with customer segments:

SELECT cp.lifetime_value_segment, cer.evaluation_measurement_name, AVG(cer.evaluation_measurement_score) AS avg_score, COUNT(*) AS evaluation_count FROM "contact-evaluation-record-resource-link-table-name" cer JOIN "customer-profiles-contact-event-resource-link-table-name" cp ON cer.instance_id = cp.instance_id AND cer.contact_id = cp.contact_id WHERE cer.instance_id = 'your-instance-id' AND cer.evaluation_measurement_scope = 'BUSINESS_OUTCOME' AND cer.evaluation_submitted_timestamp >= TIMESTAMP 'start-date' AND cer.evaluation_submitted_timestamp < TIMESTAMP 'end-date' GROUP BY cp.lifetime_value_segment, cer.evaluation_measurement_name ORDER BY cp.lifetime_value_segment, cer.evaluation_measurement_name;

For information about creating evaluation forms with business outcome metrics that generate the scores stored in the evaluation_measurement_score column, see Create an evaluation form.

Evaluation review record

Table name: evaluation_review_record

Description: Stores evaluation review lifecycle data, capturing who requested a review of a contact evaluation, who reviewed it, and the outcome, for quality management auditing and reporting.

Primary key: evaluation_review_id, contact_id, instance_id

Partition key: creation_timestamp (daily)

Join keys:

  • instance_id — Joins to all tables

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

  • evaluation_id — Joins to Contact Evaluation Record

  • evaluator_id, requested_by_user_id, review_created_by_user_id, reviewed_by_user_id — Join to users (as user_id)

The following table describes the columns in the evaluation_review_record table.

Column Type Nullable Description
aws_account_id string Yes The ID of the AWS account that owns the contact.
instance_id string No The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
instance_arn string Yes The Amazon Resource Name (ARN) of the Connect Customer instance.
evaluation_review_id string No Primary key, unique identifier for the evaluation review.
contact_id string No Primary key, the ID of the contact associated with the evaluation review.
evaluation_id string Yes The ID of the evaluation being reviewed.
evaluation_form_id string Yes The ID of the evaluation form used for the evaluation.
evaluation_form_title string Yes The title of the evaluation form used for the evaluation.
requested_by_user_id string Yes The user ID of the person who requested the review.
requested_timestamp Timestamp Yes Timestamp when the review was requested.
review_created_by_user_id string Yes The user ID of the reviewer who created the review.
reviewed_by_user_id string Yes The user ID of the reviewer who completed the review.
creation_timestamp Timestamp Yes Timestamp when the review was created.
last_modified_timestamp Timestamp Yes Timestamp when the review was last modified.
outcome string Yes The outcome of the review. Valid values: APPROVED | DECLINED. APPROVED means the reviewer changed the evaluation answers; DECLINED means the answers were not changed. Null while the review is in progress.
evaluator_id string Yes The user ID of the person who originally submitted the evaluation.
requester_comment string Yes Comment left by the agent requesting the review.
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.

Sample queries for evaluation reviews

The following example query in Amazon Athena returns the number of evaluation reviews by outcome. A review without an outcome is still in progress:

SELECT COALESCE(outcome, 'IN_PROGRESS') AS review_status, COUNT(*) AS review_count FROM "evaluation-review-record-resource-link-table-name" WHERE instance_id = 'your-instance-id' AND creation_timestamp >= TIMESTAMP 'start-date' AND creation_timestamp < TIMESTAMP 'end-date' GROUP BY COALESCE(outcome, 'IN_PROGRESS') ORDER BY review_status;

The following example query in Amazon Athena returns the percentage of completed reviews with an APPROVED outcome for each evaluator who submitted the original evaluation:

SELECT evaluator_id, COUNT(*) AS completed_reviews, CAST(COUNT_IF(outcome = 'APPROVED') AS DOUBLE) / COUNT(*) * 100.0 AS approved_pct FROM "evaluation-review-record-resource-link-table-name" WHERE instance_id = 'your-instance-id' AND outcome IS NOT NULL AND creation_timestamp >= TIMESTAMP 'start-date' AND creation_timestamp < TIMESTAMP 'end-date' GROUP BY evaluator_id ORDER BY approved_pct DESC;

The following example query in Amazon Athena returns the average time, in hours, from the review request to the last update of a completed review:

SELECT AVG(date_diff('second', requested_timestamp, last_modified_timestamp)) / 3600.0 AS avg_review_completion_hours FROM "evaluation-review-record-resource-link-table-name" WHERE instance_id = 'your-instance-id' AND outcome IS NOT NULL AND creation_timestamp >= TIMESTAMP 'start-date' AND creation_timestamp < TIMESTAMP 'end-date';

For information about how agents request reviews of their evaluations, see Request reviews of performance evaluations.