

# Metrics, dashboards, and reports in Amazon Connect
Metrics, dashboards, and reports

In Amazon Connect, data about contacts are captured in contact records. This data can include the amount of time a contact spends in each state: customer on hold, customer in queue, agent interaction time. 

The basis for most historical and real-time metrics in Amazon Connect is the data in the contact record. When you create metrics reports, the values displayed for **most** (not all) metrics in the report are calculated using the data in the contact records. 

Contact records are available within your instance for 24 months from the time when the associated contact was initiated. You can also stream contact records to Amazon Kinesis to retain the data longer, and perform advanced analysis on it.

**Tip**  
For detailed information about the activity of agents in your contact center, use [Amazon Connect agent event streams](agent-event-streams.md).

**Topics**
+ [Metric definitions](metrics-definitions.md)
+ [

# Custom metric primitives
](metric-primitive-definitions.md)
+ [Assign permissions](dashboard-required-permissions.md)
+ [Dashboards](dashboards.md)
+ [Real-time metrics reports](real-time-metrics-reports.md)
+ [Historical metrics reports](historical-metrics.md)
+ [

# Login/Logout reports for agents in Amazon Connect
](login-logout-reports.md)
+ [Agent event streams](agent-event-streams.md)
+ [Contacts, contact chains, and contact attributes](contacts-contact-chains-attributes.md)
+ [Contact events](contact-events.md)
+ [Contact records data model](ctr-data-model.md)
+ [Use contact segment attributes](use-contact-segment-attributes.md)
+ [Use predefined attributes in dashboards](use-predefined-attributes-dashboards.md)
+ [Apply hierarchy-based access control](dashboard-access-control.md)
+ [Apply tag-based access control](dashboard-tag-based-access-control.md)
+ [Identify conferences and transfers](identify-conferences-transfers.md)
+ [

# View a contact record in the Amazon Connect admin website
](sample-ctr.md)
+ [

# Agent status in the Contact Control Panel (CCP)
](metrics-agent-status.md)
+ [About contact states](about-contact-states.md)
+ [About queued callbacks](about-queued-callbacks.md)
+ [Save custom reports](save-reports.md)
+ [Share saved reports](share-reports.md)
+ [View a shared report](view-a-shared-report.md)
+ [Make a report read-only](readonly-reports.md)
+ [Publish reports](publish-reports.md)
+ [Manage saved reports (admin)](manage-saved-reports-admin.md)
+ [Monitor CloudWatch metrics](monitoring-cloudwatch.md)
+ [Logging service API calls](logging-using-cloudtrail.md)
+ [EventBridge events emitted by Amazon Connect](connect-eventbridge-events.md)

# Metric definitions in Amazon Connect
Metric definitions

This topic lists all metrics in alphabetical order. For lists of metrics that apply only to a specific feature area, see these topics: 
+ [Custom metric primitives](metric-primitive-definitions.md)
+ [Amazon Connect Cases metrics](case-management-metrics.md)
+ [Amazon Connect bot metrics and analytics](bot-metrics.md)
+ [Conversational analytics metrics](contact-lens-metrics.md)
+ [Evaluation metrics](evaluation-metrics.md)
+ [Outbound campaign metrics](outbound-campaign-metrics.md)
+ [Schedule Adherence metrics](scheduling-metrics.md)

## Abandonment rate


This metric measures the percentage of abandoned contacts. An abandoned contact refers to a contact that was disconnected by the customer while in queue. This means that they weren't connected to an agent. Contacts queued for callback are not counted as abandoned.

The abandonment rate helps you identify potential issues with long wait times or inefficient queue management. A high abandonment rate may indicate a need for additional staffing, improved call routing strategies, or addressing queue bottlenecks.

**Metric type**: String
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `ABANDONMENT_RATE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Abandonment rate
+ Historical metrics reports: Abandonment rate

**Calculation logic**: 
+ (Contacts abandoned / Contacts queues ) \$1 100.0

## Active AI Agents


This metric measures the total number of unique [AI Agents](create-ai-agents.md), where each AI Agent is identified by its unique combination of `Name` and `Version`.

**Metric type**: Integer

**Metric category**: AI Agent

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `ACTIVE_AI_AGENTS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Active AI Agents

**Calculation logic**:
+ For each AI Agent record 
  + If aiAgentId is NOT present, then skip this record.
  + If aiAgentNameVersion is present, then return noncontroversial.
+ Return final\$1result = approximate unique count of aiAgentNameVersion values from matching records.

## Active slots


This metric counts the number of active contact handling slots across all agents.

A slot is considered active when it contains a contact that is:
+ Connected
+ On Hold
+ In After Contact Work
+ Paused
+ In Outbound ring state

This metric helps organizations:
+ Monitor concurrent contact handling capacity.
+ Track real-time channel utilization.
+ Plan capacity management.

**Metric type**: COUNT
+ Min value: 0
+ Max value: Total configured slots across all agents

**Metric category**: Current agent metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API identifier: `SLOTS_ACTIVE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Active
+ Historical metrics reports: Active
+ Dashboard: Active Slots

## Adherence


This metric is available in AWS Regions only where [Forecasting, capacity planning, and scheduling](regions.md#optimization_region) is available.

This metric measures the percentage of time that an agent correctly follows their schedule. 

**Metric type**: String
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_SCHEDULE_ADHERENCE`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Adherence

**Notes**:
+ Any time you change the schedule, Schedule Adherence is re-calculated up to 30 days in the past from the current date (not the date of the schedule), if schedules are changed.

For a list of all schedule adherence metrics, see [Schedule Adherence metrics in Amazon Connect](scheduling-metrics.md).

## Adherent time


This metric is available in AWS Regions only where [Forecasting, capacity planning, and scheduling](regions.md#optimization_region) is available.

This metric measures the total time an agent adhered to their schedule.

**Metric type**: String

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_ADHERENT_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Adherent time

For a list of all schedule adherence metrics, see [Schedule Adherence metrics in Amazon Connect](scheduling-metrics.md).

## After contact work time


This metric measures the total time that an agent spent doing ACW for a contact. In some businesses, also known as Call Wrap Up time. 

You specify the amount of time an agent has to do ACW in their [agent configuration settings](configure-agents.md). When a conversation with a contact ends, the agent is automatically allocated to do ACW for the contact. ACW ends for a contact when the agent changes to an alternate state such as available or the configured timeout is reached.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `AFTER_CONTACT_WORK_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_AFTER_CONTACT_WORK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Duration (when Agent Activity is in After Contact Work state)
+ Historical metrics reports: After contact work time

**Calculation logic**:
+ For each contact record
  + If Agent.AfterContactWorkDuration is present, then set result = Agent.AfterContactWorkDuration.
  + Else, if Agent.ConnectedToAgentTimestamp (the contact was connected to an agent) is present, then set result = 0.
  + Else, skip this record.
+ Return final\$1result = sum of all the result values from matching records.

## Agent Activity


This column heading appears on Real-time metrics reports. It's not a metric exactly, but a indicator of the agent's activity state.

If an agent is handling a single contact, this metric may have the following values: Available, Incoming, On contact, Rejected, Missed, Error, After contact work, or a custom status. 

If an agent is handling concurrent contacts, Amazon Connect uses the following logic to determine the state: 
+ If at least one contact is in Error, Agent Activity = **Error**.
+ Else if at least one contact is Missed contact, Agent Activity = **Missed**.
+ Else if at least one contact is Rejected contact, Agent Activity = **Rejected**.
+ Else if at least one contact is Connected, On Hold, Paused, or Outbound contact/Outbound callback, Agent Activity = **On contact**.
+ Else if at least one contact is After contact work, Agent Activity = **After Contact Work**.
+ Else if at least one contact is Incoming/Inbound Callback, Agent Activity = **Incoming**.
+ Else if agent status is a custom status, Agent Activity is the custom status.
+ Else if agent status is Available, Agent Activity = **Available**.
+ Else if agent status is Offline, Agent Activity = **Offline**. (After an agent moves to Offline, they disappear from the real-time metrics page in 5-10 minutes.)

If a manager is using the Manager Monitor feature to monitor a particular agent as they interact with a customer, then the manager's Agent Activity will display as Monitoring. The Agent Activity of the agent who is being monitored is still On Contact.

## Agent After contact work


This metric counts contacts that are in an **AfterContactWork** (ACW) state. After a conversation between an agent and customer ends, the contact is moved into the ACW state.

This metric helps organizations:
+ Monitor post-contact processing time.
+ Identify potential bottlenecks in contact handling.
+ Plan staffing needs accounting for ACW time.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current agent metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API identifier: `AGENTS_AFTER_CONTACT_WORK`

  Despite the API name suggesting this metric counts agents, it actually counts contacts in ACW state, not the number of agents.

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: ACW
+ Historical metrics reports: Contacts in ACW
+ Dashboard: ACW contacts

To learn more about agent status and contact states, see [Agent status in the Contact Control Panel (CCP)](metrics-agent-status.md) and [About contact states in Amazon Connect](about-contact-states.md).

## Agent API connecting time


This metric measures the total time between when a contact is initiated using an Amazon Connect API, and the agent is connected.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONNECTING_TIME_AGENT`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = API`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent API connecting time

**Calculation logic**:
+ Check connectingTimeMetricsNested.connectingTime present?
+ Convert milliseconds to seconds (value / 1000.0).
+ Return connecting time in seconds or null if not present.

**Notes**:
+ Measures the duration of connection attempts.
+ Time is converted from milliseconds to seconds.
+ Returns null if connecting time data is not present.
+ Can be filtered by initiation method.
+ Data for this metric is available starting from December 29, 2023 0:00:00 GMT.

## Agent answer rate


This metric measures the percentage of contacts routed to an agent that were answered. It provides insights into agent responsiveness and availability by calculating the ratio of accepted contacts to total routing attempts.

**Metric type**: String 
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API identifier: `AGENT_ANSWER_RATE`.

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent answer rate

**Calculation logic**:
+ Get total contacts accepted by agent.
+ Get total contact routing attempts to agent.
+ Calculate the percentage: (Contacts accepted / Total routing attempts) \$1 100. 

**Notes**:
+ Returns a percentage value between 0 and 100.
+ Uses AVG statistic for aggregation.
+ Helps measure agent efficiency in handling routed contacts.
+ Can be filtered by queue, channel, and agent hierarchy.
+ Data for this metric is available starting from December 29, 2023 0:00:00 GMT.

## Agent average contact first response wait time


This metric measures the average time (in seconds) elapsed from the chat session enqueue timestamp to the timestamp of the first agent reply to the customer. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CONTACT_FIRST_RESPONSE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. contact first response wait time

**Calculation logic**:
+ For each contact record
  + If `QueueInfo.EnqueueTimestamp` and `ChatMetrics.ContactMetrics.AgentFirstResponseTimestamp` attributes are not present, skip the contact record
  + If present, set result = difference between `QueueInfo.EnqueueTimestamp` and `ChatMetrics.ContactMetrics.AgentFirstResponseTimestamp` (in milliseconds)
+ For the final result, average of the result values across all contact records not skipped.

## Agent callback connecting time


This metric measures the total time between when a callback contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API identifier: `SUM_CONNECTING_TIME_AGENT`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = CALLBACK`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent callback connecting time

## Agent error


This metric counts agents in an Error state. An agent enters this state when they:
+ Miss a call
+ Reject a chat/task (most common scenario)
+ Experience a connection failure

This metric helps organizations:
+ Monitor technical issues affecting agent availability.
+ Identify potential training needs for proper contact handling.
+ Track rejected/missed contact patterns.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current agent metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API identifier: `AGENTS_ERROR`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Error
+ Historical metrics reports: Agents in error
+ Dashboard: Error state agents

## Agent idle time


After the agent sets their status in the CCP to **Available**, this metric measures is the amount of time they weren't handling contacts \$1 any time their contacts were in an Error state. 

Agent idle time includes the amount of time from when Amazon Connect starts routing the contact to the agent to when the agent picks up or declines the contact. After an agent accepts the contact, the agent is no longer considered idle.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_IDLE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent idle time

**Calculation logic**:
+ Check idleTime present and not empty?
+ Convert milliseconds to seconds (idleTime / 1000.0).
+ Return Idle time in seconds or null if not present.

**Notes**:
+ This metric can't be grouped or filtered by queue. For example, when you create a historical metrics report and filter by one or more queues, Agent idle time is not displayed.
+ This metric measures available time without contact handling.
+ It includes error state duration.
+ Time is converted from milliseconds to seconds.
+ It is used in occupancy calculations.
+ It returns null if idle time data is not present.
+ Data for this metric is available starting from December 29, 2023 0:00:00 GMT.

## Agent incoming connecting time


This metric measures the total time between when a contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html): `SUM_CONNECTING_TIME_AGENT`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = INBOUND`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent incoming connecting time

**Calculation logic**:
+ In the agent event stream, this is the duration between the contact state of `STATE_CHANGE` event changes from `CONNECTING` to `CONNECTED`/`MISSED`/ `ERROR`. 

## Agent interaction and hold time


This metric measures the total time an agent spends on a customer interaction, including [Agent interaction time](#agent-interaction-time) and [Customer hold time](#customer-hold-time). It applies to both inbound and outbound calls.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html): `SUM_INTERACTION_AND_HOLD_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent interaction and hold time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is present, then set agent\$1interaction = Agent.AgentInteractionDuration.
  + If Agent.CustomerHoldDuration is present, then set customer\$1hold = Agent.CustomerHoldDuration.
  + If all above fields ARE null, then skip this record.
  + Else set result = agent\$1interaction \$1 customer\$1hold.
+ Return final\$1result = sum of all the result values from matching records.

## Agent interaction time


This metric measures the total time that agents spent interacting with customers on inbound and outbound contacts. This does not include [Customer Hold Time](#customer-hold-time), [After Contact Work Time](#after-contact-work-time), or agent pause duration (which applies only to tasks).

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html): `SUM_INTERACTION_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent interaction time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If Agent.AgentInteractionDuration is present, then set result = Agent.AgentInteractionDuration
+ Return final\$1result = sum of all the result values from matching records (both inbound and outbound contacts).

## Agent non-productive


This metric counts agents who have set their status in the CCP to a [custom status](agent-custom.md). That is, any status other than **Available** or **Offline**.

Important notes:
+ Agents can handle contacts while their CCP status is set to a custom status / in NPT state. For example, agents can be **On contact** or doing **ACW** while their CCP is set to a custom status.
+ This means it's possible for agents to be counted as **On contact** and **NPT** at the same time. 

  For example, if an agent changes their status to a custom status, and then makes an outbound call, it would be counted as non-productive time.
+ No new inbound contacts are routed to agents in NPT state.

This metric helps organizations:
+ Track scheduled and unscheduled breaks.
+ Monitor training time.
+ Analyze agent productivity patterns.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current agent metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API identifier: `AGENTS_NON_PRODUCTIVE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: NPT
+ Historical metrics reports: Non-Productive Time
+ Dashboard: NPT agents

## Agent non-productive time


This metric measures the total time that agents spent in a custom status. That is, their CCP status is other than Available or Offline. This metric doesn't mean that the agent was spending their time unproductively.

**Metric type**: String (*hh:mm:ss*) 

**Metric category**: Agent activity driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_NON_PRODUCTIVE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Non-Productive Time

**Calculation logic**:
+ Check nonProductiveTime present and not empty.
+ Convert milliseconds to seconds (nonProductiveTime / 1000.0)
+ Return Non-productive time in seconds.

**Notes**:
+ This metric tracks time in custom status states.
+ It does not imply unproductive work.
+ Time is converted from milliseconds to seconds.
+ Agents can handle contacts while in custom status.
+ It returns null if non-productive time data is not present.
+ Data for this metric is available starting from December 29, 2023 0:00:00 GMT.

## Agent non-response


This metric counts the contacts routed to an agent but not answered by that agent, including contacts abandoned by the customer. 

If a contact is not answered by a given agent, Amazon Connect attempts to route it to another agent to handle; the contact is not dropped. Because a single contact can be missed multiple times (including by the same agent), it can be counted multiple times: once for each time it is routed to an agent but not answered.

**Metric type**: Integer

**Metric category**: Agent activity driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_MISSED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_NON_RESPONSE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Agent non-response
+ Historical metrics reports: Agent non-response
+ Scheduled reports and exported CSV files: Contact missed

**Calculation logic**:
+ Check agentNonResponse present and not empty.
+ Return agentNonResponse value or null if not present.

**Notes**:
+ This metric includes customer abandons that occur in the \$120 second span while the contact is being routed to an agent but not yet connected.
+ Use this metric to track missed contact opportunities.
+ It helps measure agent responsiveness.
+ It returns null if non-response data is not present.
+ Data for this metric is available starting from October 1, 2023 0:00:00 GMT.

## Agent non-response without customer abandons


This metric counts the voice contacts routed to an agent but not answered by that agent, excluding contacts abandoned by the customer. 

If a voice contact is not answered by a given agent, Amazon Connect attempts to route it to another agent to handle; the contact is not dropped. Because a single contact can be missed multiple times (including by the same agent), it can be counted multiple times: once for each time it is routed to an agent but not answered. 

This metric supports only voice contacts. For chat, task, and email contacts, use the **Agent non-response** metric.

**Metric type**: Integer

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_NON_RESPONSE_WITHOUT_CUSTOMER_ABANDONS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent non-response without customer abandons

**Calculation logic**:
+ Check agentNonResponseWithoutCustomerAbandons present.
+ Return value or null if not present.

**Notes**:
+ This metric excludes customer abandons.
+ It provides a more accurate measure of agent missed contacts.
+ It helps identify agent responsiveness issues.
+ It returns null if data is not present.
+ Data for this metric is available starting from October 1, 2023 0:00:00 GMT.

## Agent contact time


This metric measures the total time that an agent spent on a contact, including [Customer Hold Time](#customer-hold-time) and [After Contact Work Time](#after-contact-work-time). This does **not** include time spent on a contact while in a custom status or **Offline** status. (Custom status = the agent's CCP status is other than **Available** or **Offline**. For example, Training would be a custom status.)

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONTACT_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent on contact time

**Calculation logic**:
+ Check contactTime present.
+ Convert milliseconds to seconds (contactTime / 1000.0)
+ Return value or null if not present.

**Notes**:
+ If you want to include the time spent in a custom status and **Offline** status, see [Contact handle time](#contact-handle-time).
+ This metric includes total handling time for all contacts.
+ It includes hold time and after contact work time.
+ Time is converted from milliseconds to seconds.
+ It returns null if contact time data is not present.
+ Data for this metric is available starting from October 1, 2023 0:00:00 GMT.

## Agents count


This metric counts the number of agents logged into the CCP. 

This metric helps organizations monitor what agents are doing in the contact center.

An agent is defined as online when their CCP status is:
+ Routable
+ OR a custom CCP status

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current agent metric

**How to access using the Amazon Connect API**: Not available

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Agents count](queue-performance-dashboard.md#agent-status-drill-down)

## Agents on contact


This metric counts agents currently handling at least one contact. An agent is considered "on contact" when they are handling a contact that is either:
+ Connected
+ On hold
+ In After Contact Work (ACW) 
+ Paused
+ In outbound ring state

This metric helps organizations track agent utilization and workload distribution in real-time. Note that this metric accounts for concurrent contacts, that is, an agent who handles multiple contacts simultaneously is still counted as one "on contact" agent.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current Agent Metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData ](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData .html) API metric identifier: `AGENTS_ON_CONTACT`

  Legacy API Identifier: AGENTS\$1ON\$1CALL (still supported)

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: On contact
+ Historical metrics reports: Agents on contact
+ Dashboard: Active contacts

## Agent outbound connecting time


This metric measures the total time between when an outbound contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `SUM_CONNECTING_TIME_AGENT`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = OUTBOUND`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent outbound connecting time

## Agent talk time percent


This metric measures the talk time by an agent in a voice conversation as a percent of the total conversation duration. 

**Metric type**: Percent

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_TALK_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Agent talk time percent

**Calculation logic**:
+ Sum all the intervals in which an agent was engaged in conversation (talk time agent). 
+ Divide the sum by the total conversation duration. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## AI Handoffs


This metric measures the total count of contacts handled by [AI Agents](create-ai-agents.md) that escalated to human agents. This metric is specifically applicable to self-service use cases where AI agents initially handle customer inquiries.

**Metric type**: Integer

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_HANDOFFS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Active
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Active AI Agents

**Calculation logic**:
+ For each AI Agent record 
  + If aiAgentId is NOT present, then skip this record.
  + If aiAgentNameVersion is present, then return noncontroversial.
+ Return final\$1result = approximate unique count of aiAgentNameVersion values from matching records.

## AI Handoff Rate


This metric measures the percentage of contacts handled by [AI Agents](create-ai-agents.md) that had escalation to human agents or additional support. 

**Metric type**: Percent

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_HANDOFF_RATE`

**How to access using the Amazon Connect admin website:**
+ Dashboard [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Handoff Rate

**Calculation logic**:
+ Get total AI handoffs count.
+ Get total AI involved contacts count. 
+ Calculate percentage: (AI handoffs / AI involved contacts) \$1 100.0

## AI Agent Invocations


This metric measures the total count of [AI Agents](create-ai-agents.md) invocations across all AI-Agents per instance.

**Metric type**: Integer

**Metric category**: AI Agent

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_AGENT_INVOCATIONS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Agent Invocation Count

**Calculation logic**:
+ For each AI Agent record 
  + If aiAgentId is present, then count this record as 1.
  + Else, skip this record.
+ Return final\$1result = sum of the counts from matching records.

## AI Agent Invocation Success


This metric measures the number of [AI Agents](create-ai-agents.md) invocations that executed successfully without technical failures such as API errors, timeouts, or system issues. 

**Metric type**: Integer

**Metric category**: AI Agent

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_AGENT_INVOCATION_SUCCESS`

**Calculation logic**:

For each AI Agent record 
+ If aiAgentId is NOT present, then skip this record.
+  If invocationSuccess is present and equals true, then count this record as 1.
+ Else, count this record as 0.
+ Return final\$1result = sum of the counts from matching records.

## AI Agent Invocation Success Rate


This metric measures the percentage of [AI Agents](create-ai-agents.md) invocations that executed successfully without technical failures.

**Metric type**: Percent

**Metric category**: AI Agent

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_AGENT_INVOCATION_SUCCESS_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Agent Invocation Success Rate

**Calculation logic**:
+ Get total AI agent invocation success count.
+ Get total AI agent invocations count.
+ Calculate percentage: (AI agent invocation success / AI agent invocations) \$1 100.0

## AI Response Completion Rate


This metric measures the percentage of [AI sessions](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_CreateSession.html) that successfully responded to incoming customer requests.

This metric measures the total count of customer contacts where [AI Agents](create-ai-agents.md) were involved, either providing self-service automation or assisting human agents in resolving customer inquiries.

**Metric type**: Percent

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_RESPONSE_COMPLETION_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Response Completion Rate

  

**Calculation logic**:
+ Get weighted sum of AI completed responses calculated as agentInvocationCount \$1 agentResponseCompletionRate 
+ Get total AI session invocation sum calculated as sum of agentInvocationCount
+ Calculate percentage: (weighted sum of AI completed responses / AI session invocation sum) \$1 100.0

## AI Involved Contacts


This metric measures the total count of customer contacts where [AI Agents](create-ai-agents.md) were involved, either providing self-service automation or assisting human agents in resolving customer inquiries.

**Metric type**: Integer

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_INVOLVED_CONTACTS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Involved Contacts

**Calculation logic**:
+ For each AI session record 
  + If contactId is NOT present, then skip this record. 
  + If sessionId is NOT present, then skip this record. 
  + Else, count this record as 1. 
+ Return final\$1result = sum of the counts from matching records.

## AI Prompt Invocation Success


This metric measures the number of [AI Prompts](create-ai-prompts.md) invocations that executed successfully without errors.

**Metric type**: Integer

**Metric category**: AI Prompt

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_PROMPT_INVOCATION_SUCCESS`

**Calculation logic**:
+ For each AI Prompt record 
  + If aiPromptId is NOT present, then skip this record. 
  + If invocationSuccess is present and equals true, then count this record as 1.
  + Else, count this record as 0. 
+ Return final\$1result = sum of the counts from matching records.

## AI Prompt Invocation Success Rate


This metric measures the number of [AI Prompts](create-ai-prompts.md) invocations that executed successfully without errors.

**Metric type**: Percent

**Metric category**: AI Prompt

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_PROMPT_INVOCATION_SUCCESS_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Prompt Invocation Success Rate

**Calculation logic**:
+ Get total AI prompt invocation success count. 
+ Get total AI prompt invocations count. 
+ Calculate percentage: (AI prompt invocation success / AI prompt invocations) \$1 100.0

## AI Prompt Invocations


This metric measures the total count of [AI Prompts](create-ai-prompts.md) invocations.

**Metric type**: Integer

**Metric category**: AI Prompt

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_PROMPT_INVOCATIONS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Prompt Invocation Count

**Calculation logic**:
+ For each AI Prompt record 
  + If aiPromptId is present, then count this record as 1. 
  + Else, skip this record. 
+ Return final\$1result = sum of the counts from matching records.

## AI Tool Invocation Success


This metric measures the total count of [AI Tools](ai-agent-mcp-tools.md) invocations that executed successfuly.

**Metric type**: Integer

**Metric category**: AI Tool

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_TOOL_INVOCATION_SUCCESS`

**Calculation logic**:
+ For each AI Tool record 
  + If aiToolId is NOT present, then skip this record.
  + If invocationSuccess is present and equals true, then count this record as 1.
  + Else, count this record as 0.
+ Return final\$1result = sum of the counts from matching records.

## AI Tool Invocation Success Rate


This metric measures the percentage of [AI Tools](ai-agent-mcp-tools.md) invocations.

**Metric type**: Percent

**Metric category**: AI Tool

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_TOOL_INVOCATION_SUCCESS_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Tool Invocation Success Rate

**Calculation logic**:
+ Get total AI tool invocation success count. 
+ Get total AI tool invocations count. 
+ Calculate percentage: (AI tool invocation success / AI tool invocations) \$1 100.0

## AI Tool Invocations


This metric measures the percentage of [AI Tools](ai-agent-mcp-tools.md) invocations.

**Metric type**: Integer

**Metric category**: AI Tool

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AI_TOOL_INVOCATIONS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), AI Tool Invocation Count

**Calculation logic**:
+ For each AI Tool record 
  + If aiToolId is present, then count this record as 1.
  + Else, skip this record.
+ Return final\$1result = sum of the counts from matching records.

## Average AI Agent Conversation Turns


This metric measures the average number of conversation turns that [AI Agents](create-ai-agents.md) took to reach an outcome.

**Metric type**: Double

**Metric category**: AI Agent

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AI_AGENT_CONVERSATION_TURNS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Avg. AI agent conversation turns

**Calculation logic**:
+ For each AI Agent record 
  + If aiAgentId is NOT present, then skip this record. 
  + If conversationTurnsInResponse is present, then set result = conversationTurnsInResponse. 
  + Else, skip this record. 
+ Return final\$1result = average of the result values from matching records.

## Average AI Conversation Turns


This metric measures the average number of conversation turns across all AI involved contacts.

**Metric type**: Double

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AI_CONVERSATION_TURNS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Avg. AI Conversation Turns

**Calculation logic**:
+ For each AI session record 
  + If contactId is NOT present, then skip this record.
  + If sessionId is NOT present, then skip this record.
  + If avgConversationTurnsInResponse is present, then set result = avgConversationTurnsInResponse.
  + Else, skip this record. 
+ Return final\$1result = average of the result values from matching records.

## Average AI Prompt Invocation Latency


This metric measures the average invocation latency of [AI Prompts](create-ai-prompts.md) in milliseconds.

**Metric type**: Double

**Metric category**: AI Prompt

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AI_PROMPT_INVOCATION_LATENCY`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Avg. AI Prompt Invocation Latency

**Calculation logic**:
+ For each AI Prompt record 
  + If aiPromptId is NOT present, then skip this record.
  + If invocationLatency is present, then set result = invocationLatency.
  + Else, skip this record. 
+ Return final\$1result = average of the result values from matching records.

## Average AI Tool Invocation Latency


This metric measures the average invocation latency of [AI Tools](ai-agent-mcp-tools.md) in milliseconds.

**Metric type**: Double

**Metric category**: AI Prompt

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AI_TOOL_INVOCATION_LATENCY`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Avg. AI Tool Invocation Latency

**Calculation logic**:
+ For each AI Tool record 
  + If aiToolId is NOT present, then skip this record.
  + If invocationLatency is present, then set result = invocationLatency.
  + Else, skip this record. 
+ Return final\$1result = average of the result values from matching records.

## Knowledge Content References


This metric measures the count of knowledge content articles referenced by [AI Agents](create-ai-agents.md).

**Metric type**: Integer

**Metric category**: AI Knowledge Base

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `KNOWLEDGE_CONTENT_REFERENCES`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Knowledge Base Reference Count

**Calculation logic**:
+ For each KnowledgeBase record 
  + If knowledgeBaseId is present, then count this record as 1.
  + Else, skip this record. 
+ Return final\$1result = sum of the result values from matching records.

## Proactive Intents Answered


This metric measures the number of proactive intents (customer queries) that were successfully answered by [AI Agents](create-ai-agents.md) during AI sessions.

**Metric type**: Integer

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PROACTIVE_INTENTS_ANSWERED`

**Calculation logic**:
+ For each AI session record
  + If If contactId is NOT present, then skip this record.
  + If sessionId is NOT present, then skip this record.
  + If proactiveIntentsAnswered is present, then set result = proactiveIntentsAnswered.
  + Else, skip this record. 
+ Return final\$1result = sum of the result values from matching records.

## Proactive Intents Detected


This metric measures the number of proactive intents (customer queries) detected during AI sessions, particularly for Agent Assistance use cases.

**Metric type**: Integer

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PROACTIVE_INTENTS_DETECTED`

**Calculation logic**:
+ For each AI session record
  + If If contactId is NOT present, then skip this record.
  + If sessionId is NOT present, then skip this record.
  + If proactiveIntentsDetected is present, then set result = proactiveIntentsDetected.
  + Else, skip this record. 
+ Return final\$1result = sum of the result values from matching records.

## Proactive Intents Engaged


This metric measures the number of proactive intents (customer queries) detected during AI sessions, particularly for Agent Assistance use cases.

**Metric type**: Integer

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PROACTIVE_INTENTS_ENGAGED`

**Calculation logic**:
+ For each AI session record
  + If If contactId is NOT present, then skip this record.
  + If sessionId is NOT present, then skip this record.
  + If proactiveIntentsEngaged is present, then set result = proactiveIntentsEngaged.
  + Else, skip this record. 
+ Return final\$1result = sum of the result values from matching records.

## Proactive Intent Engagement Rate


This metric measures the percentage of detected proactive intents that were clicked or engaged with by human agents.

**Metric type**: Percent

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PROACTIVE_INTENT_ENGAGEMENT_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Proactive Intent Engagement Rate

**Calculation logic**:
+ Get total proactive intents engaged count.
+ Get total proactive intents detected count.
+ Calculate percentage: (proactive intents engaged / proactive intents detected) \$1 100.0

## Proactive Intent Response Rate


This metric measures the percentage of detected proactive intents that were clicked or engaged with by human agents.

**Metric type**: Percent

**Metric category**: AI Session

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PROACTIVE_INTENT_RESPONSE_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [AI Agent performance dashboard](ai-agent-performance-dashboard.md), Proactive Intent Engagement Rate

**Calculation logic**:
+ Get total proactive intents answered count.
+ Get total proactive intents engaged count.
+ Calculate percentage: (proactive intents answered / proactive intents engaged) \$1 100.0

## API contacts


This metric counts the contacts that were initiated using an Amazon Connect API operation, such as `StartOutboundVoiceContact`. This includes contacts that were not handled by an agent.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `CONTACTS_CREATED`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = API`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: API Contacts

**Calculation logic**:
+ For each contact record
  + If CONTACTS\$1CREATED with INITIATION\$1METHOD = API, then count this record.
+ Return final\$1result = sum of the counts from matching records.

## API contacts handled


This metric counts the contacts that were initiated using an Amazon Connect API operation, such as `StartOutboundVoiceContact`, and handled by an agent.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+  [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `API_CONTACTS_HANDLED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = API`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: API contacts handled
+ Historical metrics reports: API contacts handled

**Calculation logic**:
+ For each contact record
  + If CONTACTS\$1HANDLED with INITIATION\$1METHOD = API, then count this record.
+ Return final\$1result = sum of the counts from matching records.

## Automatic fails percent


This metric provides the percentage of performance evaluations with automatic fails. Evaluations for calibrations are excluded from this metric. 

If a question is marked as an automatic fail, then the parent section and the form is also marked as an automatic fail. 

**Metric type**: Percent

**Metric category**: Contact evaluation driven metric

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Agent performance evaluations dashboard](agent-performance-evaluation-dashboard.md)

**Calculation logic**:
+ Get total automatic fails count.
+ Get total evaluations performed.
+ Calculate percentage: (automatic fails / total evaluations) \$1 100.

**Notes**:
+ Automatic fail cascades up (question → section → form).
+ Excludes calibration evaluations.
+ Returns percentage value.
+ Requires at least one filter from: queues, routing profiles, agents, or user hierarchy groups.
+ Based on submitted evaluation timestamp.
+ Data for this metric is available starting from January 10, 2025 0:00:00 GMT.

## Availability


This metric shows the current number of slots that are available for each agent for routing new contacts. A slot is considered available when:
+ The agent is in Available status
+ The slot is not currently handling a contact
+ The agent's routing profile allows for that channel
+ The agent is not at their concurrent contact limit

A slot becomes unavailable when it contains a contact that is:
+ Connected
+ In ACW
+ Inbound/outbound ringing
+ Missed
+ In error state
+ On hold
+ Agent is in a custom status
+ Agent can't take contacts from that channel per routing profile

The number of available slots for an agent are based on their [routing profile](routing-profiles.md). For example, let's say an agent's routing profile specifies they can handle either one voice contact **or** up to three chat contacts simultaneously. If they are currently handling one chat, they have two available slots left, not three.

What causes this number to go down? A slot is considered unavailable when:
+ A contact in the slot is: connected to the agent, in After Contact Work, inbound ringing, outbound ringing, missed, or in an error state.
+ A contact in the slot is connected to the agent and on hold.

Amazon Connect doesn't count an agent's slots when:
+ The agent has set their status in the CCP to a custom status, such as Break or Training. Amazon Connect doesn't count these slots because agents can't take inbound contacts when they've set their status to a custom status. 
+ The agent can't take contacts from that channel per their routing profile. 

**Metric type**: COUNT
+ Min value: 0
+ Max value: MAX\$1AVAILABLE\$1SLOTS value

**Metric category**: Current Agent Metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `SLOTS_AVAILABLE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Availability
+ Dashboard: Available Capacity

## Available


This metric measures the number of agents who can take an inbound contact. An agent can only take inbound contacts when they manually set their status to Available in the CCP (or in some cases when their manager changes it).

This is different from how many more inbound contacts an agent could take. If you want to know how many more contacts an agent can have routed to them, look at the Availability metric. It indicates how many slots the agent has free.

What causes this number to go down? An agent is considered **unavailable** when: 
+ The agent has set their status in the CCP to a custom status, such as Break or Training. Amazon Connect doesn't count these slots because agents can't take inbound contacts when they've set their status to a custom status. 
+ The agent has at least one contact ongoing. 
+ The agent has a contact in a missed or error state, which prevents the agent from taking any more contacts until they are flipped back to routable. 

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `AGENTS_AVAILABLE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Available

## Average active time


This metric measures the average time an agent spends on a customer interaction, including Agent interaction time, Customer hold time, and After contact work (ACW) time. Average Active Time includes time spent handling contacts while in a custom status.

(Custom status = the agent's CCP status other than **Available** or **Offline**. For example, Training would be a custom status.)

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_ACTIVE_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Average active time
+ Historical metrics reports: Average active time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration > 0, then set agent\$1interaction = Agent.AgentInteractionDuration. 
  + If Agent.CustomerHoldDuration > 0, then set customer\$1hold = Agent.CustomerHoldDuration. 
  + If Agent.AfterContactWorkDuration > 0, then set after\$1contact\$1work = Agent.AfterContactWorkDuration. 
  + If all three variables (agent\$1interaction AND customer\$1hold AND after\$1contact\$1work )are null, then skip the record 
  + Else, set result = the sum of the non-null values of agent\$1interaction, customer\$1hold AND after\$1contact\$1work 
+ Return final\$1result = sum of all the result values / total number of matching contact records.

## Average after contact work time


This metric measures the average time that an agent spent doing After Contact Work (ACW) for contacts. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AFTER_CONTACT_WORK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg ACW
+ Historical metrics reports: Average after contact work time

**Calculation logic**:
+ For each contact record
  + If Agent.AfterContactWorkDuration is present, then set result = Agent.AfterContactWorkDuration.
  + Else, if Agent.ConnectedToAgentTimestamp (the contact was connected to an agent) is present, then set result = 0
  + Else, skip this record.
+ Return final\$1result = average of the result values across all contact records.
+ Return final\$1result = sum of all the result values / total number of contact records (excluding skipped records).

## Average agent API connecting time


This metric measures the average time between when a contact is initiated using an Amazon Connect API, and the agent is connected. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AGENT_CONNECTING_TIME`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `API`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg API connecting time
+ Historical metrics reports: Average agent API connecting time

## Average agent callback connecting time


This metric measures the average time between when a callback contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AGENT_CONNECTING_TIME`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `CALLBACK`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg callback connecting time
+ Historical metrics reports: Average agent callback connecting time
+ Dashboard: Avg. agent connecting time - agent first callback

**Calculation logic**:
+ The following image shows the five parts that go into calculating this metric: Amazon Connect assign work item to agent, agent accepts work item, connection build time, network connection time, rings for customer. It also shows what is in the agent event stream: Connecting, Connected or no answer.  
![\[The five parts used to calculate average callback connecting time.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/metrics-agent-callback-connection-time.png)

## Average agent first response time


This metric measures the average time (in seconds) taken by an agent to respond after obtaining a chat contact. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_FIRST_RESPONSE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. agent first response time

**Calculation logic**:
+ For every contact record:
  + If `ChatMetrics.ContactMetrics.AgentFirstResponseTimeInMillis` is absent, skip the contact record
  + Else set result = `ChatMetrics.ContactMetrics.AgentFirstResponseTimeInMillis`
+ Final\$1result = average of result across all contacts not skipped
+ Further divide the result by 1000.0 to convert milliseconds to seconds

## Average agent greeting time


This metric provides the average first response time of agents on chat, indicating how quickly they engage with customers after joining the chat. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_GREETING_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average agent greeting time

**Calculation logic**:
+ This metric is calculated by dividing the total time it takes for an agent to initiate their first response by the number of chat contacts. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average agent incoming connecting time


This metric measures the average time between when contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected. This is the ring time for configurations where the agent is not set to auto-answer.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AGENT_CONNECTING_TIME`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `INBOUND`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg incoming connecting time
+ Historical metrics reports: Average agent incoming connecting time

**Calculation logic**:
+ In the agent event stream, this time is calculated by averaging the duration between the contact state of STATE\$1CHANGE event changes from CONNECTING to CONNECTED/MISSED/ERROR. 

  The following image shows the three parts that go into calculating this metric: connection build time, network connection time, and requesting agent to accept. It also shows what is in the agent event stream: Connecting, Connected, Missed, or Rejected.  
![\[The three parts used to calculate average incoming connecting time.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/metrics-agent-inbound-connection-time.png)

## Average agent interaction and customer hold time


This metric measures the average time an agent spends on a customer interaction, including Agent interaction time and Customer hold time. It applies to both inbound and outbound calls.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `INTERACTION_AND_HOLD_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_INTERACTION_AND_HOLD_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg interaction and hold time
+ Historical metrics reports: Average agent interaction and customer hold time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is present, then set agent\$1interaction = Agent.AgentInteractionDuration.
  + If Agent.CustomerHoldDuration is present, then set customer\$1hold = Agent.CustomerHoldDuration.
  + If agent\$1interaction AND customer\$1hold ARE null, then skip this record.
  + Else, set result = (agent\$1interaction \$1 customer\$1hold).
+ Return final\$1result = sum of all the result values / total number of contact records (excluding skipped records).

## Average agent interaction time


This metric measures the average time that agents interacted with customers during inbound and outbound contacts. This does not include [Customer Hold Time](#customer-hold-time), [After Contact Work Time](#after-contact-work-time), or agent pause duration.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `INTERACTION_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_INTERACTION_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg interaction time
+ Historical metrics reports: Average agent interaction time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If Agent.AgentInteractionDuration is present, then set result = Agent.AgentInteractionDuration.
+ Return final\$1result = sum of all the result values / total number of contact records (excluding skipped records).

## Average agent interruptions


This metric quantifies the average frequency of agent interruptions during customer interactions. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_INTERRUPTIONS_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average agent interruptions

**Calculation logic**:
+ This metric is calculated by dividing the total number of agent interruptions by the total number of contacts.

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average agent interruption time


This metric measures the average of total agent interruption time while talking to a contact. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_INTERRUPTION_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average agent interruption time

**Calculation logic**:
+ Sum the interruption intervals within each conversation.
+ Divide the sum the number of conversations that experienced at least one interruption. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average agent message length


This metric measures the average length (in characters) of messages sent by agents. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGE_LENGTH_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. agent message length

**Calculation logic**:
+ For every contact record:
  + If either `ChatMetrics.AgentMetrics.MessageLengthInChars` or `ChatMetrics.AgentMetrics.MessagesSent` are null or not present skip the contact record
  + If present then:
    + set messageLengthInCharsResult = `ChatMetrics.AgentMetrics.MessageLengthInChars`
    + set messagesSentResult = `ChatMetrics.AgentMetrics.MessagesSent`
+ The final result = division of (sum of messageLengthInCharsResult) / (sum of messagesSentResult)

## Average agent messages


This metric measures the average number of messages sent by agent across contacts. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGES_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. agent messages

**Calculation logic**:
+ For every contact record:
  + If `ChatMetrics.AgentMetrics.MessagesSent` attribute is not present skip the contact record
  + If present, set result = `ChatMetrics.AgentMetrics.MessagesSent`
+ The final result = average of the result across all the contacts not skipped

## Average agent outbound connecting time


This metric measures the average time between when an outbound contact is initiated by Amazon Connect reserving the agent for the contact, and the agent is connected. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `AVG_AGENT_CONNECTING_TIME`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = OUTBOUND`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg outbound connecting time
+ Historical metrics reports: Average agent outbound connecting time

**Calculation logic**:
+ The following image shows the four parts that go into calculating this metric: agent call customer, connection build time, network connection time, rings for customer. It also shows what is in the agent event stream: Connecting, Connected or No answer.  
![\[The four parts used to calculate average outbound connecting time.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/metrics-agent-outbound-connection-time.png)

## Average agent pause time


This metric calculates the average time that an agent paused a contact after the contact was connected to the agent during inbound and outbound contacts. 

It provides insight into how much time, on average, agents spend pausing contacts, which could be an indicator of agent efficiency or the complexity of the contacts they handle. A higher average pause time could suggest that agents may need additional training or support to handle contacts more efficiently.

 This metric applies only to tasks. For other channels, you'll notice a value of 0 on the report for them.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AGENT_PAUSE_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Average agent pause time
+ Historical metrics reports: Average agent pause time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentPauseDuration > 0, then set result = Agent.AgentPauseDuration. 
  + Else, skip the record.
+ Return final\$1result = sum of all the result values / total number of matching contact records.

## Average agent response time


This metric measures the average time (in seconds) taken by agents to respond to customer messages. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_RESPONSE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. agent response time

**Calculation logic**:
+ For every contact record:
  + If `ChatMetrics.AgentMetrics.TotalResponseTimeInMillis` or `ChatMetrics.AgentMetrics.NumResponses` is missing skip the contact record
  + If present,
    + set totalResponseTimeInMillisResult = `ChatMetrics.AgentMetrics.TotalResponseTimeInMillis`
    + set numResponsesResult = `ChatMetrics.AgentMetrics.NumResponses`
+ Final\$1result = divide (sum of totalResponseTimeInMillisResult) / (sum of numResponsesResult)
+ Further divide the result by 1000.0 to convert milliseconds to seconds

## Average agent talk time


This metric measures the average time that was spent talking in a conversation by an agent. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_TALK_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average agent talk time

**Calculation logic**:
+ Sum the durations of all intervals during which the agent was speaking. 
+ Divide the sum by the total number of contacts. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average bot conversation time


This metric measures the average duration of completed conversations for which the invoking resource (flow or flow module) started between the specified start and end time. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_BOT_CONVERSATION_TIME`

   It can be filtered on specific conversation outcomes with `BOT_CONVERSATION_OUTCOME_TYPE` metric level filter.

**Calculation logic**:
+ Sum(Conversation Start Time - Conversation End Time of all filtered conversations) / (Count of all filtered conversations)

**Notes**:
+ Data for this metric is available starting from December 2, 2024 00:00:00 GMT.

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Average bot conversation turns


This metric provides the average number of turns for completed conversations for which the invoking resource (flow or flow module) started between the specified start and end time. 

A single turn is a request from the client application and a response from the bot.

**Metric type**: Double

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_BOT_CONVERSATION_TURNS`

   It can be filtered on specific conversation outcomes with `BOT_CONVERSATION_OUTCOME_TYPE` metric level filter.

**Calculation logic**:
+ Sum(Conversation Turn of all filtered conversations) / (Count of all filtered conversations)

**Notes**:
+ Data for this metric is available starting from December 2, 2024 00:00:00 GMT.

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Average bot messages


This metric measures the average number of messages sent by bots across contacts. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGES_BOT`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. bot messages

**Calculation logic**:
+ For each contact record
  + If `ChatMetrics.ContactMetrics.TotalBotMessages` is absent, skip the contact record
  + If present, set result = `ChatMetrics.ContactMetrics.TotalBotMessages`
+ final\$1result = average of result across all contact ids not skipped

## Average case resolution time


This metric measures the average amount of time spent to resolve a case during the provided time interval. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CASE_RESOLUTION_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average Case Resolution Time

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Average contact duration


This metric measures the average time a contact spends from the contact initiation timestamp to disconnect timestamp. For information about a contact, see [ContactTraceRecord](ctr-data-model.md#ctr-ContactTraceRecord).

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CONTACT_DURATION`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average contact duration

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.InitiationTimestamp is present, then
    + set result = ContactTraceRecord.DisconnectTimestamp - ContactTraceRecord.InitiationTimestamp.
  + Else, skip this record.
+ Return final\$1result = sum of all the result values / total number of contact records (excluding skipped records).

## Average contacts per case


This metric measures the average number of contacts (calls, chat, tasks, and email) for cases created during the provided time interval.

**Metric type**: String

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CASE_RELATED_CONTACTS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average Case Related Contacts

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Average conversation close time


This metric measures the average time elapsed (in seconds) since last customer message before the contact is disconnected. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CONVERSATION_CLOSE_TIME`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. conversation close time

**Calculation logic**:
+ For each contact record calculate:
  + If `ChatMetrics.ContactMetrics.ConversationCloseTimeInMillis` attribute is not present, skip the record
  + If present, set result = `ChatMetrics.ContactMetrics.ConversationCloseTimeInMillis`
+ Return final\$1result = average of the result values across all contact records not skipped

## Average conversation duration


This metric measures the average conversation duration of voice contacts with agents.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_CONVERSATION_DURATION`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average conversation duration

**Calculation logic**:
+ This metric is calculated by the total time from the start of the conversation until the last word spoken by either the agent or the customer.
+ This value is then divided by the total number of contacts to provide an average representation of the conversation time spent on the call. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average customer hold time


This metric measures the average time that customers spent on hold after being connected to an agent. This includes time spent on a hold when being transferred, but does not include time spent in a queue. This metric doesn't apply to tasks so you'll notice a value of 0 on the report for them.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `AVG_HOLD_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_HOLD_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg hold time
+ Historical metrics reports: Average customer hold time

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If Agent.CustomerHoldDuration is NOT present, then skip this record. 
  + If Agent.CustomerHoldDuration is present, then set result = Agent.CustomerHoldDuration.
  + Else, if Agent.NumberOfHolds is present, then set result = 0. 
  + Else, all above conditions checked and nothing added to final result, then skip this record.
  +  
+ Return final\$1result = sum of all the result values / total number of contact records (excluding skipped records.

## Average customer hold time all contacts


This metric measures the average hold time for all contacts handled by an agent. The calculation includes contacts that were never put on hold.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_HOLD_TIME_ALL_CONTACTS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average customer hold time all contacts

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If Agent.CustomerHoldDuration is NOT present, then skip this record. 
  + If Agent.CustomerHoldDuration is present, then set result = Agent.CustomerHoldDuration. 
  + If Agent.NumberOfHolds is present, then set result = 0. 
  + Else, all above conditions checked and nothing added to final result, then skip this record. 
+ Return final\$1result = sum of all the result values / total number of all contact records (excluding skipped records).

## Average customer message length


This metric measures the average length (in characters) of messages sent by customers. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGE_LENGTH_CUSTOMER`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. customer first response time

**Calculation logic**:
+ For every contact record:
  + If either `ChatMetrics.CustomerMetrics.MessageLengthInChars` or `ChatMetrics.CustomerMetrics.MessagesSent` attributes are not present skip the record
  + If present, then:
    + set messageLengthInCharsResult = `ChatMetrics.CustomerMetrics.MessageLengthInChars`
    + set messagesSentResult = `ChatMetrics.CustomerMetrics.MessagesSent`
+ For the final result, divide (sum of messageLengthInCharsSum across all contact) / (sum of messagesSentSum across all contact)

## Average customer messages


This metric measures the average number of messages sent by customers in a contact. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGES_CUSTOMER`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. customer messages

**Calculation logic**:
+ From each contact record:
  + If `ChatMetrics.CustomerMetrics.MessagesSent` attribute is not present skip the record
  + If present, set result = `ChatMetrics.CustomerMetrics.MessagesSent` attribute value
+ Return final\$1result = average of the result values across all contact records not skipped

## Average customer response time


This metric measures the average time (in seconds) from an agent's first message in a turn until the customer responds, even if the agent sends multiple messages before receiving a customer reply. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_RESPONSE_TIME_CUSTOMER`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. customer response time

**Calculation logic**:
+ For every contact record:
  + If `ChatMetrics.CustomerMetrics.TotalResponseTimeInMillis` or `ChatMetrics.CustomerMetrics.NumResponses` attributes are not present skip the record
  + If present,
    + set totalResponseTimeInMillisResult = `ChatMetrics.CustomerMetrics.TotalResponseTimeInMillis`
    + set numResponsesResult = `ChatMetrics.CustomerMetrics.NumResponses`
+ For the final result, divide (sum of totalResponseTimeInMillisResult) / (sum of numResponsesResult)
+ Further divide the result by 1000.0 (to convert milliseconds to seconds)

## Average customer talk time


This metric measures the average time that was spent talking in a conversation by a customer. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_TALK_TIME_CUSTOMER`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average customer talk time

**Calculation logic**:
+ Sum the durations of all intervals during which the customer was speaking. 
+ Divide the sum by the total number of contacts. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average dials per minute


This metric measures the average number of outbound campaign dials per minute for the specified start time and end time.

**Metric type**: Double

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_DIALS_PER_MINUTE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Avg. dials per minute

**Notes**:
+ This metric is available only for outbound campaigns that use the agent assisted voice and automated voice delivery modes.
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Average evaluation score


This metric provides the average evaluation score for all submitted evaluations. Evaluations for calibrations are excluded from this metric.

The average evaluation score corresponds to the grouping. For example, if the grouping contains evaluation questions, then the average evaluation score is provided for the questions. If the grouping does not contain evaluation form, section or question, then the average evaluation score is at an evaluation form level.

**Metric type**: Percent

**Metric category**: Contact evaluation driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_EVALUATION_SCORE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Agent performance evaluations dashboard](agent-performance-evaluation-dashboard.md)

**Calculation logic**:
+ Get sum of of evaluation scores: forms \$1 sections \$1 questions.
+ Get total number of evaluations where scoring has been completed and recorded.
+ Calculate average score: (sum of scores) / (total evaluations).

**Notes**:
+ Excludes calibration evaluations. 
+ Score granularity depends on grouping level. 
+ Returns percentage value. 
+ Requires at least one filter from: queues, routing profiles, agents, or user hierarchy groups. 
+ Based on submitted evaluation timestamp. 
+ Data for this metric is available starting from January 10, 2025 0:00:00 GMT.

## Average flow time


This metric measures the average duration of flow for the specified start time and end time.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `AVG_FLOW_TIME`

**Calculation logic**:
+ Check flow\$1endTimestamp present?
+ Calculate duration in milliseconds (end time - start time)
+ Convert to seconds (duration / 1000.0)

**Notes**:
+ Uses `AVG` statistic for aggregation.
+ Time is converted from milliseconds to seconds.
+ Only includes flows with valid end timestamps.
+ Returns null if end timestamp is not present.
+ Duration is calculated from flow start to end time.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.

## Average handle time


This metric measures the average time, from start to finish, that a contact is connected with an agent (average handle time). It includes talk time, hold time, After Contact Work (ACW) time, and agent pause duration (which applies only to tasks). It applies to both inbound and outbound calls.

It is a crucial metric for understanding agent efficiency and productivity, as well as identifying opportunities for process improvements and training.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `HANDLE_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_HANDLE_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: AHT
+ Historical metrics reports: Average handle time
+ Dashboard: AHT

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is present, then set agent\$1interaction = Agent.AgentInteractionDuration. 
  + If Agent.CustomerHoldDuration is present, then set customer\$1hold = Agent.CustomerHoldDuration. 
  + If Agent.AfterContactWorkDuration is present, then set after\$1contact\$1work = Agent.AfterContactWorkDuration. 
  + If Agent.AgentPauseDuration is present, then set agent\$1pause = Agent.AgentPauseDuration. If all fields ARE null, then skip this record 
  + Else, set result = sum of agent\$1interaction, customer\$1hold, after\$1contact\$1work and agent\$1pause. 
+ Return final\$1result = sum of all the result values / total number of all contact records (excluding skipped records).

## Average holds


This metric measures the average number of times voice contacts were put on hold while interacting with an agent. 

It provides insights into how often agents need to put customers on hold during interactions, which can be an indicator of agent efficiency, customer experience, and potentially highlight areas for improvement in agent training or process optimization.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_HOLDS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average holds

**Calculation logic**:
+ For each contact record
  + If Agent.NumberOfHolds is present, then set result = Agent.NumberOfHolds.
  + Else, set result = 0.
+ Return final\$1result = sum of all the result values / total number of all contact records (excluding skipped records).

## Average messages


This metric measures the average number of messages exchanged per contact. It only supports filtering and grouping by channel = CHAT.

**Metric type**: Double
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_MESSAGES`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. messages

**Calculation logic**:
+ For each contact record
  + If `ChatMetrics.ContactMetrics.TotalMessages` is not present, then skip the contact record.
  + If present, set result = `ChatMetrics.ContactMetrics.TotalMessages` attribute value. 
+ For the final result, average of the result values across all contact records not skipped.

## Average non-talk time


This metric provides the average of 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. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_NON_TALK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average non-talk time

**Calculation logic**:
+ Sum all the intervals in which both participants remained silent.
+ Divide the sum by the number of contacts. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average outbound after contact work time


This metric measures the average time that agents spent doing After Contact Work (ACW) for an outbound contact. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_AFTER_CONTACT_WORK_TIME`

  This metric can be retrieved with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = OUTBOUND

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average outbound after contact work time

**Calculation logic**:
+ Average after contact work time where INITIATION\$1METHOD = OUTBOUND.

## Average outbound agent interaction time


This metric measures the average time that agents spent interacting with a customer during an outbound contact. This does not include After Contact Work Time, Customer Hold Time, Custom status time, or agent pause duration (which applies only to tasks).

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API: `AVG_INTERACTION_TIME`

  This metric can be retrieved by using a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey = INITIATION_METHOD`
  + `MetricFilterValues = OUTBOUND`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average outbound agent interaction time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If Agent.AgentInteractionDuration is present, then set result = Agent.AgentInteractionDuration.
+ Return final\$1result = average of the result values across all outbound contact records.

## Average queue abandon time


This metric measures the average time that contacts waited in the queue before being abandoned. 

A contact is considered abandoned if it was removed from a queue but not answered by an agent or queued for callback.

**Average queue abandon time** provides insights into the customer experience by measuring how long customers wait in the queue before abandoning the call. A high average abandon time may indicate inefficient queue management or insufficient staffing, leading to poor customer satisfaction.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `ABANDON_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_ABANDON_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg abandon time
+ Historical metrics reports: Average queue abandon time

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is present, then skip this record.
  + If NextContactId is present, then skip this record
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND ContactTraceRecord.TransferCompletedTimestamp is present), then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND TransferCompletedTimestamp is present), then skip this record.
  + Else, set result = QueueInfo.Duration .
+ Return final\$1result = average of the result values across all contact records.

## Average queue abandon time - customer first callback


This metric measures the average time that callback contacts, who were called for their first callback, waited in the queue before abandoning the call. A contact is considered abandoned if it was removed from a queue but not answered by an agent.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_ABANDON_TIME`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. queue abandon time - customer first callback

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is present, then skip this record.
  + If NextContactId is present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND ContactTraceRecord.TransferCompletedTimestamp is present), then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND TransferCompletedTimestamp is present), then skip this record.
  + Else, set result = QueueInfo.Duration.
+ Return final\$1result = average of the result values across all contact records.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Average queue answer time


This metric measures the average time that contacts waited in the queue before being answered by an agent. In some businesses, this is also known as average speed of answer (ASA).

**Average queue answer time** also includes the time during the agent and customer whisper, because the contact remains in queue until the whisper is completed. 

This metric helps gauge the customer's waiting experience and is a key indicator of service quality. A lower **Average queue answer time** generally means better a customer experience.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `QUEUE_ANSWER_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_QUEUE_ANSWER_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Avg queue answer time
+ Historical metrics reports: Average queue answer time

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + Else, set result = QueueInfo.Duration.
+ Return final\$1result = average of the result values across all contact records.

## Average queue answer time - customer first callback


This metric measures the average time that callback contacts were queued for their first callback before being answered by an agent.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_QUEUE_ANSWER_TIME_CUSTOMER_FIRST_CALLBACK`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. queue answer time - customer first callback

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If ContactTraceRecord.CallbackTotalQueueDurationMillis is NOT present, then skip this record.
  + Else, set result = ContactTraceRecord.CallbackTotalQueueDurationMillis / 1000.
+ Return final\$1result = average of the result values across all contact records.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Average queue answer time (enqueue timestamp)


 This metric measures the average time that contacts waited in the queue before being answered by an agent. In some businesses, this is also known as average speed of answer (ASA).

Average queue answer time (enqueue timestamp) is aggregated on the ENQUEUE timestamp. 

Average queue answer time also includes the time during the agent whisper because the contact remains in queue until the agent whisper is completed. This is the average of Duration (from the contact record).

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `QUEUE_ANSWER_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_QUEUE_ANSWER_TIME`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Intraday forecast performance dashboard](intraday-forecast-performance-dashboard.md)

## Average resolution time


This metric measures the average time, beginning from the time a contact was initiated to the time it resolved. The resolution time for a contact is defined as: beginning from InitiationTimestamp, and ending at AfterContactWorkEndTimestamp or DisconnectTimestamp,, whichever one is later. 

**Average resolution time** measures the average time it takes to resolve a contact, from the time it was initiated to the time it was resolved. This metric provides insight into the efficiency of your contact center in resolving customer issues and helps identify areas where the resolution process can be improved. A lower **Average resolution time** indicates faster resolution of contacts, leading to better customer satisfaction.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_RESOLUTION_TIME `

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Average resolution time
+ Historical metrics reports: Average resolution time

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.InitiationTimestamp is NOT present, then skip this record.
  + If Agent.AfterContactWorkEndTimestamp is present AND Agent.AfterContactWorkEndTimestamp > DisconnectTimestamp, then
    + set end\$1time = Agent.AfterContactWorkEndTimestamp.
  + Else, set end\$1time = DisconnectTimestamp.
  + set diff\$1value = end\$1time - InitiationTimestamp
  + If diff\$1value > 0, then set result = diff\$1value.
  + Else, set result = 0.
+ Return final\$1result = average of the result values across all contact records.

## Average speed of answer - customer first callback dialed


This metric measures the average time that callback contacts, who were called for their first callback, waited in the queue before their call was answered by an agent. This also includes the time during the agent and customer whisper, because the contact remains in queue until the whisper is completed.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_QUEUE_ANSWER_TIME`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. speed of answer - customer first callback dialed

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + Else, set result = QueueInfo.Duration.
+ Return final\$1result = average of the result values across all contact records.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Average talk time


This metric measures the average time that was spent talking during a voice contact across either the customer or the agent. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_TALK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Average talk time

**Calculation logic**:
+ Sum all the intervals in which either an agent, a customer, or both were engaged in conversation.
+ Divide the sum by the total number of contacts. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Average Test Case Execution Duration


The max duration of test runs that successfully started and completed.

**Metric type**: Double

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API.

**Calculation logic**: 
+ If executionStartTime and executionEndTime are present and executionEndTime > 0 and executionEndTime > executionStartTime then return (executionEndTime-executionStartTime)/1000

## Average wait time after customer connection - customer first callback


This metric measures the average duration of customer's total wait time to be connected to an agent after they answer their first callback.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_WAIT_TIME_AFTER_CUSTOMER_FIRST_CALLBACK_CONNECTION`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Avg. wait time after customer connection - customer first callback

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.AnsweringMachineDetectionStatus is NOT present or ContactTraceRecord.AnsweringMachineDetectionStatus is NOT answered by a human, then skip this record.
  + If ContactTraceRecord.GreetingEndTimestamp is NOT present, then skip this record.
  + If ContactTraceRecord.InitiationMethod is NOT present or ContactTraceRecord.InitiationMethod is NOT CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is NOT present, then set the record's wait time to the contact record's (ContactTraceRecord.DisconnectTimestamp - ContactTraceRecord.GreetingEndTimestamp)/1000.
  + Else, set the record's wait time to (Agent.ConnectedToAgentTimestamp - ContactTraceRecord.GreetingEndTimestamp) / 1000.
+ Return final\$1result = average record wait time across all contact records.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Average wait time after customer connection


This metric measures the average duration of total wait time by the customer after they answer the outbound call through the Amazon Connect dialer. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_WAIT_TIME_AFTER_CUSTOMER_CONNECTION`

**Notes**:
+ This metric is available only for outbound campaigns that use the agent assisted voice and automated voice delivery modes.
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Average weighted evaluation score


This metric provides the average weighted evaluation score for all submitted evaluations. Evaluations for calibrations are excluded from this metric.

The weights are per the evaluation form version that was used to perform the evaluation. 

 The average evaluation score corresponds to the grouping. For example, if the grouping contains evaluation questions, then the average evaluation score is provided for the questions. If the grouping does not contain evaluation form, section or question, then the average evaluation score is at an evaluation form level. 

**Metric type**: Percent

**Metric category**: Contact evaluation driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AVG_WEIGHTED_EVALUATION_SCORE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Agent performance evaluations dashboard](agent-performance-evaluation-dashboard.md)

**Calculation logic**:
+ Get sum of weighted scores using form version weights.
+ Get total number of evaluations where scoring has been completed and recorded.
+ Calculate weighted average: (sum of weighted scores) / (total evaluations).

**Notes**:
+ Uses evaluation form version-specific weights. 
+ Excludes calibration evaluations. 
+ Score granularity depends on grouping level. 
+ Returns percentage value. 
+ Requires at least one filter from: queues, routing profiles, agents, or user hierarchy groups. 
+ Based on submitted evaluation timestamp. 
+ Data for this metric is available starting from January 10, 2025 0:00:00 GMT.

## Bot conversations completed


This metric provides the count of completed conversations for which the invoking resource (flow or flow module) started between the specified start and end time. The conversation end time can be beyond the specified end time. 

For example, if you request this metric with start time at 9 AM and end time at 10 AM, the result includes conversations where the invoking resource (flow or flow module):
+ started at 9:15 AM and ended at 9:40 AM
+ started at 9:50 AM and ended at 10:10 AM

but will exclude conversations for which the invoking resource (flow or flow module):
+ started at 8:50 AM and ended at 9:10 AM

**Metric type**: Integer

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `BOT_CONVERSATIONS_COMPLETED`

  It can be filtered on the following conversation outcomes using metric level filter `BOT_CONVERSATION_OUTCOME_TYPE`.
  + SUCCESS: The final intent in the conversation is categorized as *success*.
  + FAILED: The final intent in the conversation is failed. The conversation is also failed if Amazon Lex V2 defaults to the `AMAZON.FallbackIntent`.
  + DROPPED: The customer does not respond before the conversation is categorized as *success* or *failed*.

**Calculation logic**:
+ Total count of conversations.

**Notes**:
+ Data for this metric is available starting from December 2, 2024 00:00:00 GMT.

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Bot intents completed


This metric provides the count of completed intents. It includes intents for completed conversations where the invoking resource (flow or flow module) started between the specified start and end time.

**Metric type**: Integer

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `BOT_INTENTS_COMPLETED`

  It can be filtered on the following conversation outcomes using metric level filter `BOT_CONVERSATION_OUTCOME_TYPE`.

  It can be filtered on the following intent outcomes using metric level filter `BOT_INTENTS_OUTCOME_TYPE`.
  + SUCCESS: The bot successfully fulfilled the intent. One of the following situations is true:
    + The intent *state* is *ReadyForFulfillment* and the type of *dialogAction* is *Close*.
    + The intent `state` is `Fulfilled` and the type of `dialogAction` is `Close`.
  + FAILED: The bot failed to fulfill the intent. The intent state. One of the following situations is true:
    + The intent `state` is `Failed` and the `type` of `dialogAction` is `Close` (for example, the user declined the confirmation prompt).
    + The bot switches to the `AMAZON.FallbackIntent` before the intent is completed.
  + SWITCHED: The bot recognizes a different intent and switches to that intent instead, before the original intent is categorized as a *success* or *failed*.
  + DROPPED: The customer does not respond before the intent is categorized as *success* or *failed*.

**Calculation logic**:
+ Total count of intents.

**Notes**:
+ Data for this metric is available starting from December 2, 2024 00:00:00 GMT.

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Callback attempts


This metric represents the number of contacts where a callback was attempted, but the customer did not answer the call.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_RETRY_CALLBACK_ATTEMPTS`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Callback attempts
+ Historical metrics reports: Callback attempts
+ Dashboard: Callback attempts

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.InitiationMethod is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp, then skip this record.
  + If ContactTraceRecord.InitiationMethod == "CALLBACK", then skip this record.
  + If ContactTraceRecord.NextContactId is NOT present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND ContactTraceRecord.TransferCompletedTimestamp is present), then skip this record.
  + If all above conditions checked, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

## Callback attempts - customer first callback


This metric represents the number of contacts where a callback was dialed for the first time, but the customer did not answer the call.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Callback attempts - customer first callback

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.InitiationMethod is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp, then skip this record.
  + If ContactTraceRecord.InitiationMethod == "CALLBACK", then skip this record.
  + If ContactTraceRecord.NextContactId is NOT present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND ContactTraceRecord.TransferCompletedTimestamp is present), then skip this record.
  + If all above conditions checked, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Callback contacts


 This metric represents the count of contacts that were initiated from a queued callback.

**Metric type**: Integer 

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Callback contacts

## Callback contacts handled


This metric counts the contacts that were initiated from a queued callback and handled by an agent.

**Metric type**: Integer 

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CALLBACK_CONTACTS_HANDLED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`

  This metric can be retrieved by using `CONTACTS_HANDLED` with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `CALLBACK`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Callback contacts handled
+ Historical metrics reports: Callback contacts handled
+ Dashboard: Contacts handled - agent first callback

## Campaign contacts abandoned after X


This metric counts the outbound campaign calls that were connected to a live customer but did not get connected to an agent within X seconds. The possible values for X are from 1 to 604800 inclusive. This metric is only available with answering machine detection enabled. For more information about answering machine detection, see [Best practices for answering machine detection](campaign-best-practices.md#machine-detection). 

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_CONTACTS_ABANDONED_AFTER_X`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Campaign contacts abandoned after x seconds rate

**Notes**:
+ This metric is available only for outbound campaigns using the agent assisted voice and automated voice delivery modes.
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Campaign contacts abandoned after X rate


This metric measures the percentage of outbound campaign calls that were connected to a live customer but did not get connected to an agent within X seconds divided by the count of contacts connected to a live customer in an outbound campaign. The possible values for X are from 1 to 604800 inclusive. 

**Metric type**: Percent
+ Min value: 0.00%
+ Min value: 100.00%

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_CONTACTS_ABANDONED_AFTER_X_RATE`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Campaign contacts abandoned rate

**Notes**:
+ This metric is only available with answering machine detection enabled. For more information about answering machine detection, see [Best practices for answering machine detection](campaign-best-practices.md#machine-detection). This metric is available only for outbound campaigns using the agent assisted voice and automated voice delivery modes.
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Campaign interactions


This metric counts the outbound campaign interactions after a successful delivery attempt. Example interactions include `Open`, `Click`, and `Compliant`. 

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_INTERACTIONS`
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md) 

**Notes**:
+ This metric is available only for outbound campaigns that use the email delivery mode. 
+ Data for this metric is available starting from November 6, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Campaign progress rate


This metric measures the percentage of outbound campaign recipients attempted for delivery, out of the total number of recipients targeted. This is calculated as: (Recipients attempted / Recipients targeted) \$1 100.

**Metric type**: Percent
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_PROGRESS_RATE`
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md) 

**Notes**:
+ This metric is only available for outbound campaigns initiated using a customer segment. It is not available for event triggered campaigns.
+ Data for this metric is available starting from April 30, 2025 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Campaign send attempts


This metric counts the outbound campaign send requests sent by Amazon Connect for delivery. A campaign send request represents a send attempt made to reach out to an recipient using email, SMS, or telephony delivery mode. 

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_SEND_ATTEMPTS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Send attempts

**Notes**:
+ Data for this metric is available starting from November 6, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Campaign send exclusions


This metric measures the count of outbound campaign send attempts that were excluded from the targeted segment during a campaign execution. Example exclusion reasons: MISSING\$1TIMEZONE, MISSING\$1CHANNEL

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CAMPAIGN_SEND_EXCLUSIONS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Campaign send exclusions

**Notes**:
+ For more details on the exclusion reasons, see campaign\$1event\$1type under [Outbound Campaign Events](https://docs.aws.amazon.com/connect/latest/adminguide/data-lake.html#campaign-events) in the Data Lake documentation.
+ Data for this metric is available starting from April 30, 2025 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Capacity


This column heading appears on Real-time metrics reports. It's not a metric exactly, but a indicator of the agent's capacity.

Displays the maximum capacity that's set in the routing profile currently assigned to the agent. This column can be filtered by channel. 

If an agent's routing profile is configured to handle either one voice **or** up to three chats, then their maximum capacity equals three, when not filtered by channel.

## Cases created


This metric counts all the cases created.

**Metric type**: Integer

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CASES_CREATED`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Cases Created

**Calculation logic**:
+ Check case\$1create\$1time createdDataTime present?
+ Return count = 1 for each case, or null if not present.

**Notes**:
+ Uses SUM statistic for aggregation.
+ Counts each case creation event.
+ Returns null if creation timestamp is not present.
+ Can be filtered by case template and status.
+ Data for this metric is available starting from January 26, 2024 0:00:00 GMT.

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Cases reopened


This metric measures the number of times cases have been reopened.

**Metric type**: Integer

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `REOPENED_CASE_ACTIONS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Reopen Case Actions Performed

**Calculation logic**:
+ Check case\$1reopened\$1time lastReopenedDateTime present?
+ Return count = 1 for each reopened case.

**Notes**:
+ Uses SUM statistic for aggregation.
+ Counts each reopen action.
+ Returns null if reopen timestamp is not present.
+ Can be filtered by case template and status.
+ Data for this metric is available starting from January 26, 2024 0:00:00 GMT.

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Cases resolved


This metric measures the number of times cases have been resolved.

**Metric type**: Integer

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `RESOLVED_CASE_ACTIONS`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Resolve Case Actions Performed

**Calculation logic**:
+ Check case\$1resolved\$1time lastCloseDateTime present?
+ Return count = 1 for each resolved case.

**Notes**:
+ Uses SUM statistic for aggregation.
+ Counts each resolution action.
+ Returns null if resolution timestamp is not present.
+ Can be filtered by case template and status.
+ Data for this metric is available starting from January 26, 2024 0:00:00 GMT.

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Cases resolved on first contact


This metric measures the percent of cases that were resolved on the first contact (only including calls, chats, or email). Cases that have been reopened and subsequently closed in the specified interval will contribute to this metric. If cases are reopened but not closed in the specified interval it will not contribute to this metric.

**Metric type**: String
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_CASES_FIRST_CONTACT_RESOLVED`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Case First Contact Resolution Rate

**Calculation logic**:
+ Check if Case Status is closed?
+ Count contacts (CHAT/VOICE/EMAIL) for the case.
+ Calculate first contact resolution: Return true (1.0) if exactly one contact. Else false (0.0).

**Notes**:
+ Uses AVG statistic for final percentage.
+ Only considers closed cases.
+ Counts only CHAT, VOICE, and EMAIL contacts.
+ Returns null if case is not closed or has no contacts.
+ True (1.0) if resolved in single contact.
+ Data for this metric is available starting from December 4, 2023 0:00:00 GMT.

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Consult


Deprecated May 2019. When used in a report, it returns a dash (-). 

The count of contacts in the queue that were handled by an agent, and the agent consulted with another agent or a call center manager during the contact.

## Contact flow time


This metric measures the total time a contact spent in a flow. It's the IVR time, the time from the start until contact is queued.

Outbound contacts don't start in a flow, so outbound contacts aren't included.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONTACT_FLOW_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts flow time

**Calculation logic**:
+ For each contact record
  + If InitiationMethod not in ['INBOUND','TRANSFER','QUEUE\$1TRANSFER','API'], then skip this record.
  + If ConnectedToSystemTimestamp IS NOT present, then set result =0 and skip below steps for this record.
  + Else 
    + contactFlowEndTime = DisconnectTimestamp
    + If TransferCompletedTimestamp is present, then set contactFlowEndTime = TransferCompletedTimestamp
    + If QueueInfo.EnqueueTimestamp is present, the set contactFlowEndTime = QueueInfo.EnqueueTimestamp 
    + set diff\$1value = contactFlowEndTime - ConnectedToSystemTimestamp 
    + set max\$1value = max of (diff\$1value, 0)
+ Return final\$1result = sum of the max\$1value across all contacts.

## Contact handle time


This metric measures total time that an agent spent on contacts, including [Customer Hold Time](#customer-hold-time) and [After contact work time](#after-contact-work-time). This includes any time spent on contacts while in a custom status. (Custom status = the agent's CCP status is other than **Available** or **Offline**. For example, Training would be a custom status.)

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_HANDLE_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contact handle time

**Calculation logic**:
+ For each contact record
  + If Agent.AgentInteractionDuration is present, then set agent\$1interaction = Agent.AgentInteractionDuration.
  + If Agent.CustomerHoldDuration is present, then set customer\$1hold = Agent.CustomerHoldDuration.
  + If Agent.AfterContactWorkDuration is present, then set after\$1contact\$1work = Agent.AfterContactWorkDuration.
  + If Agent.AgentPauseDuration is present, then set agent\$1pause = Agent.AgentPauseDuration.
  + If all above fields ARE null, then skip this record.
  + Else set result = sum of agent\$1interaction, customer\$1hold, after\$1contact\$1work and agent\$1pause.
+ Return final\$1result = sum of the result values across all contact records.

**Notes**:
+ Contact handle time includes any time the agent was **Offline** and made an outbound call, even if the call was personal. 
+ If you want to exclude the amount of time spent in a custom status, see [Agent contact time](#agent-contact-time). 

## Contact State


This column heading appears on Real-time metrics reports. It's not a metric exactly, but a indicator of the state of the contacts the agent is currently handling.

 The state of the contact can be: **Connected**, **On Hold**, **After contact work**, **Paused**, **Incoming**, **Calling**, or **Missed contact**. 

For queued callbacks, the contact state can also **Callback incoming** or **Callback dialing**. 

If a manager is using the Manager Monitor feature to monitor a particular agent as they interact with a customer, the manager's contact state is Monitoring; the agent's contact state is Connected.

## Contact volume


This metric counts the contacts that entered a queue with the following initiation methods: Inbound, Transfer, Queue\$1Transfer, Callback, and API. 

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Intraday forecast performance dashboard](intraday-forecast-performance-dashboard.md)

## Contact volume - agent first callback


This metric counts the contacts in a queue that were initiated from a queued callback for the first callback.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Contact volume - agent first callback

**Calculation logic**:
+ The calculation definition returns a value of 1 for each contact record processed, effectively counting the number of contact records present within the specified time range.
+ For each contact record processed during the specified time period with an INITIATION\$1METHOD of CALLBACK, the calculation returns a value of 1.
+ The metric aggregates these individual values of 1 using the SUM calculation statistic, resulting in the total count of contacts created within the time range.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Contact volume - customer first callback


This metric counts the contacts in a queue that were initiated from a dialed callback for the first callback.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1QUEUED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Contact volume - customer first callback

**Calculation logic**:
+ The calculation definition returns a value of 1 for each contact record processed, effectively counting the number of contact records present within the specified time range.
+ For each contact record processed during the specified time period with an INITIATION\$1METHOD of CALLBACK\$1CUSTOMER\$1FIRST\$1QUEUED, the calculation returns a value of 1.
+ The metric aggregates these individual values of 1 using the SUM calculation statistic, resulting in the total count of contacts created within the time range.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Contacts abandoned


This metric counts the number of contacts that were disconnected by the customer while waiting in the queue. Contacts that were queued for callback are not counted as abandoned. 

When you create customized historical reports, to include this metric, on the **Groupings** tab choose either **Queue** or **Phone Number**. 

When you create a customized real-time metrics report, to include this metric, choose a **Queues** report for the type. On the **Filters** tab, choose **Queues**, then on the **Metrics** tab you'll have the option to include **Abandoned**.

This metric helps measure the customer experience by providing insights into how many customers abandoned the queue before being connected to an agent.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `CONTACTS_ABANDONED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_ABANDONED`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Abandoned
+ Historical metrics reports: Contacts abandoned

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is present, then skip this record.
  + If ContactTraceRecord.NextContactId is present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND TransferCompletedTimestamp is present), then skip this record.
  + If all above conditions checked, then count this record as 1.
+ Return final\$1result = ssum of the counts across all contacts.

## Contacts abandoned - customer first callback


This metric counts the number of contacts that were dialed for their first callback, but were disconnected by the customer while waiting in the queue. This metric helps measure the customer experience by providing insights into how many callback customers abandoned the queue before being connected to an agent.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_ABANDONED`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Contacts abandoned - customer first callback

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is present, then skip this record.
  + If ContactTraceRecord.NextContactId is present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND TransferCompletedTimestamp is present), then skip this record.
  + If all above conditions checked, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Contacts abandoned in *X* seconds


This metric counts the queued contacts disconnected without being connected to an agent for 0 to *X* seconds. It provides the count of contacts that were abandoned by customers within a specified time threshold (X seconds) after being placed in the queue. It helps measure the customer experience by identifying the number of contacts where customers hung up or disconnected while waiting in the queue, not exceeding the defined time threshold.

The preset values for X are: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, and 600 but you can define a custom duration for this metric such as minutes, hours, or days. The maximum duration for a custom value is 7 days. That's because in Amazon Connect you can't have a contact that goes longer than 7 days.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONTACTS_ABANDONED_IN_X`

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + If Agent.ConnectedToAgentTimestamp is present, then skip this record.
  + If NextContactId is present, then skip this record.
  + If (PreDisconnectState is present AND PreDisconnectState == "IN\$1QUEUE" AND TransferCompletedTimestamp is present), then skip this record.
  + If QueueInfo.Duration is less than the value of X, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

**Notes**:
+ QueueInfo.Duration should always be present on a contact record if QueueInfo.EnqueueTimestamp is present. However, it's included in the calculation because there are cases when upstream does not send that QueueInfo.Duration data, even though EnqueueTimestamp is present.

## Contacts agent hung up first


This metric counts the contacts disconnected where the agent disconnected before the customer. 

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html)> API metric identifier: `CONTACTS_AGENT_HUNG_UP_FIRST`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`

  This metric can be retrieved by using `CONTACTS_HANDLED` with a MetricFilters parameter set as follows:
  + `MetricFilterKey` = `DISCONNECT_REASON`
  + `MetricFilterValues` = `AGENT_DISCONNECT`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Agent hung up
+ Historical metrics reports: Contacts agent hung up first

**Calculation logic**:
+ Contacts handled with disconnect reason = agent disconnect.

**Notes**:
+ When an agent disconnects first after going idle in a chat, the disconnect isn't captured in this metric because chat timeouts have a different disconnectReason.

## Contacts answered in X seconds


This metric counts the contacts that were answered by an agent between 0 and X seconds of being placed in the queue, based on the value of EnqueueTimestamp. 

The possible values for X are: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, and 600. You can define custom durations for this metric such as minutes, hours, or days. The maximum duration for a custom value is 7 days. That's because in Amazon Connect you can't have a contact that goes longer than 7 days.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONTACTS_ANSWERED_IN_X`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Contacts answered in X seconds
+ Historical metrics reports: Contacts answered in X seconds

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If QueueInfo.EnqueueTimestamp is NOT present, then skip this record.
  + If QueueInfo.Duration is NOT present, then skip this record.
  + If QueueInfo.Duration is less than value of X, then count this record.
+ Return final\$1result = sum of the counts across all contacts.

## Contacts created


This metric counts the contacts in a queue. It provides a count of contacts that were initiated or created within the Amazon Connect instance. It tracks the number of inbound and outbound contacts across all channels (voice, chat, task, etc.) that were generated during the specified time period. It can be filtered by initiation methods. 

This metric is useful for understanding the overall contact volume and workload within the contact center.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Intraday forecast performance dashboard](intraday-forecast-performance-dashboard.md), Contacts created

**Calculation logic**:
+ The calculation definition returns a value of 1 for each contact record processed, effectively counting the number of contact records present within the specified time range.
+ For each contact record processed during the specified time period, the calculation returns a value of 1.
+ The metric aggregates these individual values of 1 using the SUM calculation statistic, resulting in the total count of contacts created within the time range.

## Contacts consulted


Deprecated May 2019. When used in a report, it returns a dash (-). 

The count of contacts handled by an agent who consulted with another agent in Amazon Connect. The agent interacts with the other agent, but the customer is not transferred to the other agent.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_CONSULTED`

## Contacts disconnected


This metric counts the number of contacts that were disconnected by the customer while waiting in the queue. It does not include contacts that were successfully connected to an agent or contacts that were queued for a callback. This metric is useful for understanding the abandonment rate and customer experience while waiting in the queue.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_CONTACTS_DISCONNECTED`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts disconnected

**Calculation logic**:
+ For each contact record
  + If PreDisconnectState is present AND PreDisconnectState == “IN\$1QUEUE”, then count this record as 1.
  + Else, skip this record.
+ Return final\$1result = sum of the counts across all contacts.

## Contacts handled


This metric counts the contacts that were connected to an agent during a given time period. It doesn't matter how the contact got to the agent. It could be a customer calling your contact center, or an agent calling the customer. It could be a contact transferred from one agent to another. It could be a contact where the agent answered it, but then they weren't sure what to do and they transferred the contact away again. As long as the agent was connected to the contact, it increments **Contacts handled**. 

This metric provides a measure of the workload handled by agents. You can use it to understand agent utilization and capacity planning. Contacts handled is particularly useful for contact centers that need to track the volume of customer interactions handled by their agents.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `CONTACTS_HANDLED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Handled
+ Historical metrics reports: Contacts handled

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is present, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

**Notes**:
+ This metric gets incremented when a contact disconnects. To see the count of contacts handled as soon as a contact is connected to an agent, see [Contacts handled (connected to the agent timestamp)](#contacts-handled-by-connected-to-agent-timestamp).

## Contacts handled (connected to the agent timestamp)


This metric counts the contacts that were connected to an agent, updated as soon as a contact is connected to an agent. **Contacts handled** is aggregated on the `CONNECTED_TO_AGENT` timestamp.

**Metric type**: Integer 

**Metric category**: Contact event-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED_CONNECTED_TO_AGENT_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts handled (connected to agent timestamp)

**Calculation logic**:
+ Check contact connected to agent event.
+ Return count = 1 for each connected contact.

**Notes**:
+ Counts contacts at the moment they connect to an agent. 
+ Based on connected to agent timestamp. 
+ Uses SUM statistic for aggregation.
+ Requires at least one filter from: queues, routing profiles, agents, or user hierarchy groups.
+ Provides real-time visibility into agent connections.
+ Can be filtered by initiation method.
+ Data for this metric is available starting from January 12, 2024 0:00:00 GMT.
+ Contact events are from a near real-time stream of contact (voice calls, chat, task, and email) events (for example, call is queued) in your Amazon Connect contact center. For more information, see [Amazon Connect contact events](contact-events.md). 
+ To see the count of contacts handled when a contact disconnects, see [Contacts handled](#contacts-handled). 

## Contacts handled - customer first callback


This metric counts the contacts handled by an agent for callback customers who were dialed for their first callback.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`
+ This metric can be retrieved by using a MetricFilters parameter set as follows:
  + MetricFilterKey = INITIATION\$1METHOD
  + MetricFilterValues = CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Contacts handled - customer first callback

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is present, then count this record as 1.
+ Return final\$1result = sum of the counts across all CALLBACK\$1CUSTOMER\$1FIRST\$1DIALED contacts.

**Notes**:
+ This metric is available when next generation Amazon Connect is [enabled](enable-nextgeneration-amazonconnect.md) for your instance. It provides unlimited AI capabilities.

## Contacts handled incoming


This metric counts the incoming contacts that handled by an agent, including inbound contacts and transferred contacts, during the specified time range. This includes contacts initiated using one of the following methods: 
+ Inbound call (INBOUND)
+ Transfer to agent (TRANSFER)
+ Transfer to queue (QUEUE\$1TRANSFER)
+ Queue-to-queue transfer (QUEUE\$1TRANSFER)

It also includes contacts for all channels, such as voice, chat, tasks, and email.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_HANDLED_INCOMING`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`

  This metric can be retrieved by using `CONTACTS_HANDLED` with a MetricFilters parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `INBOUND`, `TRANSFER`, `QUEUE_TRANSFER`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Handled in
+ Historical metrics reports: Contacts handled incoming

**Notes**:
+ Incoming **new** chats are not included in this metric. Only transferred chats (both agent transfers and queue transfers) are included.

## Contacts handled outbound


This metric counts the outbound contacts that were handled by an agent. This includes contacts that were initiated by an agent using the CCP.

All calls made by agents are counted, as long as they use the CCP, a custom CCP or other client app that use the Amazon Connect Streams API. 

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_HANDLED_OUTBOUND`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HANDLED`

  This metric can be retrieved by using `CONTACTS_HANDLED` with a MetricFilters parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `OUTBOUND`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Handled out
+ Historical metrics reports: Contacts handled outbound

## Contacts hold agent disconnect


This metric counts the contacts that were disconnected by the agent while the customer was on hold.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_ON_HOLD_AGENT_DISCONNECT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts hold agent disconnect

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.DisconnectReason == AGENT\$1DISCONNECT and PreDisconnectState == CONNECTED\$1ONHOLD, then count this record as 1.
  + Else, skip this record.
+ Return final\$1result = sum of the counts across all contacts.

## Contacts hold customer disconnect


This metric counts the contacts that were disconnected by the customer while the customer was on hold.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_ON_HOLD_CUSTOMER_DISCONNECT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts hold customer disconnect

## Contacts hold disconnect


This metric counts the contacts that disconnected while the customer was on hold. This includes both contacts disconnected by the agent and contacts disconnected by the customer.

This metric helps measure customer experience and identify potential issues with long hold times or inefficient call handling procedures.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_HOLD_ABANDONS`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_HOLD_ABANDONS`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Hold abandons
+ Historical metrics reports: Contacts hold disconnect

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present, then skip this record.
  + If PreDisconnectState is NOT present, then skip this record.
  + If PreDisconnectState == "CONNECTED\$1ONHOLD", then count this record.
  + Else, skip this record
+ Return final\$1result = sum of the counts across all contacts.

## Contacts in queue


This metric counts the contacts currently in the queue. The queue count updates when the contact is routed to an agent, before the agent accepts the contact.

**Contacts in queue** helps organizations monitor queue load and make staffing decisions. When queue size reaches 95% of capacity, a warning message is displayed.

To learn how this is different from Scheduled contacts in a callback scenario, see [How Initial delay affects Scheduled and In queue metrics in Amazon Connect](scheduled-vs-inqueue.md). 

In the real-time metrics report, when queue size is greater than 95% of capacity, a message is displayed, as shown in the following image. For more information about queue capacity, see [Set queue capacity](set-maximum-queue-limit.md).

![\[A message that queue size is greater than 95% of total capacity.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/inqueue-rtm-capacity.png)


**Metric type**: COUNT
+ Min value: 0
+ Max value: Queue capacity limit

**Metric category**: Current Queue Metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData ](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `CONTACTS_IN_QUEUE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: In queue
+ Dashboard: Queue size

## Contacts incoming


This metric counts the incoming contacts, including inbound contacts and transferred contacts.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED `

  This metric can be retrieved with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `INBOUND`, `TRANSFER`, `QUEUE_TRANSFER`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts incoming

**Notes**:
+ Multiple join attempts don't increase this number for an agent, that is, a missed connection attempt for an agent does not populate this metric for that agent.

## Contacts put on hold


This metric counts the contacts put on hold by an agent one or more times.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_PUT_ON_HOLD`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts put on hold

**Calculation logic**:
+ If Agent.NumberOfHolds is NOT present, then skip this record.
+ If Agent.NumberOfHolds is present, then count this record.
+ Return final\$1result = sum of the counts across all contacts.

## Contacts queued


This metric counts the contacts placed in the queue.

**Contacts queued** is an essential metric for understanding the volume of contacts waiting to be handled by agents. A higher number of contacts queued can indicate longer wait times and potentially a higher rate of abandoned contacts. This metric is useful for monitoring queue health, staffing levels, and overall contact center performance.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_QUEUED`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_QUEUED`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Queued
+ Historical metrics reports: Contacts queued

**Calculation logic**:
+ For each contact record
  + If QueueInfo.EnqueueTimestamp is present, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

**Notes**:
+ This metric gets incremented when a contact disconnects. To see the count of contacts queued as soon as a contact is enqueued, see [Contacts queued (enqueue timestamp)](#contacts-queued-by-enqueue).

## Contacts queued (enqueue timestamp)


This metric counts the contacts placed in the queue, updated as soon as a contact is enqueued. **Contacts queued (enqueue timestamp)** is aggregated on the `ENQUEUE` timestamp.

**Metric type**: Integer 

**Metric category**: Contact event-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_QUEUED_BY_ENQUEUE`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts queued (enqueue timestamp)

**Notes**:
+ Data for this metric is available starting from January 12, 2024 0:00:00 GMT.
+ Contact events are from a near real-time stream of contact (voice calls, chat, task, and email) events (for example, call is queued) in your Amazon Connect contact center. For more information, see [Amazon Connect contact events](contact-events.md). 
+ To see the count of contacts queued when a contact disconnects, see [Contacts queued](#contacts-queued). 

## Contacts removed from queue in X seconds


This metric counts the contacts removed from the queue between 0 and X after being added to it. A contact is removed from a queue when the following occurs: an agent answers the contact, the customer abandons the contact, or the customer requests a call back.

For X you can choose from pre-set times in seconds: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, and 600. 

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_REMOVED_FROM_QUEUE_IN_X`

**Calculation logic**:
+ For each contact record
  + If QueueInfo.Duration is NOT present, then skip this record.
  + If QueueInfo.Duration less than value of X, then count this record as 1
+ Return final\$1result = sum of the counts across all contacts.

## Contacts resolved in X seconds


This metric provides the count of contacts that have a resolution duration between 0 and X seconds after being initiated based on `InitiationTimestamp`. The resolution time for a contact is defined as: beginning from [InitiationTimestamp](ctr-data-model.md#initiationtimestamp), and ending at [AfterContactWorkEndTimestamp](ctr-data-model.md#acwendtimestamp) or [DisconnectTimestamp](ctr-data-model.md#disconnecttimestamp), whichever one is later. 

You can create custom duration to get this metric. Choose from additional durations, such as minutes, hours, or days. The maximum duration for a custom value is 7 days. That's because in Amazon Connect you can't have a contact that lasts longer than 7 days.

This metric helps measure the efficiency of your contact center in resolving customer inquiries within a specified time threshold.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_RESOLVED_IN_X`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts Resolved in X

**Calculation logic**:
+ For each contact record
  + If InitiationTimestamp is NOT present, then skip this record.
  + If Agent.AfterContactWorkEndTimestamp is present AND Agent.AfterContactWorkEndTimestamp is greater than DisconnectTimestamp, then: 
    + set end\$1time = Agent.AfterContactWorkEndTimestamp.
  + Else, set end\$1time = DisconnectTimestamp.
  + set diff\$1value = end\$1time - InitiationTimestamp. 
  + If diff\$1value is greater than 0, then set result = diff\$1value.
  + Else, set result = 0.
+ Return final\$1result = sum of the counts across all contact records.

## Contacts transferred in


This metric counts the contacts transferred in from queue to queue, and transferred in by an agent using the CCP.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_IN`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`

  This metric can be retrieved with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `TRANSFER`, `QUEUE_TRANSFER`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred in
+ Historical metrics reports: Contacts transferred in

## Contacts transferred in by agent


This metric counts the contacts transferred in by an agent using the CCP.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_IN_BY_AGENT`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`

  This metric can be retrieved with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `TRANSFER`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred in by agent
+ Historical metrics reports: Contacts transferred in by agent

## Contacts transferred in from queue


This metric counts the contacts transferred to the queue from another in a **Transfer to queue** flow. It counts the contacts transferred in by an agent using the CCP.

The count of contacts transferred into the queue from another queue during a **Customer queue flow**.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_IN_FROM_Q`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_CREATED`

  This metric can be retrieved with a [MetricFilters](https://docs.aws.amazon.com/connect/latest/APIReference/API_MetricV2.html) parameter set as follows:
  + `MetricFilterKey` = `INITIATION_METHOD`
  + `MetricFilterValues` = `TRANSFER`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred in from queue
+ Historical metrics reports: Contacts transferred in from queue

## Contacts transferred out


This metric counts the contacts transferred out from queue to queue, and transferred out by an agent using the CCP, during the specified time range.

Following is the difference between **Contacts transferred out** and **Contacts transferred out by an agent**:
+ **Contacts transferred out** includes all transferred contacts, including contacts who were not connected to an agent before they were transferred out. 
+ **Contacts transferred out by an agent** is limited to contacts who were connected to an agent before that agent transferred them out.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred out
+ Historical metrics reports: Contacts transferred out

**Calculation logic**:
+ For each contact record
  + If ContactTraceRecord.TransferCompletedTimestamp is NOT present, then skip this record.
  + Else, then count this record.
+ Return final\$1result = sum of the counts across all contacts.

## Contacts transferred out by agent


This metric counts the contacts transferred out by an agent using the CCP.

Following is the difference between **Contacts transferred out** and **Contacts transferred out by an agent**:
+ **Contacts transferred out** includes all transferred contacts, including contacts who were not connected to an agent before they were transferred out. 
+ **Contacts transferred out by an agent** is limited to contacts who were connected to an agent before that agent transferred them out.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_BY_AGENT`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_BY_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred out by agent
+ Historical metrics reports: Contacts transferred out by agent

## Contacts transferred out external


This metric counts the contacts that an agent transferred from the queue to an external source, such as a phone number other than the phone number for your contact center.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_EXTERNAL`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts transferred out external

## Contacts transferred out internal


 This metric counts the contacts for the queue that an agent transferred to an internal source, such as a queue or another agent. An internal source is any source that can be added as a quick connect.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_INTERNAL`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Contacts transferred out internal

## Contacts transferred out queue


This metric counts the contacts that were transferred from one queue to another queue using a **Transfer to Queue** flow. 

When a contact is waiting in a queue, and a **Transfer to Queue** flow is triggered, the contact is transferred to a different queue specified in the flow. This metric captures the count of such contacts that were successfully transferred out from their original queue to a different queue.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_FROM_QUEUE`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONTACTS_TRANSFERRED_OUT_FROM_QUEUE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Transferred out from queue
+ Historical metrics reports: Contacts transferred out queue

**Calculation logic**:
+ For each contact record
  + If TransferCompletedTimestamp is NOT present, then skip this record.
  + If PreDisconnectState is NOT present, then skip this record.
  + If PreDisconnectState \$1= "IN\$1QUEUE", then skip this record.
  + If all above conditions checked, then count this record as 1.
+ Return final\$1result = sum of the counts across all contacts.

## Conversations abandoned


This metric measures the count of contacts where no messages were sent by either the Agent or Customer or both. It only supports filtering and grouping by channel = CHAT.

**Metric type**: COUNT
+ Min value: 0.0
+ Max value: unlimited

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CONVERSATIONS_ABANDONED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Conversations abandoned

**Calculation logic**:
+ For each contact record:
  + If Either `ChatMetrics.AgentMetrics.ConversationAbandon` or `ChatMetrics.CustomerMetrics.ConversationAbandon` is absent skip the record
  + If present then count this record.
+ Return final\$1result = sum of the counts from matching records

## Current cases


This metric counts the total cases existing in a given domain for a specific point in time.

**Metric type**: Integer

**Metric category**: Case driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `CURRENT_CASES`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Current cases

**Calculation logic**:
+ Get statusesNested.count for current time period.
+ Sum counts across all matching status records.

**Notes**:
+ We recommend limiting the queried time window to 5 minutes. Otherwise the returned data may be inaccurate.
+ Uses SUM statistic for aggregation.
+ Provides point-in-time case count.
+ Can be filtered by status and template.
+ Based on case snapshot timestamp.
+ Data for this metric is available starting from January 26, 2024 0:00:00 GMT.

For a list of all case driven metrics, see [Amazon Connect Cases metrics](case-management-metrics.md).

## Customer hold time


 This metric measures the total time that customers spent on hold after being connected to an agent. This includes time spent on a hold when being transferred, but does not include time spent in a queue.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_HOLD_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Customer hold time

**Calculation logic**:
+ For each contact record
  + If Agent.ConnectedToAgentTimestamp is NOT present , then skip this record.
  + If Agent.CustomerHoldDuration is NOT present , then skip this record.
  + If Agent.CustomerHoldDuration is present, then set result = Agent.CustomerHoldDuration.
  + Else all above conditions checked and nothing added to final result, then skip this record.
+ Return final\$1result = sum of all the result values from matching records.

## Customer talk time percent


This metric provides the talk time by a customer in a voice conversation as a percent of the total conversation duration. 

**Metric type**: Percent

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_TALK_TIME_CUSTOMER`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Customer talk time percent

**Calculation logic**:
+ Sum all the intervals in which a customer was engaged in conversation.
+ Divide the sum by the total conversation duration. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Delivery attempts


This metric measures the delivery outcome of a campaign outreach attempt. The count of outbound campaign contact outcomes from the Amazon Connect dialer, or the count of outbound campaign email or SMS message outcomes that were successfully sent to Amazon Connect to be delivered. 

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `DELIVERY_ATTEMPTS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Delivery attempts

**Notes**:
+ For details about telephony disposition definitions, see DisconnectReason for outbound campaigns and AnsweringMachineDetectionStatus in the [ContactTraceRecord](ctr-data-model.md#ctr-ContactTraceRecord). For details about email and SMS disposition definitions, see campaign\$1event\$1type in the [Outbound campaign events](data-lake-outbound-campaigns-data.md#data-lake-oc-events) table. 
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT for the Telephony delivery mode and November 6, 2024 0:00:00 GMT for the Email and SMS delivery modes.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Delivery attempt disposition rate


This metric measures the percentage of each delivery outcome from a campaign outreach. The percent of call classification by answering machine detection or disconnect reason from outbound campaign contacts executed by the Amazon Connect dialer, or the percent of outbound campaign email or SMS message outcomes that was successfully sent to Amazon Connect to be delivered. 

**Metric type**: Percent
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `DELIVERY_ATTEMPT_DISPOSITION_RATE`

**Notes**:
+ Dispositions for the agent assisted voice and automated voice delivery modes are available with answering machine detection enabled. 
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT for the Telephony delivery mode and November 6, 2024 0:00:00 GMT for the Email and SMS delivery modes.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Duration


This column heading appears on Real-time metrics reports. It's not a metric exactly, but a indicator of the amount of time that the agent has been in the current Agent Activity State.

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Access the performance dashboard directly in the agent workspace](performance-dashboard-aw.md) 

## Effective staffing


The count of agents working on a given queue based on the time that agents spend handling contacts within each queue (even when they are assigned to multiple queues within each routing profile). 

## Error status time


For a specific agent, this metric measures the total time contacts were in an error status. This metric can't be grouped or filtered by queue. 

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDrror status timeataV2.html) API metric identifier: `SUM_ERROR_STATUS_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Error status time

**Notes**:
+ This metric measures duration of error states for contacts.
+ Time is converted from milliseconds to seconds.
+ Use this metric to track system or connection issues.
+ It returns null if error time data is not present.
+ Data for this metric is available starting from December 29, 2023 0:00:00 GMT.

## Estimated Wait Time


An estimate, in seconds, of how long a contact will wait in queue before being connected to an agent. EWT is calculated based on the contact's position in queue, the rate at which contacts are being connected to agents or disconnecting, and a correction factor that improves accuracy over time. It is available at the queue level (for new contacts), routing step level (when using agent proficiency-based routing), and contact level (for contacts already in queue). 

**Metric type**: Double

**Metric category**: Estimated metric

**How to access using the Amazon Connect API**: 
+ [GetContactMetrics](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetContactMetrics.html) API identifier: `ESTIMATED_WAIT_TIME`
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API identifier: `ESTIMATED_WAIT_TIME`

**Requirements**:
+ To use Estimated Wait Time you must enable [Next Generation Amazon Connect](enable-nextgeneration-amazonconnect.md) for your instance.

**Notes**:
+ Estimated Wait Time (EWT) is an approximation of how long a contact will wait in queue before being connected to an agent. 
+ The EWT is vended in seconds.
+ EWT may not be available when the system is unable to establish sufficient confidence in the prediction.
+ When EWT is not available i.e. it cannot be predicted with a high degree of confidence, the result will be empty

## Evaluations performed


This metric provides the number of evaluations performed with evaluation status as "Submitted." Evaluations for calibrations are excluded from this metric.

**Metric type**: Integer

**Metric category**: Contact evaluation driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `EVALUATIONS_PERFORMED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Agent performance evaluations dashboard](agent-performance-evaluation-dashboard.md)

**Calculation logic**:
+ Check evaluationId present?
+ Verify itemType is form.
+ Count submitted evaluations (excluding calibrations).

**Notes**:
+ Counts only submitted evaluations.
+ Excludes calibration evaluations.
+ Returns integer count.
+ Requires at least one filter from: queues, routing profiles, agents, or user hierarchy groups.
+ Based on submitted evaluation timestamp.
+ Data for this metric is available starting from January 10, 2025 0:00:00 GMT.

## Flows outcome


This metric returns the count for following flow outcomes within the specified start time and end time. The outcomes are terminal blocks in a flow.

 For a given start and end time this metric shows the count those flows where the start time is between the start and end interval specified and has end time. The end time of flow can be greater than end time specified in query interval. The metric does not show the count of flow that started before the start time and is in progress during the specified interval

**Metric type**: Integer

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `FLOWS_OUTCOME`

**Calculation logic**:
+ Check flow\$1endTimestamp present?
+ Return Count = 1 if end timestamp is present, else return 0.

**Notes**:
+ Uses SUM statistic for aggregation.
+ Counts completed flows with defined outcomes.
+ Only counts flows that started within specified time range.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.
+ System-defined flow outcomes include: 
  + **DROPPED**: When a contact drops from the flow before reaching terminal block.
  + **DISCONNECTED\$1PARTICIPANT**: When a contact reaches a [Disconnect / hang up](disconnect-hang-up.md) terminal block in a flow.
  + **ENDED\$1FLOW\$1EXECUTION**: When a contact reaches an [End flow / Resume](end-flow-resume.md) terminal block in a flow.
  + **TRANSFERED\$1TO\$1AGENT**: When a contact is transferred to an agent after running a [Transfer to agent (beta)](transfer-to-agent-block.md) block. 
  + **TRANSFERED\$1TO\$1PHONE\$1NUMBER**: When a contact is transferred to a phone number specified in a [Transfer to phone number](transfer-to-phone-number.md) block. 
  + **TRANSFERED\$1TO\$1FLOW**: When a contact is transferred to another flow specified in a [Transfer to flow](transfer-to-flow.md) block.
  + **TRANSFERED\$1TO\$1QUEUE**: When a contact is transferred to agent queue by using a [Transfer to queue](transfer-to-queue.md) block.
  + **RETURNED\$1TO\$1FLOW**: When a contact returns back to its original flow from a module.

## Flows outcome percentage


This metric returns the percentage of the specified outcome type in the metric level filter. 

**Metric category**: Flow driven metric

**Metric type**: Percent

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_FLOWS_OUTCOME`

   The count value of this metric can be obtained from `FLOWS_OUTCOME`. 

**Calculation logic**:
+ Get filtered flows outbound count (`FLOWS_OUTCOME_NUM`).
+ Get total flows outcome count (`FLOWS_OUTCOME_DEMON`)
+ Calculate percentage (filtered count / total count) \$1 100

**Notes**:
+ Uses `AVG` statistic for aggregation. 
+ Based on `FLOWS_OUTCOME` metric. 
+ Returns percentage value between 0 and 100. 
+ Only includes completed flows.
+ Can be filtered by flow outcome type.
+ Requires flows to have end timestamps.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.

## Flows started


This metric count the flows that started running within the specified start time and end time. For a given start and end time this metric shows the count of those flows where the start time is between the start and end interval specified.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `FLOWS_STARTED`

**Calculation logic**:
+ Check flow\$1startTimestamp present?
+ Return Count = 1 if startTimestamp present, else return 0.

**Notes**:
+ Uses SUM statistic for aggregation.
+ Counts all flow starts within time period. 
+ Independent of flow completion status.
+ Requires valid flow start timestamp.
+ Helps track flow initiation volume.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.

## Human answered


This metric counts the outbound campaign calls that were connected to a live customer. This metric is available only when answering machine detection is enabled. 

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `HUMAN_ANSWERED_CALLS`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Human answered

**Notes**:
+ This metric is available only for outbound campaigns that use the agent assisted voice and automated voice delivery modes.
+ Data for this metric is available starting from June 25, 2024 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Maximum flow time


This metric returns the maximum time the flow took to completed for the specified start time and end time.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `MAX_FLOW_TIME`

**Calculation logic**:
+ Check flow\$1endTimestamp present?
+ Calculate duration in milliseconds (end time - start time).
+ Return maximum duration in seconds (duration / 1000.0).

**Notes**:
+ Uses `MAX` statistic for aggregation.
+ Time is converted from milliseconds to seconds. 
+ Only includes completed flows.
+ Returns null if end timestamp is not present.
+ Helps identify longest running flows.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.

## Maximum queued time


This metric measures the longest time that a contact spent waiting in the queue. This includes all contacts added to the queue, even if they were not connected with an agent, such as abandoned contacts.

It provides insight into the maximum wait time experienced by customers in the queue, which can be useful for identifying potential bottlenecks or areas for improvement in the queue management process.

**Metric type**: Integer

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `QUEUED_TIME`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `MAX_QUEUED_TIME`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Max Queued
+ Historical metrics reports: Maximum queued time

## Max Test Case Execution Duration


The max duration of test runs that successfully started and completed.

**Metric type**: Double

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API.

**Calculation logic**: 
+ If executionStartTime and executionEndTime are present and executionEndTime > 0 and executionEndTime > executionStartTime then return (executionEndTime-executionStartTime)/1000

**Note**: Use MAX for statistic aggregation.

## Minimum flow time


This metric returns the minimum time a flow took to complete within the specified start time and end time.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `MIN_FLOW_TIME`

**Calculation logic**:
+ Check flow\$1endTimestamp present?
+ Calculate duration in milliseconds (end time - start time).
+ Return maximum duration in seconds (duration / 1000.0).

**Notes**:
+ Uses `MIN` statistic for aggregation.
+ Time is converted from milliseconds to seconds. 
+ Only includes completed flows.
+ Returns null if end timestamp is not present.
+ Helps identify fastest running flows.
+ Data for this metric is available starting from April 22, 2024 0:00:00 GMT.

## Non-adherent time


This metric is available in AWS Regions only where [Forecasting, capacity planning, and scheduling](regions.md#optimization_region) is available.

This metric measures the total time an agent did not adhere to their schedule.

**Metric type**: String (*hh:mm:ss*)

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_NON_ADHERENT_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Non-Adherent time

For a list of all schedule adherence metrics, see [Schedule Adherence metrics in Amazon Connect](scheduling-metrics.md).

## Non-talk time percent


This metric provides the non-talk time in a voice conversation as a percent of the total conversation duration. 

**Metric type**: Percent

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_NON_TALK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Non-talk time percent

**Calculation logic**:
+ Sum all the intervals in which participants remained silent (non-talk time).
+ Divide the sum by the total conversation duration. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Occupancy


This metric provides the percentage of time that agents were active on contacts. 

**Occupancy** doesn't account for concurrency. That is, an agent is considered 100% occupied for a given interval if they are handling at least one contact for that entire duration. 

**Metric type**: String
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `OCCUPANCY`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_OCCUPANCY`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Occupancy
+ Historical metrics reports: Occupancy

**Calculation logic**:
+ Get total contact time.
+ Get total contact and idle time.
+ Calculate percentage: (contact time / contact time \$1 idle time)).

**Notes**:
+ This metric uses AVG statistic for aggregation.
+ It measures agent utilization percentage.
+ It does not account for concurrency.
+ It is used in occupancy calculations.
+ It returns null if occupancy data is not present.
+ Data for this metric is available starting from October 1, 2023 0:00:00 GMT.

## Oldest


This metric measures the length of time in the queue for the contact that has been in the queue the longest.

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Oldest
+ Dashboard: [Queue and agent performance dashboard](queue-performance-dashboard.md), Oldest contact age

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `OLDEST_CONTACT_AGE`

## Online agents


This metric counts the agents who have set their status in the CCP to something other than **Offline**. For example, they may have set their status to Available, or to a custom value such as Break or Training.

**Online agents** helps organizations track agent availability and workforce management. It doesn't indicate how many agents can be routed contacts. For that metric, see [Available](#available-real-time). 



For example, say you see this in a Queues report: 
+ Online = 30
+ On Call = 1
+ NPT = 30
+ ACW = 0
+ Error = 0
+ Available = 0

This means 30 agents have set their status in the CCP to a custom status. 1 of those 30 agents is currently on a contact.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current Agent Metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `AGENTS_ONLINE`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Online
+ Historical metrics reports: Online agents
+ Dashboard: Online agents

## Online time


This metric measures the total time that an agent spent with their CCP set to a status other than **Offline**. This includes any time spent in a custom status. When you create a historical metrics reports, this metric can't be grouped or filtered by queue, phone number, or channels. 

**Metric type**: String

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SUM_ONLINE_TIME_AGENT`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Online time

**Calculation logic**:
+ Check onlineTime present and not empty.
+ Convert milliseconds to seconds (onlineTime / 1000.0)
+ Return value or null if not present.

**Notes**:
+ This metric includes all non-offline status time.
+ It includes custom status time.
+ Time is converted from milliseconds to seconds.
+ It returns null if online time data is not present.
+ Data for this metric is available starting from October 1, 2023 0:00:00 GMT.

## Percent agent on contact time


This metric provides the percent of online time that an agent spent on a contact, including Customer Hold Time and After Contact Work Time. This metric does not include time spent on a contact while in a custom status or Offline status. (Custom status = the agent's CCP status is other than Available or Offline. For example, Training would be a custom status.)

**Metric type**: Percent

**Metric category**: Agent activity-driven metric

**Calculation logic**:
+  (`SUM_CONTACT_TIME_AGENT`/`SUM_ONLINE_TIME_AGENT`) \$1 100

## Percent agent idle time


After the agent sets their status in the CCP to **Available**, this is the percent of online time they weren't handling contacts \$1 any time their contacts were in an Error state.

An agent is considered idle when they are not handling any contacts or when they have contacts in missed or rejected states. Conversely, when an agent is actively engaged with at least one contact, they are not considered idle.

**Metric type**: Percent

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Agent performance evaluation dashboard, the [Agent online time breakdown chart](agent-performance-evaluation-dashboard.md#agent-online-time-breakdown-chart)

**Calculation logic**:
+  (`SUM_IDLE_TIME_AGENT`/`SUM_ONLINE_TIME_AGENT`) \$1 100

## Percent agent non-productive time


This metric provides the percent of online time that agents spent in a custom status. That is, their CCP status is other than Available or Offline.

This metric doesn't mean that the agent was spending their time unproductively.

**Metric type**: Percent

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect admin website**: 
+ Dashboard: Agent performance evaluation dashboard, the [Agent online time breakdown chart](agent-performance-evaluation-dashboard.md#agent-online-time-breakdown-chart)

**Calculation logic**: 
+  (`SUM_NON_PRODUCTIVE_TIME_AGENT`/`SUM_ONLINE_TIME_AGENT`) \$1 100

## Percent bot conversations outcome


This metric provides the percentage of total conversations that ended in the specific outcome type specified in the metric level filter (`BOT_CONVERSATION_OUTCOME_TYPE`). It only includes completed conversations for which the invoking resource (flow or flow module) started between the specified start and end time. 

**Metric type**: Percent

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_BOT_CONVERSATIONS_OUTCOME`

**How to access using the Amazon Connect admin website**: 

**Calculation logic**:
+ (Count of conversations with BOT\$1CONVERSATION\$1OUTCOME\$1TYPE)/(Total count of conversations) \$1 100

**Notes**:
+ Data for this metric is available starting from December 2, 2024 00:00:00 GMT.

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Percent bot intents outcome


This metric provides the percentage of intents that ended in the specific outcome type specified in the metric level filter (`BOT_INTENT_OUTCOME_TYPE`). It includes intents in completed conversations where the invoking resource (flow or flow module) started between the specified start and end time.

**Metric type**: Percent

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_BOT_INTENTS_OUTCOME`

**How to access using the Amazon Connect admin website**: 

**Calculation logic**:
+ (Count of intents with BOT\$1INTENT\$1OUTCOME\$1TYPE)/(Total count of intents) \$1 100

For a list of all bot metrics, see [Amazon Connect bot metrics and analytics](bot-metrics.md).

## Position in Queue


This metric calculates the position of the contact in a queue while accounting for the channel (voice, chat, task, or email) and whether a routing step is used. 

This metric helps organizations:
+ Understand the expected wait experience of a contact.
+ Inform customers of their position in queue and potentially offer a callback.
+ Change the routing and treatment of the contact.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Contact record driven metric

**How to access using the Amazon Connect API**: 
+ [GetContactMetrics](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetContactMetrics.html) API metric identifier: `POSITION_IN_QUEUE`

**How to access using the Amazon Connect admin website**: Not available

**Notes**:
+ The contact must be in a queue for the **Position in queue** metric to be calculated.
+ If a contact has routing criteria, this metric only considers **Position in queue** for the active routing step.

## Recipients attempted


This metric measures the approximate count of outbound campaign recipients attempted for delivery.

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `RECIPIENTS_ATTEMPTED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Recipients attempted

**Notes**:
+ This metric is only available for outbound campaigns initiated using a customer segment. It is not available for event triggered campaigns.
+ Data for this metric is available starting from April 30, 2025 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Recipients interacted


This metric measures the approximate count of outbound campaign recipients who interacted with the engagement after a successful delivery attempt. Example interactions include: Open, Click, Complaint

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `RECIPIENTS_INTERACTED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md) 

**Notes**:
+ This metric is only available for outbound campaigns initiated using a customer segment. It is not available for event triggered campaigns.
+ Data for this metric is available starting from April 30, 2025 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Recipients targeted


This metric measures the count of outbound campaign recipients identified as the target audience for the campaign.

**Metric type**: Integer

**Metric category**: Outbound campaigns driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `RECIPIENTS_TARGETED`

**How to access using the Amazon Connect admin website**: 
+ Dashboard: [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md), Recipients targeted

**Notes**:
+ This metric is only available for outbound campaigns initiated using a customer segment. It is not available for event triggered campaigns.
+ Data for this metric is available starting from April 30, 2025 0:00:00 GMT.

For a list of all Outbound campaigns driven metrics, see [Outbound campaign metrics in Amazon Connect](outbound-campaign-metrics.md).

## Scheduled time


This metric is available in AWS Regions only where [Forecasting, capacity planning, and scheduling](regions.md#optimization_region) is available.

This metric measures the total time an agent was scheduled (either for productive or non-productive time) and *Adherence* for those shifts was set to `Yes`.

**Metric type**: String

**Metric category**: Agent activity-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `AGENT_SCHEDULED_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Scheduled time

For a list of all schedule adherence metrics, see [Schedule Adherence metrics in Amazon Connect](scheduling-metrics.md).

## Scheduled


This metric counts the customers in the queue for which there is a callback scheduled.

To learn how this is different from In queue contacts in a callback scenario, see [How Initial delay affects Scheduled and In queue metrics in Amazon Connect](scheduled-vs-inqueue.md). 

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API metric identifier: `CONTACTS_SCHEDULED`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Scheduled
+ Dashboard: [Queue and agent performance dashboard](queue-performance-dashboard.md), Contacts scheduled

## Service level *X*


This metric provides the percentage of contacts removed from the queue between 0 and *X* after being added to it. A contact is removed from a queue when the following occurs: an agent answers the contact, the customer abandons the contact, or the customer requests a call back. 

For *X* you can choose from pre-set times in seconds: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, and 600. 

**Metric type**: String
+ Min value: 0.00%
+ Max value: 100.00%

**Metric category**: Contact record-driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html) API metric identifier: `SERVICE_LEVEL`
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `SERVICE_LEVEL`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: SL *X*
+ Historical metrics reports: Service level *X*

**Calculation logic**
+ This percentage is calculated as follows:

  (Contacts removed from queue in *X* seconds / Contacts queued) \$1 100

### Custom service levels


You can also create custom service level metrics. Choose from additional durations, such as minutes, hours, or days.

Custom service levels are localized to the report where they are created. For example, you create a report that has a custom service level of 75. You leave the page and then create another report. The custom service level 75 won't exist in the second report. You'll need to create it again. 

The maximum duration for a custom service level is 7 days. That's because in Amazon Connect you can't have a contact that goes longer than 7 days.

You can add up to 10 custom service levels per report.

## Staffed agents


This metric counts the total number of agents who are online, and not in NPT (a custom status). 

An agent is NOT counted when:
+ Their CCP status is set to **Offline**. 
+ Their CCP status is set to any custom status (Break, Training, Lunch, and more). 

An agent IS counted when:
+ They are in Available status (whether handling contacts or not) .
+ They are in Available status and making outbound calls.

Example scenarios:
+ Agent in Available status making outbound call: Staffed = 1
+ Agent in Break status making outbound call: Staffed = 0
+ Agent in Available status handling multiple contacts: Staffed = 1
+ Agent logged in but in Training status: Staffed = 0

This metric helps organizations:
+ Track actual operational staffing levels.
+ Monitor workforce adherence to schedules.
+ Calculate real-time staffing efficiency.
+ Compare scheduled vs actual staffing levels.
+ Support workforce management decisions.

**Metric type**: COUNT
+ Min value: 0
+ Max value: unlimited

**Metric category**: Current Agent Metric

**How to access using the Amazon Connect API**: 
+ [GetCurrentMetricData ](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData .html) API metric identifier: `AGENTS_STAFFED`

**How to access using the Amazon Connect admin website**: 
+ Real-time metrics reports: Staffed
+ Dashboard: Staffed agents

**Related metrics**:
+ AGENTS\$1ONLINE (includes all online agents regardless of status)
+ AGENTS\$1NON\$1PRODUCTIVE (shows agents in custom statuses)
+ AGENTS\$1AVAILABLE (shows agents ready for contact routing)

**Common use cases**:
+ Workforce Management
  + Compare actual vs scheduled staffing
  + Monitor real-time adherence
  + Track staffing efficiency
+ Operations Management
  + Monitor operational capacity
  + Track agent availability patterns
  + Support intraday management decisions
+ Performance Analysis
  + Calculate staffing efficiency metrics
  + Analyze staffing patterns
  + Support capacity planning

**Notes**:
+ The AGENTS\$1STAFFED metric is crucial for workforce management and operations as it provides the clearest picture of actual operational capacity by counting only those agents who are truly available for work (not in custom statuses). It's often used in conjunction with other metrics to understand the full staffing situation and make informed decisions about resource allocation and management.
+ The key distinction between this and other metrics like AGENTS\$1ONLINE is that it specifically excludes agents in custom statuses, providing a more accurate view of actual operational capacity.
+ For information about why this metric may appear incorrect in a report, see [Why your Login/Logout report may appear incorrect](login-logout-reports.md#login-logout-incorrect).

## Step contacts queued


This metric counts the contacts that entered a specific routing step in the queue. If a contact goes through multiple routing steps it will be counted each time. 

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `STEP_CONTACTS_QUEUED`

**How to access using the Amazon Connect admin website**: 
+ Not available

## Step expired %


This metric provides the percentage of contacts for which the specific routing step expired. 

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_CONTACTS_STEP_EXPIRED`

**How to access using the Amazon Connect admin website**: 
+ Not available

**Calculation logic**:
+ This metric is calculated by dividing number of contacts that expired in a specific step by the total number of contacts that entered that routing step.

## Step joined


This metric provides the percentage of contacts that joined with an agent at the routing step. 

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_CONTACTS_STEP_JOINED`

**How to access using the Amazon Connect admin website**: 
+ Not available

**Calculation logic**:
+ This metric is calculated by dividing the number of contacts that joined in a specific step divided by the total number of contacts that entered that routing step.

## Talk time percent


This metric provides the talk time in a voice conversation as a percent of the total conversation duration. 

**Metric type**: Percent

**Metric category**: Conversational analytics driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API metric identifier: `PERCENT_TALK_TIME`

**How to access using the Amazon Connect admin website**: 
+ Historical metrics reports: Talk time percent

**Calculation logic**:
+ Sum all the intervals in which either an agent, a customer, or both were engaged in conversation (talk time). 
+ Divide the sum by the total conversation duration. 

**Notes**:
+ This metric is available only for contacts analyzed by Contact Lens conversational analytics. 

For a list of all metrics driven by Contact Lens Conversational analytics, see [Conversational analytics metrics in Amazon Connect](contact-lens-metrics.md).

## Test case execution count


The total number of test case executions performed in automated testing scenarios.

**Metric type**: Integer

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API.

**Calculation logic**: 
+ Sum of test cases executed in a timeframe where each test case execution record contributes a value of 1

## Test case failed rate


The percentage of test runs completed with a failed outcome.

**Metric type**: Double

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API.

**Calculation logic**: 
+ TEST\$1CASE\$1EXECUTION\$1FAILED\$1COUNT / TEST\$1CASE\$1EXECUTION\$1COUNT

## Test case success rate


The percentage of test runs completed with a successful outcome.

**Metric type**: Double

**Metric category**: Flow driven metric

**How to access using the Amazon Connect API**: 
+ [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API.

**Calculation logic**: 
+ TEST\$1CASE\$1EXECUTION\$1SUCCESS\$1COUNT / TEST\$1CASE\$1EXECUTION\$1COUNT

# Custom metric primitives


Metric primitives are used for creating custom metrics, which are personalized measurements that offer more flexibility than the standard out-of-the-box metrics. Metric primitives utilize metric-level filters to make them more customizable and adaptable to business needs. These metrics can be used with different statistics (such as SUM, AVG, MIN, MAX) and can be combined using arithmetic operations to devise more comprehensive measurements. The metric primitives are broadly categorized into two categories : 
+ **Contact**: Helps gain insights into customer interactions and tasks 
+ **Agent**: Helps gain insights into agent performance 

## After contact work time


The total time that an agent spent doing After Contact Work (ACW) for a contact. In some businesses, this is also known as Call Wrap Up time.

You specify the amount of time an agent has to do ACW in their [agent’s configuration settings](https://docs.aws.amazon.com/connect/latest/adminguide/configure-agents.html). When a conversation with a contact ends, the agent is automatically allocated to do ACW for the contact. ACW ends for a contact when the agent changes to an alternate state such as available or the configured timeout is reached.

**Metric Primitive Name:** `After contact work time`

**Metric Primitive Category**: Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Agent Active Time


This metric provides the time an agent spends on a customer interaction, including Agent interaction time, Customer hold time, and After Contact Work (ACW) time. Active Time includes time spent handling contacts while in a custom status. 

Custom status = the agent's CCP status other than **Available** or **Offline**. For example, Training would be a custom status.

**Metric Primitive Name:** `Agent active time`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Agent Interaction Time


The time that agents spent interacting with a customer during a contact. This does not include After Contact Work Time, Customer Hold Time, Custom status time, or agent pause duration (which applies only to tasks).

**Metric Primitive Name:** `Agent interaction time`

**Metric Primitive Category: **Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contact Hold Time


This metric measures the total time that customers spent on hold after being connected to an agent. This includes time spent on a hold when being transferred, but does not include time spent in a queue.

**Metric Primitive Name:** `Contact hold time`

**Metric Primitive Category: ** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Agent Pause Time


This metric measures the total time an agent kept a task in a paused state after the task was connected to them. It applies only to `TASK` channel contacts, including both inbound and outbound tasks.

**Metric Primitive Name:** `Agent pause time`

**Metric Primitive Category: **Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contact Duration


This metric measures the time a contact spends from the contact initiation timestamp to disconnect timestamp.

**Metric Primitive Name:** `Contact duration`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contact Queue Time


The total time that a contact waited in a queue before being answered by an agent. Also known as queue wait time.

**Metric Primitive Name:** `Contact queue time`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contacts Abandoned


This metric counts the number of contacts that were disconnected by the customer while waiting in the queue. Inbound contacts which disconnect because they requested a callback are not counted as abandoned.

**Metric Primitive Name:** `Contacts abandoned`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM

## Contacts Created


The number of contacts created during the specified time range. This includes all inbound and outbound contacts regardless of how they were initiated.

**Metric Primitive Name:** `Contacts created`

**Metric Primitive Category: **Contact

**Supported Statistics:** SUM

## Contacts Handled


This metric counts the contacts that were connected to an agent during a given time period. It doesn't matter how the contact got to the agent.

**Metric Primitive Name:** `Contacts handled`

**Metric Primitive Category: **Contact

**Supported Statistics:** SUM

## Contacts Hold Abandons


This metric counts the contacts that disconnected while the customer was on hold. This includes both contacts disconnected by the agent and contacts disconnected by the customer.

**Metric Primitive Name:** `Contacts hold disconnect`

**Metric Primitive Category: **Contact

**Supported Statistics: **SUM

## Contacts Put On Hold


The number of contacts put on hold by an agent at least once. If a contact is put on hold multiple times, it is counted only once.

**Metric Primitive Name:** `Contacts put on hold`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM

## Contacts Queued


The number of contacts added to a queue during the specified time range. This includes contacts whether they were handled, abandoned, or are still in the queue.

**Metric Primitive Name:** `Contacts queued`

**Metric Primitive Category: **Contact

**Supported Statistics: **SUM

## Contacts Transferred Out


The number of contacts transferred out from queue to queue, and transferred out by an agent using the CCP. 

**Metric Primitive Name:** `Contacts transferred out`

**Metric Primitive Category: **Contact

**Supported Statistics: **SUM

## Contact Handle Time


This metric measures the total time, from start to finish, that a contact is connected with an agent (handle time). It includes talk time, customerHoldDuration, after contact work (ACW) time, and agent pause duration (which applies only to tasks). It applies to both inbound and outbound contacts. 

**Metric Primitive Name:** `Contact handle time`

**Metric Primitive Category: **Contact

**Supported Statistics: **SUM

## Contact Holds


The number of times voice contacts were put on hold while interacting with an agent. Provides insights into how often agents need to put customers on hold during interactions.

**Metric Primitive Name:** `Contact holds`

**Metric Primitive Category: **Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contact Resolution Time


The total time from when a contact enters the system until it is resolved. This includes queue time, interaction time, hold time, and after contact work time.

**Metric Primitive Name:** `Contact resolution time`

**Metric Primitive Category:** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Contact Flow Duration


This metric measures the total time a contact spent in a flow. It's the IVR time, the time from the start until contact is queued, transferred, or disconnected—whichever occurred first. Outbound contacts don't start in a flow, so outbound contacts aren't included. 

**Metric Primitive Name:** `Contact flow duration`

**Metric Primitive Category:** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Agent Greeting Time


The first response time of agents on chat, indicating how quickly they engage with customers after joining the chat.

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average agent greeting time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-greeting-time-agent-hmetric)

**Metric Primitive Name:** `Agent greeting time`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Agent Interruption Time


The total agent interruption time while talking to a contact. 

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average agent interruptions time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-interruption-time-agent-hmetric)

**Metric Primitive Name:** `Agent interruption time`

**Metric Primitive Category:** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Agent Interruptions


Quantifies the frequency of agent interruptions during customer interactions.

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average agent interruptions](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-interruptions-agent-hmetric)

**Metric Primitive Name:** `Agent interruptions`

**Metric Primitive Category:** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Talk Time Agent


The time that was spent talking in a conversation by an agent. 

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average agent talk time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-talk-time-agent-hmetric)

**Metric Primitive Name: ** `Agent talk time`

**Metric Primitive Category: ** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Talk Time Customer


The time that was spent talking in a conversation by a customer. 

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average customer talk time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-talk-time-customer-hmetric)

Note:

**Metric Primitive Name:** `Customer talk time`

**Metric Primitive Category: ** Contact

**Supported Statistics: **SUM, AVG, MIN, and MAX

## Non-Talk Time


This metric provides the 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.

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average non-talk time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-non-talk-time-hmetric)

**Metric Primitive Name:** `Non-talk time`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Talk Time


The time that was spent talking during a voice contact across either the customer or the agent. 

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average talk time](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metrics.html#average-talk-time-hmetric)

**Metric Primitive Name:** `Talk time`

**Metric Primitive Category:** Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Conversation Duration


The conversation duration of voice contacts with agents. Calculated by the total time from the start of the conversation until the last word spoken by either the agent or the customer.

**Note**  
This metric is available only for contacts analyzed by Contact Lens conversational analytics, please refer to the following metric for more clarity: [Average conversation duration](https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-metric..html#average-conversation-duration-hmetric)

**Metric Primitive Name:** `Conversation duration`

**Metric Primitive Category:**Contact

**Supported Statistics:** SUM, AVG, MIN, and MAX

## Contacts Routed


This metric counts the number of contacts routed to an agent.

**Metric Primitive Name:** `Contacts routed`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Contacts Missed


This metric counts the contacts routed to an agent but not answered by that agent, including contacts abandoned by the customer.

If a contact is not answered by a given agent, Amazon Connect attempts to route it to another agent to handle; the contact is not dropped. Because a single contact can be missed multiple times (including by the same agent), it can be counted multiple times: once for each time it is routed to an agent but not answered.

**Metric Primitive Name:** `Agent contacts missed`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Idle Time


This metric measures the amount of time agent wasn’t handling contacts \$1 any time their contacts were in an Error state, after the agent sets their status in the CCP to Available. 

Agent idle time includes the amount of time from when Amazon Connect starts routing the contact to the agent to when the agent picks up or declines the contact. After an agent accepts the contact, the agent is no longer considered idle. This metric can't be grouped or filtered by queue, phone number, or channels.

**Metric Primitive Name:** `Agent idle time`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Contact Time


This is a measure of the total time that an agent spent on a contact, including Customer Hold Time and After Contact Work Time. This does not include time spent on a contact while in a custom status or Offline status. (Custom status = the agent's CCP status is other than Available or Offline. For example, Training would be a custom status.) 

This metric can't be grouped or filtered by queue, phone number, or channels.

**Metric Primitive Name:** `Agent on contact time`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Online Time


This is a measures the total time that an agent spent with their CCP set to a status other than **Offline**. This includes any time spent in a custom status. This metric can't be grouped or filtered by queue, phone number, or channels.

**Metric Primitive Name:** `Agent online time`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Error Status Time


This is the measure of the total time contacts were in an error status. This metric can't be grouped or filtered by queue, phone number, or channels.

**Metric Primitive Name:** `Agent error status time`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Agent Non-Productive Time


This measures the total time that agents spent in a custom status. That is, their CCP status is other than **Available** or **Offline**. This metric doesn't mean that the agent was spending their time unproductively. This metric can't be grouped or filtered by queue, phone number, or channels.

**Metric Primitive Name:** `Agent online time - non-productive`

**Metric Primitive Category:** Agent

**Supported Statistics:** SUM

## Current Contacts In Queue


This metric counts the contacts currently in the queue. This metric helps organizations monitor queue load and make staffing decisions.

**Metric Primitive Name:** `Contacts in queue`

**Metric Primitive Category:** Current Contact

**Supported Statistics:** SUM

## Current Contact Queue Time


The metric helps measures the length of time in the queue for the contact that has been in the queue the longest.

**Metric Primitive Name:** `Contact queue time`

**Metric Primitive Category:** Current Contact

**Supported Statistics:** MAX

## Current Contacts Scheduled


This metric counts the number of scheduled callbacks, which will enter a queue in a future time. For more information please refer to the: 
+ [Set up queued callback by creating flows, queues, and routing profiles](https://docs.aws.amazon.com/connect/latest/adminguide/setup-queued-cb.html) in Amazon Connect Administrator Guide
+ [How Initial delay affects Scheduled and In queue metrics](https://docs.aws.amazon.com/connect/latest/adminguide/scheduled-vs-inqueue.html) in Amazon Connect Administrator Guide

**Metric Primitive Name:** `Contacts Scheduled`

**Metric Primitive Category:** Current Contact

**Supported Statistics:** SUM

## Current Slots Available


This metric measures how many more contact can be handled by agents. See also [agent concurrency](https://docs.aws.amazon.com/connect/latest/adminguide/channels-and-concurrency.html).

**Metric Primitive Name:** `Contact availability`

**Metric Primitive Category:** Current Agent

**Supported Statistics:** SUM

## Current Slots Active


This metric measures the total number of contacts being handled by agents. See also [agent concurrency](https://docs.aws.amazon.com/connect/latest/adminguide/channels-and-concurrency.html).

**Metric Primitive Name:** `Contacts active`

**Metric Primitive Category:** Current Agent

**Supported Statistics:** SUM

## Current Agents Online


This metric counts the number of agents who are currently online in the contact center. An agent is considered online when their status in the CCP is set to any status other than Offline.

**Metric Primitive Name:** `Agents online`

**Metric Primitive Category:** Current Agent

**Supported Statistics:** SUM

## Metric level filters supported per metric primitive category




[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html)

## Groupings supported per metric primitive category




[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html)

## Supported top-level metric filters per metric primitive category




[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html)

## Guidelines for Metric Primitive creation and usage with out-of-the-box metrics


### Creating Custom Metric from Primitives


**Each metric primitive can use the same metric-level filter only once **

Each metric primitive can only use a specific filter attribute once. If you apply the same filter attribute again (even with a different value), it will overwrite your previous condition. 

**Metric primitives must be from the same category**

Metric primitives are organized into categories based on what they measure (e.g., Contact metrics, Agent metrics, Queue metrics). You can only combine primitives within the same category in a single custom metric. When selecting a metric primitive, you'll see its category in the dropdown. If a metric appears disabled (grayed out), hover over it to see the why, it must be from a different category than your first selection.
+ (e.g., Contact metrics, Agent metrics, Queue metrics). You can only combine primitives within the same category in a single custom metric. When selecting a metric primitive, you'll see its category in the dropdown. If a metric appears disabled (grayed out), hover over it to see why—typically because it's from a different category than your first selection.
+ When selecting a metric primitive, you'll see its category in the dropdown. If a metric appears disabled (grayed out), hover over it to see why—typically because it's from a different category than your first selection.

**Arithmetic operations on metric primitives require consistent filters**

When performing arithmetic operations (\$1, -, \$1, /) on multiple metric primitives within a single statistic, all primitives must use the same filter attribute.

Important: The filter values can differ; only the filter attribute must match. 

Example: if the custom metric definition is of the form, SUM(Metric-1 \$1 Metric-2), here the Metric-1 and Metric-2 must utilize consistent filters 

**Arithmetic operations on statistics operations support metric primitive with different filters** 

When performing arithmetic operations (\$1, -, \$1, /) on multiple statistics operations, you can combine metric primitive groups having different filters.

Example: 
+ Metric-1: a metric primitive from Contact category using Queue Time as a filter
+ Metric-2: a metric primitive from Contact category using Contact Handle Time as a filter
+ Valid custom metric definition: SUM(Metric-1) \$1 SUM(Metric-2)

**Metrics only support specific statistics**

Not every metric primitive supports all statistic operations (SUM, AVG, MIN, MAX). Using an unsupported statistic will cause an error.

Some metrics are only meaningful with certain calculations:
+ **Count-based metrics** (e.g., Contacts Created): supports SUM, as AVG does not make sense
+ **Duration metrics** (e.g., Contact Handle Time): support AVG, SUM, MIN, MAX

**A custom metric must have 1 to 5 components**

A component is each individual metric primitive you add to your custom metric definition. If you're combining three different metrics, that's three components.
+ **Minimum**: 1 component (you must have at least one metric)
+ **Maximum**: 5 components per custom metric

Please note: a custom metric utilizing a metric of **Current Contact** category can support at most 1 component.

**A statistic operation can support at most contain 10 elements (either components or constants)**

Each statistic operation (SUM, AVG, etc.) can contain a maximum of 10 elements.

**What Counts as an Element?**

Both of these count toward the 10-element limit:
+ **Component identifiers** (e.g., Metric\$11, Metric\$12)
+ **Constants/numbers** (e.g., 100, 0.5)

### Guidelines for using custom metrics with out-of-the-box metrics


A custom metric can only be added to a dashboard widget if the metric's underlying primitives support ALL filters and groupings applied to that widget.

Common Scenario: You create a custom metric using "Agent Idle Time" primitive, which does NOT support "Channel" as a filter or grouping dimension. 

Result: You cannot add this custom metric to any widget that: 
+ Filters by Channel, OR
+ Groups data by Channel 

Refer to the Metric Primitive definition section for supported filters and groupings of metric primitives. 

# Assign permissions to view dashboards and reports in Amazon Connect
Assign permissions

The following security profile permissions control access to dashboards and reports in Amazon Connect. These permissions are in the **Analytics and Optimization** section of the **Security profiles** page.

## Access metrics permission
Access metrics permission

When you select **Access metrics - Access**:
+ Amazon Connect automatically assigns the following permissions:
  + **Real-time metrics - Access**
  + **Historical metrics - Access**
  + **Agent activity audit - Access**

  These permissions are shown in the following image:  
![\[The Access option is selected for Access metrics, Real-time metrics, Historical metrics, and Agent activity audit.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/permissions-create-and-share-reports.png)
+ **Saved reports - View** permission.
+ You gain access to:
  + All tabs on the **Dashboards and reports** page.
  + All real-time and historical metrics reports.

![\[The Dashboards and reports page, access is granted to all the tabs on the page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-access-all.png)


## Individual feature permissions


You can also assign permissions for individual features:

### Real-time metrics permission


When you select only **Real-time metrics - Access**:
+ You can access only real-time metrics reports.
+ You cannot access other analytics pages or reports.

### Historical metrics permission


When you select only **Historical metrics - Access**:
+ You can access only historical metrics reports.
+ You cannot access other analytics pages or reports.

### Dashboard permissions


When you select only **Dashboards - Access**:
+ You can access only the **Dashboards** tab.
+ You can view historical metrics displayed on dashboards.
+ You must have the **Real-time metrics - Access** permission to view real-time metrics on dashboards.

![\[The Dashboards - Access permission on the Security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-edit-security-profiles-2.png)


The following image shows that you only have access to the **Dashboards** tab on the **Dashboards and reports** page. 

![\[The Dashboards and reports page, access is granted to the Dashboards tab only.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-access.png)


## Custom metrics and permissions

+ **Analytics and Optimization - Access metrics** - Access permission or the **Dashboard - Access** permission.
+ **Analytics and Optimization - Custom metrics**: 
  + This permission enables users to view, create and manage custom metrics.
  + If you have enabled Next Generation Amazon Connect in your instance, you will have the ability to view, create, and manage custom metrics with custom filters and functions in addition to custom customer service level metric calculations.

# Dashboards in Amazon Connect for getting contact center performance data
Dashboards

Understanding your contact center at the most granular level is key to improving performance and lowering costs. You can use the Amazon Connect visual dashboards to understand the performance of your contact center.

Amazon Connect dashboards show real-time and historical metrics information and insights about your contact center performance. 
+ Real-time dashboards are updated every 15 seconds, with the exception of timeseries widgets which refresh every 15 minutes.
+ Embedded agent workspace dashboards are updated every 2 minutes, with the exception of timeseries widgets which refresh every 15 minutes.
+ You can select historical data up to 3 months in the past.

You can customize the dashboards (for example, re-size and re-arrange the visuals), specify a custom time range and custom benchmark comparison time range for each dashboard, and select filters for data to include for each report. You can also download the entire data set or individual widgets as CSV, download the dashboard as a PDF, save your own version to your saved dashboards, share with individuals, and publish to the entire instance.

**Topics**
+ [

## Get started
](#how-to-access-dashboards)
+ [Specify time range and "Compare to" benchmark](#required-dashboard-filters)
+ [

## Save, download, and share your dashboard
](#dashboard-actions)
+ [Customize your dashboard](dashboard-customize-widgets.md)
+ [Contact Lens conversational analytics dashboard](contact-lens-conversational-analytics-dashboard.md)
+ [Agent performance evaluations dashboard](agent-performance-evaluation-dashboard.md)
+ [AI Agent performance dashboard](ai-agent-performance-dashboard.md)
+ [Flows and conversational bot performance dashboard](flows-performance-dashboard.md)
+ [Outbound campaigns performance dashboard](outbound-campaigns-performance-dashboard.md)
+ [Queue and agent performance dashboard](queue-performance-dashboard.md)
+ [

# Testing and simulation dashboard
](testing-and-simulation-dashboard.md)
+ [Intraday forecast performance dashboard](intraday-forecast-performance-dashboard.md)
+ [Agent workspace performance dashboard](performance-dashboard-aw.md)
+ [Integrate a published dashboard into the agent workspace](integrate-published-dashboard.md)
+ [

# [New] Custom Metrics
](custom-metrics-topic.md)

## Get started


1. Ensure users are assigned the appropriate security profile permissions so they can access the dashboards they need and view the metrics:
   + **Access metrics - Access permission** or the **Dashboard - Access permission**. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
   + Viewing the data on each dashboard requires the appropriate permissions. For example, to view flows data, you need **Flows - View** permissions. See the topics about each dashboard for the specific permissions.

1. In the Amazon Connect admin website, navigate to **Analytics and Optimization**, **Dashboards and reports**. Select the Amazon Connect dashboard you want to view. The following image shows an example **Dashboards and reports** page with four dashboards you can select.  
![\[The Dashboards and reports page, the dashboards available for you to select.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-and-reports.png)

1. When you open a dashboard, use the required filters to specify the time range. For more information, see [Specify time range and "Compare to" benchmark](#required-dashboard-filters).  
![\[A widget on a sample dashboard, the Actions icon to edit the widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-requiredfilters.png)

1. In a widget, you can choose **Actions**, **Edit** to customize the widget to meet your business needs. For more information, see [Customize your dashboard](dashboard-customize-widgets.md).   
![\[A widget on a sample dashboard, the Actions icon to edit the widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-parts.png)

## Specify time range and "Compare to" benchmark
Specify time range and "Compare to" benchmark

All dashboards have the following required filters:

1. **Time range**: You can select a real-time time range within the **Time range: Today** option and choose a trailing window of time. For additional windows, select **Custom**. 

   Following are tips for specifying the time range:
   + Select historical time ranges by altering your Time range to **Day**, **Week**, **Month**, or **Custom**. 
   + Select a maximum of 35 days in the last 3 months using **Time Range: Custom**.
   + Under **Week** you can choose **Week to date**, which is the current ongoing week.
   + You can select **Month to Date** which starts on the 1st of the selected month to the current date.

1. **Compare to** benchmark time range: You can customize a comparison time period to benchmark your Time range selection against, such as an exact week over week comparison called **Compare to: Prior week same day, time range, and time**. This benchmark time range powers the benchmarking in all of the widgets in the dashboard. Your benchmark time range must be a date in the past compared to your time range.

   **Week to date** supports comparing to prior week same time range. This means:
   + If your **Week to Date** selection covers Sunday to Wednesday of the current week, the **'Prior week same time range'** comparison automatically selects Sunday to Wednesday of the previous week.

   **Month to Date** supports comparing to prior month same time range. 

    Both **Week to Date** and **Month to Date** support custom time range comparisons, to compare with a custom week or month respectively.

Each dashboard has additional filters specific to that feature. For example, the following image of the **Conversational analytics dashboard** shows the available filters for that widget. **Contact category** is specific to Contact Lens.

![\[Required dashboard filters.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-performance-overview-filters.png)


## Save, download, and share your dashboard


Use the following actions on your dashboards to save, download, and share them.

1. **Save**: You can save your dashboard and change your dashboard name by choosing **Actions** > **Save** and typing a new name and choosing **Save**. Your saved dashboard appears in your **Saved dashboards** in the **Dashboards and reports** page, the **Dashboards** tab.

1. **Save as**: You can re-name and save your dashboard by choosing **Actions** > **Save as** and typing a new name and choosing save. Your saved dashboard appears in your **Saved dashboards** in the **Dashboards and reports** page, the **Dashboards** tab.

1. **Download CSV**: You can download the entire dashboard data set to CSV by choosing **Actions** > **Download CSV**. You can also download each widget's data set individually by choosing the download arrow button in the top right of each widget.

1. **Download PDF**: You can download the entire dashboard as a PDF by choosing **Actions** > **Download PDF**.

1. **Share**: You can share and publish the dashboard like other Amazon Connect reports by choosing **Actions** > **Share**. For more information about sharing and publishing, see [Share reports](https://docs.aws.amazon.com/connect/latest/adminguide/share-reports.html), [View shared reports](https://docs.aws.amazon.com/connect/latest/adminguide/view-a-shared-report.html), and [Publishing reports](https://docs.aws.amazon.com/connect/latest/adminguide/publish-reports.html).

   The following image shows the actions that you can select on an example dashboard.

![\[Available actions for the conversational analytics dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-contact-categories-actions-view-drop-down.png)


# Customize your Amazon Connect dashboard
Customize your dashboard

You can customize specific widgets to create dashboards that best fit your business needs. For example, you can create a single line chart that combines contacts queued, average queue answer time, and abandoned contacts. You can apply filters to show your most important queues so you can quickly see how increasing contact volumes impact both wait time and customer abandonment rates.

You can delete or add new metrics, define widget level filters and groupings, re-order and re-size columns, and more. Additionally, you can add new custom metrics to specific widgets in your dashboards. For more information, see. [[New] Custom Metrics](custom-metrics-topic.md).

**Topics**
+ [Choose which metrics to display](#dashboard-changing-metrics)
+ [

## Select custom time thresholds
](#select-time-thresholds)
+ [

## Re-order the metrics
](#reorder-metrics)
+ [

## Re-size columns
](#reorder-metrics)
+ [

## Add comparisons to the Trailing performance widgets
](#add-comparisons)
+ [

## Configure groupings
](#configure-groupings)
+ [

## Configure filters
](#configure-filters)
+ [

## Modify thresholds for summary widgets and tables
](#dashboard-thresholds)
+ [Add or remove widgets](#dashboard-add-widgets)
+ [Move and resize widgets](#widgets-move-charts)
+ [

## Create custom dashboards
](#dashboard-create-custom)
+ [

## Create custom calculations of service level metrics
](#dashboard-custom-sl)

## Choose which metrics to display in a widget
Choose which metrics to display

1. In a widget, select the Actions icon and then choose **Edit**. The following image shows the Actions icon for the **Performance overview** widget.   
![\[The Edit option for the Performance overview widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-changing-metrics-b.png)

1. In the widget's **Edit** pane choose the metric column you want to change; the available metrics for that column appear in the dropdown list. 

   The following image shows a widget **Edit** pane, the **Widget name** box (which you can edit), and the dropdown list available for the **Metric 1** column of the **Performance overview** widget.   
![\[The Edit pane, the Widget name box, the Metric 1 dropdown list.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-metrics-list.png)
**Note**  
In only specific widgets you can select the following real-time queue, routing profile, and agent metrics. You cannot combine these metrics with trailing near real-time metrics or historical metrics.   
Agents online
Agents available
Agents in error
Agents in NPT
Agents staffed
Agents on contact
Agents online
Agents in ACW
Contacts active
Contact availability
Oldest contact
Contacts in queue

## Select custom time thresholds


In the widget's **Edit** pane you can select custom time thresholds for metrics such as **Service level**, **Contacts answered in X**, and **Contacts abandoned in X**. To select a custom time threshold, choose **Add custom**, as shown in the following image.

![\[The Add custom option in the Edit pane for the widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-changing-metrics-4.png)


You can then select and choose which time threshold you want. The limit is between one second and seven days. The following image shows the dialog box for adding custom values for the **Contacts resolved by X** metric.

![\[The Add custom option for Contacts resolved by X.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-changing-metrics-5.png)


## Re-order the metrics


In the widget's **Edit** pane you can re-order the columns for the metrics by selecting the dots next to the metric and moving the metric up or down the Edit pane. 

![\[Use the icons to re-order the columns of metrics on the chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-reorder-metric.png)


## Re-size columns


To re-size the columns in the dashboard, select the vertical bars in the column headers and drag left or right to re-size. You can also re-size the grouping column. The following image shows a vertical bar on a dashboard.

![\[An example of the vertical bar you use to resize a column.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-resize-column.png)


## Add comparisons to the Trailing performance widgets


In the widget's **Edit** pane you can choose to show the comparisons in your Trailing performance widgets by choosing the **Show comparison** option. This allows you to see how your performance compares to the previous time range. 

![\[The Show comparison option in the Edit pane, the Prior information on the chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-add-comparisons.png)


## Configure groupings


In the widget's **Edit** pane you can configure the groupings for tables. You can add up to three groupings. 

**Note**  
Groupings are available dynamically based on the metrics selected in the widgets to avoid incompatible metric/grouping combinations.
Groupings change the metrics that are available within the widgets.

The following image shows two groupings for the Contact categories widget in the **Edit** pane.

![\[An example of groupings in the Edit pane for the Contact categories widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-groupings.png)


## Configure filters


In the widget you can select filters that apply to only to the widget you're on. These filters are dynamically included based on the metrics selected. 

The widget-level filters override any page-level filters.

The following image shows filters for the **Trailing agent performance** metrics.

![\[An example of filters you can add for a widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-configurable-filters.png)


## Modify thresholds for summary widgets and tables


You can add color coded thresholds to summary widgets and tables by choosing the **Modify thresholds** option on the widget.

![\[The Modify threshold menu option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-thresholds-1.png)


You can add up to three thresholds per metric (red, yellow, green). You can define the thresholds that cause the metrics to change colors. Thresholds are evaluated in the order they are applied, which means that if you have overlapping thresholds, the first one that triggers, will color the respective metric. This means if you want to create a red/yellow/green configuration for greater than 90% green, between 90%-70% yellow, and less than 70% yellow, you should create three conditions in the following order:

1. Greater than or equal to 90% = Green

1. Greater than or equal to 70% = Yellow 

1. Less than 70% = Red

![\[The Modify threshold dialog box.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-thresholds-2.png)


## Add or remove widgets on a dashboard
Add or remove widgets

You add widgets to a dashboard by choosing from a list of pre-configured widgets that is based on the dashboard you are using. You can have up to 10 widgets on each dashboard.

**To add a widget**

1. On the dashboard page, choose **Add widget**, as shown in the following image.   
![\[The Add widget button on the dashboards page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-add-widget.png)

1. On the **Add widget** page, select a widget from the list of pre-configured widgets based on the dashboard you are using. The widget is added to the bottom of the dashboard.

   The following example of an **Add widget** page shows five Contact widgets that you can add.  
![\[Five Contact widgets on the Add widget page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-widget-choose.png)

When you add a custom widget to the dashboard, you can apply both a widget-level filter and a page-level filter. 

The widget-level filters override any page-level filters. For example, you have two queues:
+ Queue1 is filtered at the page level.
+ Queue2 is filtered at the widget level.

In this example, the widget would filter by Queue 2 and other widgets on the dashboard would filter by Queue 1 at page level.

To remove a widget from your dashboard, choose the Actions icon and then choose **Remove**, as shown in the following image. 

![\[The Actions icon, the Remove option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-remove-widget.png)


## Move and resize widgets
Move and resize widgets

You can move charts around by choosing and holding the top left corner icon with your mouse and then moving the widget. You can re-size widgets by choosing and dragging the bottom right icon with your mouse. These two controls are shown in the following image.

![\[The controls to move the widget around the page or resize it.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-contact-categories-actions-view2.png)


## Create custom dashboards


To create a custom dashboard, on the **Dashboards** tab choose **Create custom**, as shown in the following image. 

![\[The Create custom button on the Saved dashboards page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-custom.png)


A new custom dashboard opens. Use the **Add widget** option to customize the dashboard. 

## Create custom calculations of service level metrics


You can create custom calculations of service level metrics to measure the percentage of contacts handled within your specified time threshold. 

Complete the following steps to create a custom calculation.

1. Log in to Amazon Connect admin website using an Admin account, or an account that has the following permissions in its security profile: 
   + **Analytics and Optimization - Access metrics** - Access permission or the **Dashboard - Access** permission.
   + **Analytics and Optimization - Custom metrics**: These permission enables users to view, create and manage custom metrics.

1. From any [dashboard widget](#dashboard-changing-metrics), select the **Actions** icon and then choose **Edit**.

1. In the metric selection dropdown, under **Custom metrics**, choose **Add custom service level calculation**, as shown in the following image.  
![\[The Add custom service level calculation option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-custom-sl-metrics.png)

1. In the **Add custom service level calculation** form, configure the following settings:
   + **Metric name**:- Enter a unique name (maximum 128 characters)
   + **Description (optional)**: Provide details about the metric's purpose (maximum 500 characters)
   + **Target time**: Specify the service level threshold.
     + **Length**: Enter a value between 1 second and 7 days
     + **Unit**: Select seconds, minutes, hours, or days
   + **Excluded contact outcomes**: Choose which types of contacts to exclude from the denominator:
     + **Contacts transferred**
     + **Contacts resulted in callbacks**
     + **Contacts abandoned in X seconds/minutes/hours/days**

1. The service level calculation preview updates automatically as you configure these settings.   
![\[The Add a custom service level definition page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-create-custom-sl-calc.png)

   The preview shows:
   + The calculation formula.
   + A plain language explanation of what the metric measures.
   + The percentage of contacts answered within your target time, excluding any contact types you specified.

### Limitations

+ You can add up to 10 custom metrics to a widget.

### Use custom service level metrics in dashboards


After creating a custom service level metric, you can add it to any dashboard widget. Complete the following procedure. 

1. From any [dashboard widget](#dashboard-changing-metrics), select the **Actions** icon, and then choose **Edit**.

1. In the metric selection dropdown, locate your custom metric under the **Custom metrics** category.

1. Select your custom metric to add it to the widget.

1. Configure any additional widget settings like time range, comparisons, or filters.

1. Choose **Save** to apply your changes.

# Amazon Connect Contact Lens conversational analytics dashboard
Contact Lens conversational analytics dashboard

When Contact Lens conversational analytics is [enabled](enable-analytics.md) on your contacts, you can analyze conversations between customers and agents by using speech and chat transcriptions, natural language processing, and intelligent search capabilities. Contact Lens conversational analytics performs sentiment analysis, detects issues, and enables you to automatically categorize contacts. 

The Contact Lens conversational analytics dashboard helps you understand:
+ Why customers are contacting your contact center
+ The trends of contact drivers over time
+ The performance of each of those call drivers (for example, average handle time for call driver "Where’s my stuff?")

You can view key metrics for categories such as contacts handled and average handle time compared to a custom-defined benchmark time-range with color indicators (for example, green = good, red = bad) for quick insights within seconds (for example, "Am I performing better or worse than last week and by how much?") using the summary widgets at the top. 

Data visualizations such as **Movers and shakers** display the largest changes compared to a custom-defined benchmark time period in the past (that is, week over week). While **Contacts handled and average handle time trend** shows you the number of contacts handled alongside the average handle time over a period of intervals in time in a time series chart.

**Topics**
+ [

## Enable access to the dashboard
](#enable-contact-lens-conversational-dashboards)
+ [

## Performance overview charts
](#contact-lens-conversational-dashboard-performance-overview)
+ [

## Contact categories
](#contact-lens-conversational-dashboard-contact-categories)
+ [

## Movers and shakers
](#contact-lens-conversational-dashboard-movers-shakers)
+ [

## Top contact categories average handle time
](#contact-lens-conversational-dashboard-top-contact-categories)
+ [

## Contact count by queue
](#contact-lens-conversational-dashboard-contact-count)
+ [

## Contacts handled and average handle time trend
](#contact-lens-conversational-dashboard-contacts-handled)
+ [

## Dashboard functionality limitations
](#contact-lens-conversational-dashboard-functionality-limitations)

## Enable access to the dashboard


1. Ensure users are assigned the appropriate security profile permissions:
   + **Access metrics - Access permission** or the **Dashboard - Access permission**. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
   + **Contact Lens - conversational analytics**: This permission enables users to view data in the Contact Lens dashboard.

1. In the AWS console, ensure that **Analytics tools**, **Enable Contact Lens** is selected, as shown in the following image.  
![\[The Enable Contact Lens checkbox in the AWS console.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboards-enable-contact-lens-checkbox.png)

1. In your flow, enable Contact Lens conversational analytics so it analyzes your contacts. For instructions, see [Enable call recording and speech analytics](enable-analytics.md#enable-callrecording-speechanalytics).

## Performance overview charts


There are two performance overview charts that provide aggregated metrics based on your filters. The second chart is further filtered only by contacts analyzed by Contact Lens conversational analytics. Each metric within the charts is compared to your "compare to" benchmark time range filter. 

![\[The Performance overview charts in the dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-performance-overview.png)


This chart shows the following information:
+ Contacts handled during your time range selection was 165,522, which is down ˜12% compared to your benchmark number of contacts handled, 187,949 contacts. 
+  The percentages are rounded up or down. 
+ The colors that appear for the metrics indicate positive (green) or negative (red) compared to your benchmark. 
+ There are no colors for contacts handled.

## Contact categories


The contact categories chart shows you Contact Category information. To see all data, click on the pop-out icon in the top right of the chart. To deep dive further into the contacts, click on the Contact Category and it will take you to Contact Search pre-filtered for that category along with the dashboard filters.

1. Contacts %: the count of contacts analyzed by Contact Lens conversational analytics that have a given category divided by the total number of contacts analyzed by Contact Lens conversational analytics.

1. Contacts: count of contacts analyzed by Contact Lens conversational analytics that have a given category.

1. AHT: the average handle time for the contacts that have a given category.

1. Avg. queue answer time: the average queue answer time for the contacts that have a given category.

1. Contacts transferred in: the count of contacts transferred in for the contacts that have a given category.

![\[The Contact categories chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-contact-categories.png)


## Movers and shakers


The movers and shakers chart shows you the categories with the highest percent change in distribution compared to your benchmark time range. In other words, it shows you the count of categories that were generated more or less frequently compared to the total number of contacts analyzed by Contact Lens conversational analytics. 

For example:
+ If 20 out of 100 contacts analyzed by conversational analytics have Category A, your contacts % for Category A was 20%.
+ If during the comparison benchmark time period 10 out of 100 contacts analyzed by Contact Lens conversational analytics had Category A, your Prior contacts % for Category A was 10%.
+ The % Change would be (20% - 10%)/(10%) = 100%.

To see all data, choose the pop-out icon in the top right of the chart. To deep dive further into the contacts, choose the Contact Category and it will take you to Contact Search pre-filtered for that category along with the dashboard filters.

1. Change %: (Contacts % – Prior contacts %) / (Prior contacts %). This number is rounded. The chart is sorted by highest absolute Change %.

1. Contacts %: the count of contacts analyzed by Contact Lens conversational analytics in the time range specified in your dashboard filter that have a given category divided by the total number of contacts analyzed by Contact Lens conversational analytics.

1. Contacts: the count of contacts analyzed by Contact Lens conversational analytics in the time range specified in your dashboard filter.

1. Prior contacts %: the count of contacts analyzed by Contact Lens conversational analytics in the "compare to" benchmark time range specified in your dashboard filter that have a given category divided by the total number of contacts analyzed by Contact Lens conversational analytics.

1. Prior contacts: the count of contacts analyzed by Contact Lens conversational analytics in the "compare to" benchmark time range specified in your dashboard filter. 

![\[The Movers and shakers chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-movers-shakers.png)


## Top contact categories average handle time


The top contact categories average handle time displays the prior AHT (using the "compare to" benchmark time range) to the current time range AHT for each of your top 10 categories (sorted by count of contacts with a category from left to right). To see all data, click on the pop-out icon in the top right of the chart.

![\[The Top contact categories average handle time chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-top-contact-categories.png)


## Contact count by queue


**Note**  
This section of the dashboard displays data even when Contact Lens conversational analytics is not enabled on any contacts.

The contact count by queue chart displays the count of contacts for each queue, sorted by the highest number of contacts from left to right. You can configure this widget further by filtering for contact categories directly from this chart. This filter overrides the page-level contact category filter at the top of the dashboard.

![\[The Contact count by queue chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-contact-count.png)


## Contacts handled and average handle time trend


**Note**  
This section of the dashboard displays data even when Contact Lens conversational analytics is not enabled on any contacts.

The Contacts handled and average handle time trend is a time-series chart that displays the count of contacts handled (blue bars) and the average handle time (red line) over a given time period broken down by intervals (15min, daily, weekly, monthly). You can configure different time range intervals by using the "Interval" button directly in the widget. The intervals that you may select depend on the page-level time range filter. 

For example:
+ If you have a "Today" time range filter at the top of your dashboard, you can only see an interval of 15min for the last 24 hours.
+ If you have a "Day" time range filter at the top of your dashboard, you can see a trailing 8 day interval trend, or a 15min interval trend for the trailing 24 hours.

![\[The Contacts handled and average handle time trend chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/conversational-analytics-dashboards-contacts-handled.png)


## Dashboard functionality limitations


The following limitations apply to the Contact Lens conversational analytics dashboard:
+ Tag-based access controls are not supported on the dashboard.
+ If you have a routing profile or agent hierarchy filter selected, the hyperlinks on contact categories leading to contact search will be disabled within the Contact categories and Movers and Shakers charts.

# Agent performance evaluations dashboard
Agent performance evaluations dashboard

You can use the **Agent performance evaluations dashboard** to view aggregated agent performance, and get insights across agent cohorts and over time. 

The dashboard provides a single place to view aggregated agent performance. Use the dashboard to view your agents' performance evaluation scores and drill-down into evaluation scores received on different evaluation forms, sections, and questions. You can also use it to view agent performance metrics such as average handle time, occupancy, and more.

**Topics**
+ [

## Enable access to the dashboard
](#enable-agent-performance-evaluations-dashboard)
+ [

## Specify "Time range" and "Compare to" benchmark
](#agents-timerange)
+ [

## Examples of "Time range" and "Compare to" configurations
](#agents-timerange-examples)
+ [

## Agent performance overview and Agent evaluation performance overview charts
](#agent-performance-overview)
+ [

## Evaluation scorecard chart
](#evaluation-scorecard-dashboard)
+ [

## Evaluation score trend chart
](#evaluation-scorecard-trend-chart)
+ [

## Agent performance evaluation metrics table
](#agent-perf-metrics-chart)
+ [

## Agent online time breakdown chart
](#agent-online-time-breakdown-chart)
+ [

## Average handle time breakdown chart
](#avg-handletime-breakdown-chart)
+ [

## Agent performance metrics table
](#agent-perf-metrics-table)
+ [

## Evaluations performed by evaluator
](#evaluations-performed-by-evaluator-table)
+ [

## Agent hierarchy evaluation metrics
](#agent-hierarchy-evaluation-metrics-table)

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:

 **Manager access** 

 Managers can access the dashboard within **Analytics and Optimization > Dashboards and Reports**. 

 Grant managers the appropriate security profile permissions: 
+ **Access metrics - Access permission** or the **Dashboard - Access permission**. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
+ **Users - View**: This permission enables you to view users, such as agents receiving evaluations and managers performing evaluations.
+ **Evaluation forms - perform evaluations - View**: This permission enables users to view performance evaluation results.
+ **Evaluation forms - manage form definitions - View**: This permission enables users to view evaluation form definitions such as form structure, scoring weights, and more.
+ **Saved reports - Create, View, Publish [optional]**: Grants managers permissions to create custom saved dashboards and publish them to agents and other managers.

 **Agent access** 

 Agents can be granted access to only their own performance evaluation metrics by saving a custom dashboard that is accessible by agents within the 1) Amazon Connect agent workspace or 2) As a custom report in the Amazon Connect admin console. 
+ **Saved reports - View**: Grants permission to view a published dashboard.
+ **View my own data in dashboards - View**: Grants access to the Dashboards to view individual agent performance metrics and the metrics of queues in the agent's routing profile.
+ **Evaluation forms - perform evaluations - View**: This permission enables users to view performance evaluation results.
+ **Evaluation forms - manage form definitions - View**: This permission enables users to view evaluation form definitions such as form structure, scoring weights, and more.

 Save a custom dashboard by: 
+ Add one or more performance evaluation widgets to an existing dashboard.  
![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-dashboard-add-widget.png)  
![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-widgets.png)
+ **Save** the dashboard.
+ Click **Share**. **Publish** the dashboard to make it available to other users. You may set the share setting to **Read-only** to prevent others from making edits to the dashboard.  
![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-dashboard-share.png)

 You can **Share the dashboard link** for agents to access the dashboard within the Amazon Connect admin console. For agents to access the saved dashboard on the Connect agent workspace see: [Integrate a published dashboard into the agent workspace](integrate-published-dashboard.md). 

## Specify "Time range" and "Compare to" benchmark


Following are a few use cases that help explain how to configure the **Time range** and **Compare to** settings.
+ **Time range**: Select from intraday (trailing 8 hours), daily, weekly, monthly performance. You can view data from 15 seconds up to 3 months in the past. Some of the metrics are available only starting January 10, 2025 0:00:00 GMT. For more information, see [Metric definitions](metrics-definitions.md).
+ **Compare to**: Compare performance with prior time period (for example, prior week, prior month, and more) or with a Amazon Connect resource (for example, comparison with all agents within the contact center, a specific hierarchy, queue, and more).
+ **Agent**
+ **Agent hierarchy**
+ **Channel**
+ **Queue**
+ **Routing Profile**

## Examples of "Time range" and "Compare to" configurations

+ **Use case 1**: I want to compare my agents’ performance today with my performance yesterday

  Configure the dashboard as follows:
  + Time range = Trailing
  + Time = Customer: Today (since 12 am)
  + Compare to 
    + Comparison type: Prior time period
    + Benchmark time range: Day, Prior day  
![\[Time range = Trailing, Time = Today, Comparison type = Prior time period.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-evaluations-dashboard-example1.png)
+ **Use case 2**: I want to compare my agents’ performance last week with the prior week

  Configure the dashboard as follows:
  + Time range = Week
  + Time = Last week
  + Compare to 
    + Comparison type: Prior time period
    + Benchmark time range: Week, Prior week  
![\[Time range = Week, Time = Last week, Comparison type = Prior time period.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-evaluations-dashboard-example2.png)
+ **Use case 3**: I want to compare my agents’ performance last week with the average of the contact center.

  Configure the dashboard as follows:
  + Time range = Week
  + Time = Last week
  + Compare to 
    + Comparison type: Resource
    + Select resource: Agent  
![\[Time range = Week, Time = Last week, Comparison type = Resource.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-evaluations-dashboard-example3.png)

## Agent performance overview and Agent evaluation performance overview charts


These two charts provide aggregated metrics based on your filters. 

For example, they show the average handle time of the agent hierarchy that you selected, for the specified time range (for example, last week). 

The charts also provide the benchmark value based on your selections within "Compare to" and the difference in values versus the comparison. 

The following image shows an example **Agent performance overview** chart.

![\[The Agent performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-dashboard1.png)


The following image of the **Agent evaluation performance overview** chart shows the **Avg evaluation score** decreased from 67.58% to 48.72%.

![\[The Agent evaluation performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-dashboard2.png)


## Evaluation scorecard chart


This chart provides a drill-down of the aggregated evaluation score from form to section to questions. 

For example, you can select your team in the agent hierarchy and view how the team is performing overall. You can identify what evaluation questions they need to improve on by sorting questions using **Avg evaluation score** column. 

You can view the score (out of 100%) of sections and questions in the **Avg. evaluation score** column. To see how each section and question contributes to the evaluation score of the form, view the **Avg weighted evaluation score** column.

**Percent change in avg evaluation score** is as follows: 
+ (**Avg evaluation score** - **Prior avg evaluation score**) / **Prior avg evaluation score**)

In addition to the using the page filters, you can add filters to the chart for the evaluation form and the evaluation source. 

The evaluation source helps you differentiate between evaluations performed manually, automatically, or where the manager completed the evaluation with assistance from automation. For a description of each `evaluationSource` valid value (`ASSISTED_BY_AUTOMATION`, `MANUAL`, `AUTOMATED`), see [Evaluation form metadata definitions](evaluationforms-example-output-file.md#evaluation-form-metadata). 

The following image shows an example **Evaluation scorecard** chart.

![\[The Evaluation scorecard chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/evaluation-scorecard-dashboard.png)


## Evaluation score trend chart


On the **Evaluation score trend** chart you can view trends at intervals of 15 minutes, daily, weekly or monthly, and perform comparison with prior time period and resource benchmarks. The available intervals depend on time range selections. For example, for a Time Range of weekly, you can view trends at daily and weekly intervals. 

In addition to the page filters, you can also add filters to the chart for the evaluation form and the evaluation source. 

The following image shows an example **Evaluation score trend** chart.

![\[The Evaluation score trend chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/evaluation-score-trend.png)


## Agent performance evaluation metrics table


You can view the average evaluation score for each of your agents. For example, you can filter for a particular agent hierarchy and sort agents by their **Avg. evaluation score**. 

You can drill-down into agents to view their score across the different evaluation forms and can also filter the table for a particular evaluation form or evaluation source (that is, automated, manual, and more). 

The table provides evaluations performed so you can assess if the agent has received enough evaluations for the **Avg. evaluation score** to be representative of their performance. You can also check if the agent received any automatic fails on their performance evaluations.

You can set custom thresholds that enable you to get an at-a-glance view of agents that are below the desirable threshold for their average evaluation score. For more information, see [Modify thresholds for summary widgets and tables](dashboard-customize-widgets.md#dashboard-thresholds). 

The following image shows an example **Agent performance evaluation metrics** table.

![\[The Agent performance evaluation metrics chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-perf-evaluation-metrics.png)


## Agent online time breakdown chart


This chart provides a breakdown of the online time spent by agents being on-contact, being idle (while being available to take calls), and non-productive (that is, in custom status). 

You can then compare the breakdown over time or versus a benchmark (for example, the average of all agents in the contact center).

This chart helps you assess whether agents are spending too much time on activities outside of taking contacts, so you can take action (for example, driving better adherence to scheduled breaks). 

 For more information about metrics definitions, see [Metric definitions](metrics-definitions.md).

The following image shows an example **Agent online time breakdown** chart.

![\[The Agent online time breakdown chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-online-time-breakdown.png)


## Average handle time breakdown chart


This chart provides a breakdown of the average handle time across interaction time, hold time, and After Contact Work (ACW) time. 

You can benchmark average handle time components over time or versus benchmark (for example, the average of all agents). 

 This chart helps you identify opportunities to reduce average hold time, for example, if average handle time is high because average after contact work time is higher than the contact center's average, then you can coach agents on how to complete after contact work more efficiently.

The following image shows an example **Avg. handle time breakdown** chart.

![\[The Avg. handle time breakdown chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/avg-handletime-breakdown.png)


## Agent performance metrics table


This table provides you with key agent performance metrics. You can sort the table in ascending or descending order of the metrics. For example, which agents have the highest **Avg after contact work time**. 

You can also edit the chart to add or remove agent performance metrics, and set thresholds for highlighting insights.

The following image shows an example **Agent performance metrics** chart.

![\[The Agent performance metrics table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-perf-metrics-table.png)


## Evaluations performed by evaluator


On this table, you can view the evaluations performed by evaluator to assess evaluator productivity and drill-down into evaluations completed for each agent. 

You can also compare evaluation scores across evaluators to assess evaluator consistency and accuracy.

![\[Evaluations performed by evaluator.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/evaluations-performed-by-evaluator-table.png)


To add this widget on the agent performance evaluation dashboard or another dashboard, click **Add widget** and select it under **Performance evaluation**. 

![\[Performance evaluation widgets.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-widgets.png)


Note that you can filter any dashboard widget containing evaluation metrics by the **evaluator** that had submitted the evaluation: 

![\[Agent performance evaluator filter.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-performance-evaluator-filter.png)


## Agent hierarchy evaluation metrics


On this table, you can drill-down into avg. evaluation score and evaluations performed by agent hierarchy. You can configure your agent hierarchy to represent geographical locations, departments, teams, etc. 

![\[Agent hierarchy evaluation metrics table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-hierarchy-evaluation-metrics-table.png)


To add this widget on the agent performance evaluation dashboard or another dashboard, click **Add widget** and select it under **Performance evaluation**. 

# AI Agent performance dashboard
AI Agent performance dashboard

You can use the **AI Agent performance dashboard** to view AI Agent performance, and get insights across AI Agents and over time.

The dashboard provides a single place to view aggregated AI Agent performance. Use the dashboard to view your AI Agents metrics such as invocation count, latency, and success rate.

**Topics**
+ [

## Enable access to the dashboard
](#enable-ai-agent-performance-dashboard)
+ [

## Specify "Time range" and "Compare to" benchmark
](#ai-agents-timerange)
+ [

## Self-service AI performance summary
](#self-service-ai-agent-performance-summary)
+ [

## AI agent assistance performance summary
](#ai-agent-assistance-performance-summary-dashboard)
+ [

## AI agents by version chart
](#ai-agents-by-version-chart)
+ [

## AI agents by invocation success rate
](#ai-agents-by-invocation-success-chart)
+ [

## Knowledge base usage
](#knowledge-base-usage)
+ [

## AI prompts by version
](#ai-prompts-by-version)

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:

**Access metrics - Access **permission or the **Dashboard - Access** permission. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md).

**Agent applications - ****Connect Workspace AI Chat Widget **permission: This permission is needed to access the AI Agent Performance dashboard.

The dashboard is available at: **Analytics and optimization > Analytics dashboards > AI Agent Performance**.

## Specify "Time range" and "Compare to" benchmark


Use the **Time range** filter to specify the date and time period for which you want to view data in the dashboard.

By default, the dashboard displays data for the last week. You can customize the time range to view data from as recent as the last 15 minutes or going back up to 3 months in history.

Use the **Compare to** filter to select a time period to compare your current data against. This allows you to identify trends and track improvements or issues over time.

## Self-service AI performance summary


This section shows health of your AI-Agent initiated Self-Service interactions. It displays the following key metrics for the selected time period filtered by ‘Self service’ usecase:
+ **AI involved contacts**: 

  Total count of contacts handled where AI agents resolved customer inquiries with out involving human agents.
+ **Active AI agents**:

   The total number of unique AI agents, where each agent is identified by its unique combination of Name and Version.
+ **Response completion rate**:

  The percentage of AI agent sessions that were successful in responding to incoming requests.
+ **Handoff rate**:

  Percentage of self service contacts handled by AI agents that was marked for needing additional support including but not limited to human agents.
+ **Avg. AI conversation turns**:

  Average number of conversation turns across AI-enabled contacts.

The following image shows an example **Self-service AI performance summary** chart.

![\[The self-service AI agent performance summary chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/self-service-ai-performance-summary.png)


## AI agent assistance performance summary


This widget shows the health of your agent-assisted interactions where AI provides support to human agents. It displays the following key metrics for the selected time period filtered by ‘Agent Assistance’ usecase.
+ **AI involved contacts**:

  Total number of contacts where AI Agents assisted human agents in resolving customer inquiries.
+ **Active AI agents**:

  The total number of unique AI agents, where each agent is identified by its unique combination of Name and Version.
+ **Response completion rate**:

  The percentage of AI agent sessions that were successful in responding to incoming requests.
+ **Proactive intent engagement rate**:

  Percentage of detected proactive intents clicked by human agents.
+ **Avg. AI conversation turns**:

  Average number of conversation turns across AI-enabled contacts.
+ **Avg. handle time**:

  Average handle time for contacts where AI Agents were engaged

The following image shows an example **AI agent assistance performance summary** chart.

![\[The AI agent assistance performance summary chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ai-agent-assistance-performance-summary.png)


## AI agents by version chart


On the **Evaluation score trend** chart you can view trends at intervals of 15 minutes, daily, weekly or monthly, and perform comparison with prior time period and resource benchmarks. The available intervals depend on time range selections. For example, for a Time Range of weekly, you can view trends at daily and weekly intervals. 

In addition to the page filters, you can also add filters to the chart for the evaluation form and the evaluation source. 

The following image shows an example **Evaluation score trend** chart.

![\[The AI agents by version chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ai-agents-by-version-chart.png)


## AI agents by invocation success rate


The AI agents by invocation success rate chart displays the invocation success rate for each AI agent. You can configure this widget further by filtering for specific AI agents, AI agent type, AI use case, or other dimensions directly from this chart. 

The following image shows an example **AI agents by invocation success rate** chart.

![\[The AI agents by invocation success rate chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ai-agents-by-invocation-success-chart.png)


## Knowledge base usage


This table provides a drill-down view of knowledge base articles referenced by your AI agents. You can expand by AI agent type and AI agent rows to drill down into specific knowledge base name to see how many times a knowledge base was referenced by AI agents.

**Metrics displayed:**
+ **Reference count** – Number of times the article was referenced by AI agents.

The following image shows an example **Knowledge base usage** table.

![\[The knowledge base usage table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/knowledge-base-usage.png)


## AI prompts by version


This table provides a drill-down view of AI prompt performance. You can expand the AI agent type and prompt type rows to drill down into specific prompt versions. To see how each version contributes to the overall prompt type performance, view the individual metrics for each prompt version row.

The table displays performance metrics at three levels:
+ **AI agent type level**:

  Aggregated metrics across all prompts and versions for an AI agent type
+ **AI prompt type level**:

  Aggregated metrics across all versions of a specific AI prompt type
+ **AI prompt version level**:

  Individual performance metrics for each AI prompt version

**Metrics displayed:**
+ **AI prompt invocation count**:

  Total number of times the AI prompt version was invoked
+ **AI prompt invocation success rate**:

  Percentage of AI prompt invocations that executed successfully
+ **Avg. AI prompt invocation latency**:

  Average invocation latency in milliseconds for the AI prompt version

In addition to using the page filters, you can add filters to the table for specific AI agents, AI prompts, time ranges, or other dimensions.

The following image shows an example **AI prompts by version** chart.

![\[The AI prompts by version success rate table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ai-prompts-by-version.png)


# Flows and conversational bot performance dashboard
Flows and conversational bot performance dashboard

The flows and conversational bot performance dashboard helps you understand the performance of your automated experiences including flows, flow modules, and conversational bots. You can compare key metrics such as flows started, average flow duration, or bot intent outcome over time. You can filter for specific bots or flows, and save reports to share across your organization. 

**Topics**
+ [

## Enable access to the dashboard
](#how-to-enable-access-to-the-flows-performance-dashboard)
+ [

## What do "dropped" and "prior dropped" mean?
](#dropped-prior)
+ [

## Examples of "Time range" and "Compare to" configurations
](#config-timerange-compareto)
+ [

## Performance overview chart
](#flows-dashboard-performance-overview-chart)
+ [

## Comparison to prior period charts
](#flows-dashboard-comparison-to-prior-period-charts)
+ [

## Failed bot intents movers and shakers
](#failed-bot-intents-movers)
+ [

## Bot conversations and success rate over time
](#bot-success-rate)
+ [

## Bot conversations overview table
](#bot-conversations-overview-table)
+ [

## Bot intent overview table
](#bot-intent-overview-table)
+ [

## Flow outcomes over time comparison chart
](#flow-outcomes-over-time-comparison-chart)
+ [

## Flow durations over time comparison chart
](#flow-duration-over-time-comparison-chart)
+ [

## Flows and Flow modules overview tables
](#flow-and-flow-module-overview-tables)
+ [

## Dashboard functionality limitations
](#dashboard-functionality-limitations)

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:
+ **Access metrics - Access** permission or the **Dashboard - Access** permission. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
+ **Flows - View**, **Flow modules - View**, and **Bot - View** permissions: These permissions are required to see data in your dashboard. 
**Note**  
You must have the **Flows - View** permission to see the dashboard.

## What do "dropped" and "prior dropped" mean?


The following terms are used in this topic:
+ **Dropped**: The count of flows that started running within the specified start and end time, and then ended with a contact dropping from the flow before the flow reached a terminal block. For example, a block that is intended to end the contact.
+ **Prior dropped**: The count of flows in the time range being "compared to" that started running, and then ended with a contact dropping from the flow before the flow reached a terminal block. The time range selected from the **Compare to** dropdown must be a date in the past compared to your time range.

## Examples of "Time range" and "Compare to" configurations


Following are a few use cases that help explain how to configure the **Time range** and **Compare to** settings.
+ **Use case 1**: I want to get all the flows dropped in the last 2 hours and compare that to the flows dropped in the last 2 hours prior to the 2 hours selected time range.

  Configure the dashboard as follows:
  + Time range = Trailing
  + Time = 2h
  + Compare to = Prior 2h  
![\[Time range = Trailing, Time = 2h, Compare to = Prior 2h.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/timerange1.png)
+ **Use case 2**: I want to get all the flows dropped in the last 2 hours and compare that to the flows dropped yesterday from 00:00:00 to 23:59:59.

  Configure the dashboard as follows:
  + Time range = Trailing
  + Time = 2h
  + Compare to = Prior day  
![\[Time range = Trailing, Time = 2h, Compare to = Prior day.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/timerange2.png)
+ **Use case 3**: I want to get all the flows dropped in the last 24 hours and compare that to the flows dropped on the same day last week.

  Configure the dashboard as follows:
  + Time range = Trailing
  + Time = Custom 24h
  + Compare to = Prior week same day  
![\[Time range = Trailing, Time = Custom 24h, Compare to = Prior week same day.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/timerange3.png)
+ **Use case 4**: I want to get all the flows dropped since 12 am today and compare that to all the flows dropped last week.

  Configure the dashboard as follows:
  + Time range = Trailing
  + Time = Custom: Today (since 12am)
  + Compare to = Prior week  
![\[Time range = Trailing, Time = Custom: Today (since 12am), Compare to = Prior week.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/timerange4.png)

## Performance overview chart


 The **Performance overview** chart provides aggregated metrics based on your filters. Each metric within the charts is compared to your "compare to" benchmark time range filter. For example, flows started during your time range selection was 200,000 which is down 15% compared to your benchmark number of flows started, 235,000. The percentages are rounded up or down. The colors that appear for the dropped in flow metric indicate negative (red) compared to your benchmark. 

The following image shows an example of this chart.

![\[The Performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flows-dashboard-performance-overview-chart.png)


The following metrics are displayed on this chart:
+  **Flows started:** The count of flows that started running within the specified start time and end time. 
+  **Transferred from flow to queue or agent:** The count of flows that started running within the specified start time and end time and ended with a contact transferring from the flow to a queue or agent. 
+  **Dropped in flow:** The count of flows that started running within the specified start time and end time and ended with a contact dropping from the flow before the flow reached a terminal block. 
+  **Disconnected in flow:** The count of flows that started running within the specified start time and end time and ended with a contact reaching a disconnect terminal block 
+  **Avg duration – transferred to queue:** The average flow duration for the specified start time and end time of selected flows where the flow outcome is transferred to queue. 
+  **Avg duration – disconnected:** The average flow duration for the specified start time and end time of selected flows where the flow outcome is disconnected participant. 

## Comparison to prior period charts


 The **Top flows by dropped in flow rate** and **Top flows transferred to queue or agent rate** charts display the current period metric and the "Compare to" period metric for the top ten flows sorted (from highest to lowest) by the current period metric. These charts allow you to identify the flows contributing most to overall dropped or transferred contacts. 

To see all data, choose the More icon in the top right of the chart, and then choose **Expand**. The following image shows the **Top flows by dropped in flow rate**. An arrow points to the location of the More icon.

![\[The Top flows by dropped in flow rate.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flows-dashboard-comparison-to-prior-period-charts.png)


## Failed bot intents movers and shakers


The **Failed bot intents movers and shakers** chart shows you the bot intents with the highest percent change in failed rate compared to your benchmark time range. For example, if an intent has a failed rate of 10% in the current period and 5% in the previous period, the intent will have a percent change of 100%. 

The following image shows an example of this chart.

![\[The Failed bot intents movers and shakers chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/failed-bot-intents-movers-shakers.png)


The following metrics are displayed on this chart:
+ **Change %**: (Bot intent failed rate % – Prior bot intent failed rate %) / (Prior bot intent failed rate %). This number is rounded. The chart is sorted by highest absolute Change %.
+ **Bot intent failed rate**: Bot intent failed rate during the specified current time range. 
+ **Prior bot intent failed rate**: Bot intent failed rate during the specified benchmark time range. 
+ **Bot intents completed**: Count of bot intent triggers completed in the specified current time range. 

## Bot conversations and success rate over time


The **Bot conversations and success rate** over time trend is a time-series chart that displays the count of bot conversations (blue bars) and the bot conversation success rate (red line) over a given time period broken down by intervals (15min, daily, weekly, monthly).

To configure different time range intervals, choose **Interval**, as shown in the following image.

![\[The Bot conversations and success rate over time chart, the Interval box.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/bot-conversations-success-rate.png)


## Bot conversations overview table


The **Bot conversations** overview table displays a snapshot of bot conversation metrics aggregated over the selected time range. The following image shows an example of this table.

![\[The Bot conversations overview table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/bot-conversations-overview-table.png)


The following metrics are displayed on this table:
+ **Bot conversation**: The count of bot conversations that started within the specified time range.
+ **Bot success rate**: The percentage of successful conversations / total bot conversations. The completion of the final intent in the conversation is categorized as a success. 
+ **Bot failed rate**: The percentage of failed conversations / total bot conversations. The failure to fulfill final intent is categorized as failed.
+ **Bot dropped rate**: The percentage of dropped conversations / total bot conversations. Drops are categorized when the customer doesn't respond before the conversation is categorized as a success or failed (for example, they are disconnected unexpectedly from the interaction). 
+ **Avg turns in bot**: The average number of turns (that is, a single request from the contact to the bot) for bot conversations that started within the specified time range.
+ **Avg bot conversation duration**: The average duration for bot conversations that started within the specified time range.

## Bot intent overview table


The **Bot intent** overview table displays a snapshot of bot intent metrics table aggregated over the selected time range. The following image shows an example of this table.

![\[The Bot intent overview table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/bot-intent-overview-table.png)


The following metrics are displayed on this table:
+ **Bot intents completed**: The count of intent triggers that ended within the specified time range. 
+ **Bot conversation outcome rate**: The percentage of bot intent triggers that ended within the specified time range broken down by mutually exclusive and exhaustive list of bot intent outcomes. 
+ **Intent success rate**: The number of times the intent was successful / the number of times the intent was invoked. Success is defined as the bot successfully fulfilling and completing the intent. 
+ **Intent failed rate**: The number of times the intent was failed / the number of times the intent was invoked. Failed is defined as either the user declined the confirmation prompt or the bot switches to the Fallback Intent before completion. 
+ **Intent dropped rate**: The number of times the intent was dropped / the number of times the intent was invoked. Dropped is defined as the user respond before the intent is categorized as a success or failed (for example, they are disconnected unexpectedly from the interaction).
+ **Intent switched rate**: The number of times the intent was switched / the number of times the intent was invoked. Switched intents occur when the bot recognizes a different intent and switches to that intent instead, before the original intent is categorized as a success or failed.

## Flow outcomes over time comparison chart


 The **Flow outcomes over time comparison** chart is a time-series chart that displays the breakdown of Flow outcome rate metrics for a single flow or multiple flows over a given time period and broken down by intervals (15min, daily, weekly, monthly). 

You can configure different time range intervals by using the "Interval" button directly in the widget. The intervals that you can select depend on the page-level time range filter. For example:
+ If you have a "Today" time range filter at the top of your dashboard, you can only see an interval of 15min for the last 24 hours.
+  If you have a "Day" time range filter at the top of your dashboard, you can see a trailing 8 day interval trend, or a 15min interval trend for the trailing 24 hours.

![\[The Flow outcomes over time comparison chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-outcomes-over-time-comparison-chart.png)


## Flow durations over time comparison chart


 The **Flow durations over time comparison** chart is a time-series chart that displays the breakdown of Flow duration metrics for a single flow or multiple flows over a given time period and broken down by intervals (15min, daily, weekly, monthly). 

 You can configure different time range intervals by using the "Interval" button directly in the widget. The intervals that you select depend on the page-level time range filter. 

For example:
+ If you have a "Today" time range filter at the top of your dashboard, you can only see an interval of 15min for the last 24 hours.
+  If you have a "Day" time range filter at the top of your dashboard, you can see a trailing 8 day interval trend, or a 15min interval trend for the trailing 24 hours.

![\[The Flow durations over time comparison chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-duration-over-time-comparison-chart.png)


## Flows and Flow modules overview tables


The **Flows** and **Flow modules** overview tables display a snapshot of metrics aggregated over the selected time range. The following image shows an example of the **Flows** overview table.

![\[The Flows overview table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-and-flow-module-overview-tables.png)


The following image shows an example of the **Flow modules** overview table.

![\[The Flow modules overview table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-and-flow-module-overview-tables-2.png)


The following metrics are displayed on these tables: 
+  **Flow / flow module starts: **The count of flows that started execution within the specified start time and end time. For a given start and end time it will show the count of those flows whose start time is between the start and end interval specified. 
+  **Flow outcomes:** The count of flows that started execution within the specified start time and end time and ended with a specified mutually exclusive and exhaustive flow outcome. 
+  **Avg Flow Durations by outcome:** The average flow duration for the specified start time and end time with a specified mutually exclusive and exhaustive flow outcome.  

## Dashboard functionality limitations


 The following limitations apply to the Flows performance dashboard: 
+  Tag-based access controls are not currently supported by the dashboard. You can restrict access through the Dashboard permissions pertaining to a security profile.  
+  No support for metrics on flows that are type Customer hold and Agent hold. For customer hold metrics, see [Metric definitions in Amazon Connect](metrics-definitions.md). 

# Outbound campaigns performance dashboard
Outbound campaigns performance dashboard

You can use the outbound campaigns performance dashboard to understand the performance of your outbound campaigns across your email, SMS, and telephony delivery modes. You can view and compare campaigns performance over a configurable period of time using key metrics such as delivery attempts, delivered rate, human answered rate, campaign contact abandoned rate, spam, bounces and more. 

**Topics**
+ [

## Enable access to the dashboard
](#campaigns-dashboard-enable-access)
+ [

## Campaign performance overview chart
](#campaigns-perf-overview-chart)
+ [

## Campaign progress over time chart
](#campaigns-progress-over-time-chart)
+ [

## Campaign progress comparison chart
](#campaigns-progress-comparison-chart)
+ [

## Delivery classification stacked bar charts
](#delivery-classification-chart)
+ [

## Campaign metrics by recipients table
](#campaign-metrics-recipients-table)
+ [

## Campaign send exclusions breakdown
](#campaign-send-exclusions-breakdown)
+ [

## Campaign metrics table
](#campaign-metrics-table)
+ [

## Dashboard functionality limitations
](#campaign-dashboard-functionality-limitations)

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:
+ **Access metrics - Access** permission or the **Dashboard - Access** permission. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
+ **Outbound Campaign - Campaigns - View** permission: This permission is required to view outbound campaigns data on the dashboard.

## Campaign performance overview chart


The Campaign performance overview chart provides aggregated metrics based on your filters. Each metric within the chart is compared to your "compare to" benchmark time range filter. 

The following image shows an example chart for a telephony campaign. It shows the following information:
+ Delivery attempts during your time range selection was 35,600 which is down 1% compared to your benchmark of Prior day same time range and time with 36,000
+ The percentages are rounded up or down.
+ The colors that appear for the metrics indicate positive (green) or negative (red) compared to your benchmark.

![\[The Telephony campaign performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-telephony-metrics.png)


The following image shows an example chart for an SMS campaign.

![\[The SMS campaign performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-sms-metrics.png)


The following image shows an example chart for an email campaign.

![\[The Email campaign performance overview chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-email-metrics.png)


The following image shows an example chart for a WhatsApp campaign.

![\[The WhatsApp campaign performance overview chart showing metrics including delivery attempts and read count.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-whatsapp-metrics.png)


**Note**  
The widget must be manually added to your dashboard. Refer to [Add or remove widgets on a dashboard](dashboard-customize-widgets.md#dashboard-add-widgets), then locate the `WhatsApp campaign performance` widget under the Campaign section.

The charts include the following metrics:
+ **Delivery attempts**: The count of outbound campaign contacts dialed by the Amazon Connect dialer. 
+ **Human answer rate**: The count of outbound campaign calls that were connected to a live customer divided by total dials attempted. This metric is only available with answering machine detection enabled. 
+ Voicemail with beep rate: The count of outbound voice campaign contacts that were answered by a voicemail with a beep divided by total Dials attempted. This metric is only available with answering machine detection enabled. 
+ **Voicemail rate**: The count of outbound campaign calls that were answered by a voicemail divided by total dials attempted. This metric is only available with answering machine detection enabled. 
+ **Campaign contacts abandoned after 2 seconds rate**: The percentage of outbound campaign calls that were connected to a live customer but did not get connected to an agent within 2 seconds, divided by the count of outbound campaign calls that were connected to a live customer. This metric is only available with answering machine detection enabled.
+ **Avg. dials per minute**: The average of outbound campaign contacts dialed per minute by the Amazon Connect dialer. 
+ **Send attempts**: The count of outbound campaign send requests sent by Amazon Connect for delivery. A campaign send request represents an attempt made to reach out to an recipient by email, SMS, or a telephony dial. 
+ **Delivered rate**: The percentage of delivered and successful messages over the total number of outbound campaign send attempts. 
+ **Spam**: The count of SMS messages identified as spam by the mobile carrier. 
+ **Complaint**: The count of email messages reported as spam or unsolicited email by the recipients. 

**Note**  
 By default, data for deleted campaigns won't appear in the dashboard. The Performance overview chart includes data from deleted campaigns when there is no campaign filter selected. You can apply a campaign filter to filter out deleted campaign data. 

## Campaign progress over time chart


The Campaign progress chart is a time-series chart that displays the Dials attempted metric per campaign over a specific time period broken down by intervals (15min, daily, weekly, monthly). 

To configure different time range intervals, choose **Interval**, as shown in the following image. 

![\[The campaign progress over time chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-campaign-progress.png)


The available intervals depend on the page-level time range filter at the top of the page. For example:
+ If you have a **Trailing** time range filter at the top of your dashboard, you can only see an interval of 15min for the last 24 hours.
+ If you have a **Day** time range filter at the top of your dashboard, you can see a trailing 8 day interval trend, or a 15min interval trend for the trailing 24 hours.

 You can use the Subtype filter to select the type of campaign delivery mode you want to track. This filter applies only to the widget. 

This widget holds up to 5 campaigns sorted in alphabetical order. If you are filtering for more than 5 campaigns, additional campaigns will not display in the visualization. You can select specific campaign(s) you want to see in this visual by using the campaign filter.

## Campaign progress comparison chart


The Campaign progress comparison chart shows the Send attempts metric in its current period broken down by campaign, compared to the Prior send attempted metric from the "compare to" benchmark time range selected. You can use the Subtype filter to select the type of campaign delivery mode you want to track. This filter applies only to the widget. This chart is sorted by Send attempts in descending order from left to right. 

This widget holds up to 10 campaigns. If you are filtering for more than 10 campaigns, additional campaigns will not display in the visualization. You can select specific campaign(s) you want to see in this visual by using the campaign filter. 

![\[The campaign delivery breakdown chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-campaign-progress-comparison.png)


## Delivery classification stacked bar charts


The Telephony, SMS, Email, and WhatsApp classification by campaign charts drill down into the delivery outcomes of each delivery attempt for each campaign delivery mode. The charts show the count of each delivery classification across a campaign. 

### Telephony classification stacked bar chart


This chart shows the telephony classifications that include the following AMD (Answering Machine Detection) statuses: 
+ Human answered
+ Voicemail with beep
+ Voicemail with no beep
+ AMD unanswered
+  AMD unresolved
+ AMD not applicable
+ Any remaining classifications grouped under Other

For the full list of available telephony classifications, see DisconnectReason for outbound campaigns and AnsweringMachineDetectionStatus in the [ContactTraceRecord](ctr-data-model.md#ctr-ContactTraceRecord). This chart is most effective with [answering machine detection enabled](outbound-campaign-best-practices.md#machine-detection-oc). 

The following image shows a sample Telephony classification stacked bar chart.

![\[The Telephony classification stacked bar chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-telephony-classification.png)


### SMS classification stacked bar chart


This chart shows the following delivery outcomes:
+ Delivered
+ Successful
+ Invalid
+ Any remaining classifications—such as Invalid message, Blocked, and Spam—are grouped under Other.

For the full list of available SMS events, see `campaign_event_type` in the [Outbound campaign events](data-lake-outbound-campaigns-data.md#data-lake-oc-events) table. 

The following image shows a sample SMS classification stacked bar chart.

![\[The SMS classification stacked bar chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-sms-classification.png)


### Email classification stacked bar chart


The Email classifications displayed include the following delivery outcomes:
+ Delivered
+ Bounce
+ Reject
+ any remaining classifications grouped under Other

For the full list of available email events, see `campaign_event_type` in the [Outbound campaign events](data-lake-outbound-campaigns-data.md#data-lake-oc-events) table. 

The following image shows a sample Email classification stacked bar chart.

![\[The Email classification stacked bar chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-email-classification.png)


### WhatsApp classification stacked bar chart


The WhatsApp classifications displayed include the following delivery outcomes:
+ Delivered
+ Failed
+ Any remaining classifications grouped under Other

For the full list of available WhatsApp events, see `campaign_event_type` in the [Outbound campaign events](data-lake-outbound-campaigns-data.md#data-lake-oc-events) table.

The following image shows a sample WhatsApp classification stacked bar chart.

![\[The WhatsApp classification stacked bar chart showing delivery outcomes by campaign.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-oc-whatsapp-classification.png)


**Note**  
The widget must be manually added to your dashboard. Refer to [Add or remove widgets on a dashboard](dashboard-customize-widgets.md#dashboard-add-widgets), then locate the `WhatsApp classification by campaign` widget under the Campaign section.

## Campaign metrics by recipients table


A detailed view of recipient-level outbound campaigns metrics over the selected time range, with drill-down capabilities to view metrics for individual campaign executions.

Metrics include:
+ Recipients targeted: The count of outbound campaign recipients identified as the target audience for the campaign.
+ Recipients attempted: An approximate count of outbound campaign recipients attempted for delivery.
+ Campaign progress rate: The percent of outbound campaign recipients attempted for delivery, out of total number of recipients targeted.
+ Recipients interacted: The approximate count of outbound campaign recipients who interacted with the engagement after a successful delivery attempt. Example interactions include: Open, Click, Complaint

**Note**  
Campaign execution breakdown is only available for segment-based campaigns. If removed from the grouping, it must be re-added through a new table.

## Campaign send exclusions breakdown


A detailed view of campaign send exclusions, including reasons why outbound engagements were excluded from sending.

Metrics include:
+ Campaign send exclusion: The count of outbound campaign send attempts that were excluded from the targeted segment during a campaign execution. Example exclusion reasons include: MISSING\$1TIMEZONE, MISSING\$1CHANNEL

![\[Campaign metrics by recipients table screenshot\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/campaign-metrics-recipients-table.png)


## Campaign metrics table


A detailed view of outbound campaigns metrics aggregated over the selected time range. 

![\[The Campaign metrics table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/campaign-metrics-table.png)


This table includes the following metrics.
+ **Campaign send attempts**: The count of outbound campaign send requests sent by Amazon Connect for delivery. A campaign send request represents an attempt made to reach out to an recipient using email, SMS, or a telephony dial.
+ **Human answered**: The count of outbound campaign calls that were connected to a live customer. This metric is only available with answering machine detection enabled.
+ **Voicemail**: The count of outbound campaign calls that reached a voicemail. This metric is only available with answering machine detection enabled. 
+ Voicemail with beep: The count of outbound voice campaign contacts that reached a voicemail with beep. This metric is only available with answering machine detection enabled. 
+ Voicemail with no beep: The count of outbound voice campaign contacts that reached a voicemail with no beep. This metric is only available with answering machine detection enabled. 
+ Campaign contacts abandoned after 2 seconds: The count of outbound voice campaign contacts that were connected to a human but did not get connected to an agent within 2 seconds. This metric is only available with answering machine detection enabled. 
+ Avg. dials per minute: The average of outbound voice campaign contacts dialed per minute by the Amazon Connect voice dialer within the selected time range filter. 
+ **Campaign contacts abandoned after 2 seconds**: The count of outbound voice campaign calls that were connected to a human but did not get connected to an agent within 2 seconds. This metric is only available with answering machine detection enabled. 
+ **SMS successful**: The count of SMS messages successfully accepted by the recipient's carrier.
+ **SMS delivered**: The count of SMS messages delivered to the specified location. 
+ **SMS delivered total**: The total count of SMS messages delivered to the specified location and successfully accepted by the recipient's carrier. Whether a message results in a "delivered" or a "successfully" outcome depends on the country where the delivery is taking place. It is not possible to have both a delivered and successfully outcome for the same message.
+ **SMS spam**: The count of sms messages identified as spam by the mobile carrier.
+ **WhatsApp delivered**: The count of WhatsApp messages delivered.
+ **Read**: The count of WhatsApp messages opened by the recipients.
+ **Email delivered**: The count of email messages delivered. 
+ **Email complaint**: The count of email messages reported as spam or unsolicited email by the recipients.
+ **Email rejected**: The count of email messages with malware detected and got rejected. 
+ **Email opened**: The total number of times the email message was opened. 
+ **Email unique opened**: The number of unique recipients who opened the email message. 
+ **Email clicked**: The total number of times the email message was clicked. 
+ **Email unique clicked**: The number of unique recipients who clicked the email message. 

## Dashboard functionality limitations


The following limitations apply to the Outbound campaigns performance dashboard:
+ Tag-based access controls are not currently supported by the dashboard. You can restrict access through the Dashboard permissions pertaining to a security profile. 
+ Data for this dashboard is available starting from June 25, 2024 0:00:00 GMT for the Telephony delivery mode and November 6, 2024 0:00:00 GMT for the Email and SMS delivery modes. This may impact dashboard functionalities such as monthly benchmarks where data won't be available prior to June 25, 2024 0:00:00 GMT or November 6, 2024 0:00:00 GMT for comparison. 
+ Saved reports before November 6, 2024 0:00:00 GMT could contain stale data due to newly added feature enhancements. To ensure you have accurate data from the latest features, we recommend replacing any saved dashboards with the most recent version of the Outbound campaigns performance dashboard.

# Queue and agent performance dashboard in Amazon Connect
Queue and agent performance dashboard

The **Queue and agent performance** dashboard helps you understand the performance of your queues and agents compared over configurable periods of time. It uses key metrics such as contacts handled, service level, and average handle time. 

This dashboard includes:
+ Real-time statistics such as number of agents online and current agent activity. It has the capabilities and metrics that are available on the **Real-time metrics** page.
+ [Customer first callback mode](customer-first-cb.md#customer-first-callback-metrics) metrics. These metrics are only available on the dashboard and by calling the [GetMetricDataV2](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.html) API. They're not available on the Historical metrics report.

**Topics**
+ [

## Enable access to the dashboard
](#queue-performance-dashboard-enable-access)
+ [

## Performance overview chart
](#queue-performance-dashboard-performance-overview)
+ [

## Current queue overview
](#current-queue-overview)
+ [

## Current agent performance
](#current-agent-perf-overview)
+ [

## Agent adherence
](#agent-adherence-dashboard)
+ [

## Trailing agent performance
](#trailing-agent-performance)
+ [

## Average queue answer time and contacts queued trend
](#avg-queue-answer)
+ [

## Contacts handled and average handle time trend
](#queue-performance-dashboard-contacts-handled)
+ [

## Agent status drill down
](#agent-status-drill-down)
+ [

## Dashboard functionality limitations
](#queue-performance-dashboard-functionality-limitations)

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:
+ **Access metrics - Access permission** or the **Dashboard - Access permission**. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 

## Performance overview chart


The **Performance overview** chart that provides aggregated metrics based on your filters. Each metric within the chart is compared to your "compare to" benchmark time range filter. 

The following image shows an example **Performance overview** chart: 

![\[An example Performance overview chart in the dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/queue-performance-dashboards-performance-overview-chart.png)

+ **Contacts handled** during your time range selection was 126,306, which is down \$113% compared to your benchmark number of contacts handled, 144,647 contacts.
+ The percentages are rounded up or down. 
+ The colors that appear for the metrics indicate positive (green) or negative (red) compared to your benchmark.
+ There are no colors for **Contacts handled**.

## Current queue overview


The **Current queue overview** widget provides real-time snapshot metrics that display what is happening right now in your queues. You can configure this widget in multiple ways including changing the metrics (but only to real-time queue metrics), configuring the queues that are included, and re-ordering the metrics.

The following image shows an example **Current queue overview**.

![\[An example Current queue overview in the dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-current-queue.png)


## Current agent performance


The **Current agent performance** widget provides a real-time view of what agents are doing (equivalent to the real-time metrics page agent widget) including time in status, current active contacts, and the next activity. 

By default, this widget collapses the rows to give you an at a glance view of what agents are doing. Choose **Expand all** to automatically expand all the rows for a complete view of agent performance. 

With the appropriate security profile permissions, from this widget you can listen in to contacts and change agent statuses within this widget (similar to the real-time metrics page). 

**Note**  
You can't change the grouping of this widget.

The following image shows an example **Current agent performance**.

![\[An example of Current agent performance in the dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-current-agent-performance.png)


### Thresholds


You can also set thresholds on this widget, but several of the metrics behave slightly differently. For agent activity you need to select two conditions:
+ What the activity type is (for example, rejected)
+ The duration of that activity

You configure custom thresholds based on the state. For example, you can define a cell that should flip to red if an agent is in missed call state for more than 5 seconds but also only flip to red if an agent is on hold for more than 5 minutes.

The following image shows an example of thresholds set on the **Activity** metric.

![\[An example of thresholds set for the Activity metric.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-thresholds-3.png)


### Contact state filtering


You can filter by contact states to identify specific agents who have a contact within a specific state. For example, if you want to quickly identify agents who have a contact in error and can’t be routed additional contacts, you can filter for "Missed" and "Rejected" to identify those agents and change their status. 

The following image shows a list of some of the filters available for contact states.

![\[An example of the filters you can apply to Contact state.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-contact-state-filtering.png)


## Agent adherence


The **Agent adherence** widget provides a real-time view of agent adherence metrics, including adherence status, duration, and percentage, enabling supervisors to monitor and manage agent adherence. This widget supports filtering on adherence status, duration, and percentage, sorting by duration or percentage, and conditional formatting on duration and percentage to quickly identify adherence breaches and take prompt action to address issues.

For example, you can filter for agents with a **Non-adherent** status, sort by adherence duration, and highlight duration greater than 5 minutes to quickly identify breaches and send reminders to bring agents back on task. 

The following image shows an example of the **Agent adherence** widget. The red highlight is conditional formatting applied on the **Adherence status duration** (Adherence status duration >= 3 hours). The breach in the agent adherence is indicated by the **Non-adherent status**.

![\[The Agent adherence widget with conditional formatting.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-adherence-widget.png)


The following image shows an example of how to set up conditional formatting. 

![\[How to set up conditional formatting.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-adherence-status.png)


The following image shows an example of filtering the **Adherence status duration**. In this case, Amazon Connect will display only those agents who are not adherent for longer than 10 minutes. 

![\[A filter set for Adherence status duration.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-agent-adherence-status-duration1.png)


## Trailing agent performance


This table provides a historical view of performance over time. 

![\[An example of Trailing agent performance.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-trailing-agent-performance.png)


To see how your performance compares to the previous time range, choose **Actions**, **Edit**. On the **Edit** pane, choose **Show comparison**, as shown in the following image. 

![\[The Show comparison option in the Edit pane, the Prior information on the chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-add-comparisons.png)


 You can also change the metrics, configure thresholds, or re-order metrics.

## Average queue answer time and contacts queued trend


The **Average queue answer time and contacts queued trend** is a time-series chart that displays the count of contacts queued (blue bars) and the average queue answer time (red line) over a given time period broken down by intervals (15min, daily, weekly, monthly). You can also change the metrics and add up to four different metrics as line graphs.

**Note**  
This widget can support a maximum of two metric types (count, time, percentage).

The following image shows the Contacts queued (blue bars) and Avg queue answer time (red line), for four months.

![\[An example of Average queue answer time and contacts queued.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-average-queue-answer-time-trend.png)


This next image shows the same data, but with the addition of the **Contacts abandoned** (green) filter.

![\[An example of Average queue answer time with Contacts abandoned.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-contacts-abandoned.png)


## Contacts handled and average handle time trend


The **Contacts handled and average handle time trend** is a time-series chart that displays the count of contacts handled (blue bars) and the average handle time (red line) over a given time period broken down by intervals (15min, daily, weekly, monthly). 

To configure different time range intervals, choose **Interval**, as shown in the following image. 

![\[Contacts handled and average handle time trend chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/queue-performance-dashboards-contacts-handled-average-handle-time.png)


The available intervals depend on the page-level time range filter, which is set at the top of the page. For example:
+ If you have a "Today" time range filter at the top of your dashboard, you can only see an interval of 15min for the last 24 hours.
+  If you have a "Day" time range filter at the top of your dashboard, you can see a trailing 8 day interval trend, or a 15min interval trend for the trailing 24 hours.

## Agent status drill down


The **Agent status drill down** widget displays the number of agents logged into the Contact Control Panel (CCP), and their status. By default, the widget groups data by queue. For more detail, you can add **Agent status** as a secondary grouping to view agent count by their CCP status within each queue.

The following image shows an example of the **Agent status drill down** widget. It shows **Agent status** (for example, Training, Lunch) as a secondary grouping. 

![\[The Agent status drill down widget.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-status-drill-down.png)


## Dashboard functionality limitations


The following limitations apply to the Queue performance dashboard:
+ Tag-based access controls are not supported on the dashboard.

# Testing and simulation dashboard


The testing and simulation dashboard helps you monitor the quality and effectiveness of your automated testing across Amazon Connect flows. You can track key metrics such as test execution volume, success and failure rates, average test run duration, and failure patterns by step type. Use the dashboard to identify top failing tests and flows, compare performance against benchmark periods, and view execution trends over time. Filter by test case, flow, channel, or time range to optimize your validation strategy and ensure quality before production deployment.

## Enable access to the dashboard


Ensure users are assigned the appropriate security profile permissions:
+  **Access metrics - Access** permission or the **Dashboard - Access** permission. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md).
+  **Test Management > Test Cases - View** permissions: This permission is required to see data in your dashboard.

**Note**  
You must have the Test Cases - View permission to see the dashboard

## Test execution summary chart


The **Test Execution Summary Chart** provides aggregated metrics based on your selected filters. Each metric is compared to your "compare to" benchmark time range filter. For example, if test runs during your selected time range totaled 103, this represents a 26% decrease compared to your benchmark of 139 completed test runs. Percentages are rounded to the nearest whole number. Red coloring indicates negative performance compared to your benchmark.

The following image shows an example of this chart.

![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/test-simulate-dashboard-summary.png)

The following metrics are displayed on this chart
+ Total test runs: The count of test runs that started within the specified time range.
+ Test success rate: The percentage of test runs completed with a successful outcome.
+ Test failure rate: The percentage of test runs completed with a failed outcome.
+ Average test run duration: The average duration of all test runs that successfully started and completed.

## Top failing tests


The **Top Failing Tests** chart displays the test cases with the highest failure rates.

![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/test-simulate-dashboard-failure-testcase.png)

The following metrics are displayed on this chart
+ **Top Failure rate:** The percentage of test runs that failed for each specific test case.

## Top failing step type


The **Top Failing Step Type** chart shows the breakdown of failures by test case step type. There are five step types: test initialization, observe event, send instruction, assert data, and override system behavior. Each step type represents the detailed configuration for interactions you are simulating within your test cases.

![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/test-simulate-dashboard-failure-steptype.png)

The following metrics are displayed on this chart
+ **Test case step type:** These step types represent the detailed configured simulated interactions within your test cases. Each simulated interaction must have an "observe event" and may optionally include "send instruction," "assert data," and "override system behavior" configurations. Test initialization is executed at beginning of each test case run.
+ **Test case failure rate:** The percentage of failures for each specific test case step type.

## Average execution duration


The **Average Execution Duration** chart is a time-series visualization that displays test execution duration metrics for all test case executions over a specified time period, broken down by intervals (daily or weekly).

You can configure different time range intervals using the "Interval" button directly in the widget. Available intervals depend on your page-level time range filter.

For example:
+ With a "Daily" time range filter at the widget level, you can view a 7-day trailing interval trend.
+ With a "Weekly" time range filter at the widget level, you can view an 13-week trailing interval trend.

  ![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/test-simulate-dashboard-duration.png)

The following metrics are displayed on this chart
+ **Average test run duration:** The average duration of all test runs that successfully started and completed within a given interval.

## Flows with most failures


The **Flows with Most Failures** chart displays the flows with the highest failure rates from test cases testing those specific flows.

![\[alt text not found\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/test-simulate-dashboard-failures-flow.png)

The following metrics are displayed on this chart
+ **Test failure rate:** The percentage of total test runs that failed for each specific flow.

# Intraday forecast performance dashboard
Intraday forecast performance dashboard

The Intraday forecast performance dashboard provides forecasts for:
+ [Contact volume](metrics-definitions.md#contact-volume) and [Average handle time](metrics-definitions.md#average-handle-time) for queues that have a minimum of 2000 unique contacts per week per queue-channel for the last 4 weeks. This is evaluated every day for the trailing time period. 
+  [Average queue answer time](metrics-definitions.md#average-queue-answer-time) for queues that have 5000 unique contacts per month with the same evaluation timing.

**Topics**
+ [

## Enable access to the dashboard
](#intraday-forecast-performance-dashboard-enable-access)
+ [

## Performance overview chart
](#intraday-forecast-performance-dashboard-performance-overview)
+ [

## Comparison trend graphs
](#intraday-forecast-comparison-trend-graphs)
+ [

## Comparison against short term forecasts
](#intraday-forecast-comparison-shortterm)
+ [

## Daily projection chart
](#intraday-forecast-daily-projection)

## Enable access to the dashboard


Ensure users are assigned the appropriate **Analytics and Optimization** security profile permissions:
+ **Access metrics - Access permission** or the **Dashboard - Access permission**. For information about the difference in behavior, see [Assign permissions to view dashboards and reports in Amazon Connect](dashboard-required-permissions.md). 
+ **Forecasting - View**. If you don't see this permission on the security profiles page, ask your Administrator to [enable forecasting, capacity planning, and scheduling](enable-forecasting-capacity-planning-scheduling.md) in the AWS console. 

## Performance overview chart


The **Intraday trailing performance overview** chart that provides aggregated metrics based on your filters. Each metric in the chart is compared to your "compare to" benchmark time range filter. 

The following image shows an example **Intraday trailing performance overview** chart: 

![\[The performance overview chart in the dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/intraday-perf-overview-chart.png)


This chart shows the following information:
+ Contact volume during your time range selection was 1,213.
+ This is down \$113% compared to your benchmark number of contacts handled.
+ The percentages are rounded up or down.
+  The colors that appear for the metrics indicate positive (green) or negative (red) compared to your benchmark. 

## Comparison trend graphs


The Intraday performance dashboard displays the following three trend graphs, which cover different metrics: 
+ [Contact volume](metrics-definitions.md#contact-volume)
+ [Average handle time](metrics-definitions.md#average-handle-time)
+  [Average speed of answer](metrics-definitions.md#average-queue-answer-time) 
+  [Effective staffing](metrics-definitions.md#effective-staffing) 

These graphs include the intraday forecast that projects up to 24 hours on a 15 minute interval based on:
+ The value of the respective metric.
+ The historical actuals from the current day.
+ The historical actuals from the same time in the past week.

These trend graphs provide data only for the next 24 hours and the past 24 hours. There is no option to change the time range. 

The following image shows an example of a **Contact volume** trend graph.

![\[The Contact volume trend graph.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/intraday-perf-trend-graph.png)


## Comparison against short term forecasts


You can compare **Average handle time** and **Contact volume** against published short term forecasts. 

To select this option, choose the compare to button and select **Short-term published forecast**. This automatically picks up the published short term forecast for the time range selected. You can't select an unpublished forecast or a specific published forecast. 

For historical widgets, it compares against the same time range as the widget, while for the daily projection widget it compares against the entire day. 

This is the new default comparison for this dashboard. 

![\[The Short-term published forecast option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/intraday-shortterm.png)


## Daily projection chart


The **Daily projection** chart provides a projection of how the day will end by combining historical metrics for the day so far with intraday forecasts for the remainder of the day. This is available for the following metrics: 
+ [Average handle time](metrics-definitions.md#average-handle-time)
+  [Average queue answer time](metrics-definitions.md#average-queue-answer-time) 
+ [Contact volume](metrics-definitions.md#contact-volume)
+  [Effective staffing](metrics-definitions.md#effective-staffing) 

This widget only supports comparing against short term forecasts for **Contact volume** and **Average handle time**.

![\[The Daily projection chart.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/intraday-daily-projection.png)


# Access the performance dashboard directly in the agent workspace
Agent workspace performance dashboard

You can enable users to view queue and agent performance metrics through the agent workspace. Agents can view their own metrics for the queues and contacts they work on. For example: 
+ **Current agent performance**: [Agent duration](metrics-definitions.md#duration-real-time), [Capacity](metrics-definitions.md#capacity-real-time), [Availability](metrics-definitions.md#availability-real-time), [Active](metrics-definitions.md#active-slots).
+ **Current queue performance**: [Contacts in queue](metrics-definitions.md#contacts-in-queue), [Agents on contact](metrics-definitions.md#agents-on-contact), [Agents available](metrics-definitions.md#available-real-time), [Agents in error](metrics-definitions.md#agent-error), [Agents in NPT](metrics-definitions.md#agent-non-productive), [Agents online](metrics-definitions.md#online-agents), [Agents staffed](metrics-definitions.md#staffed-agents), [Agents in ACW](metrics-definitions.md#agent-after-contact-work), [Contacts Scheduled](metrics-definitions.md#scheduled), [Oldest contact age](metrics-definitions.md#oldest-real-time) 
+ **Trailing agent performance**: [Contacts handled](metrics-definitions.md#contacts-handled), [Avg handle time](metrics-definitions.md#average-handle-time), [Avg after contact work time](metrics-definitions.md#average-after-contact-work-time), [Agent non-response](metrics-definitions.md#agent-non-response), [Avg customer hold time](metrics-definitions.md#average-customer-hold-time), [Agent answer rate](metrics-definitions.md#agent-answer-rate).
+ **Trailing queue performance**: [Contacts handled](metrics-definitions.md#contacts-handled), [Contacts queued](metrics-definitions.md#contacts-queued), [Avg handle time](metrics-definitions.md#average-handle-time), [Avg. queue answer time](metrics-definitions.md#average-queue-answer-time), [Avg. after contact work time](metrics-definitions.md#average-after-contact-work-time), [Contacts abandoned](metrics-definitions.md#contacts-abandoned), [Contacts transferred out](metrics-definitions.md#contacts-transferred-out).

Agents can't customize their view of the performance metrics dashboard or take any other action such as saving or downloading it. 

You can customize what metrics and widgets appear on the agent's dashboard. You then integrate your customized dashboard as a third-party app into the agent workspace. For an overview of steps, see [Integrate a published dashboard into the agent workspace](integrate-published-dashboard.md).

The following image shows an example of the **Agent workspace performance dashboard** as it appears in the agent workspace. Notice it appears on the **Performance metrics** tab.

![\[The agent workspace, the Performance metrics tab, the Agent workspace performance metrics dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-workspace-perf-dashboard.png)


## Assign permissions
Assign permissions

Assign users the following permissions in their security profile so they can access the **Agent workspace performance dashboard**:
+ Assign to agents:
  + **Agent Applications** - **Performance metrics** - **Access**: Displays the **Performance metrics** option in the **Apps** dropdown menu in the agent workspace.
  + **Analytics and Optimization** - **View my own data in dashboards** - **View**: Grants access to the Dashboards to view individual agent performance metrics and the metrics of queues in the agent's routing profile.
+ If supervisors or managers want to view the dashboard in the agent workspace, assign them the **Agent Applications - Performance metrics - Access** permission, and one of the following permissions: 
  + **Analytics and Optimization** - **Dashboards** - **Access**: Grants access to only the **Dashboards** tab.
  + OR, **Analytics and Optimization** - **Access metrics** - **Access**: Grants access to all the tabs on the **Dashboards and reports** page.

## View the Agent workspace performance dashboard
View the Agent workspace performance dashboard

1. Access the agent workspace using the following URL:
   + **https://*instance name*.my.connect.aws/agent-app-v2/**
   + If you access your instance using the awsapps.com domain, use the following URL: **https://*instance name*.awsapps.com/connect/agent-app-v2/** 

   Where *instance name* is provided by your IT department or the individuals that set up Amazon Connect for your business.

1. In the agent workspace, choose the **Apps** dropdown menu, and then choose **Performance metrics** to display the **Agent workspace performance dashboard**.

   The following image shows the **Apps** option and the **Performance metrics** tab on the agent workspace.  
![\[The Agent workspace performance dashboard.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/perf-metrics.png)

## Limitations


The following limitations apply when accessing the **Agent workspace performance dashboard** in the agent workspace:
+ Agents can't customize the dashboard. For example, they can't add or remove widgets or metrics, or save the dashboard as a saved report.
+ Agents can't take actions on the dashboard. For example, they can't download or share the dashboard.

# Integrate a published dashboard into the agent workspace
Integrate a published dashboard into the agent workspace

You can create a customized dashboard, and then surface it in the agent workspace. You may want to do this if you don't want agents to have access to all the widgets or metrics on the default **Agent workspace performance dashboard**.

**How often do embedded dashboards and widgets refresh?**
+ Dashboards and widgets embedded in the agent workspace refresh every 2 minutes.
+ Embedded timeseries widgets refresh every 15 minutes.
+ There are some use cases where the embedded dashboard refreshes sooner than 2 minutes. For example, when an agent manually refreshes the dashboard, or they receive a new contact.

Following is a high-level overview of how you integrate a published dashboard in the agent workspace.

1. Publish your Amazon Connect dashboard. For instructions, see [Publish reports](publish-reports.md). 

1. Integrate your published Amazon Connect dashboard into the agent workspace. For instructions, see [Integrate third-party applications (3p apps)](3p-apps.md). 
**Note**  
When you perform this step, ensure the access URL includes `&_appLayoutMode=embedded` at the end. This ensures the website navigation and header are hidden.

1. Assign permissions to the agent's security profile so they can access and view the saved report and the dashboard.
   + Assign the following Analytics and Optimization permissions:
     + **Saved reports - View**: Grants permission to view the published dashboard.
     + **View my own data in dashboards - View**: Grants access to the Dashboards to view individual agent performance metrics and the metrics of queues in the agent's routing profile. 

   They don't need permission to **Agent Applications - Performance metrics - Access** because instead you're giving them permissions to your published report.

1. If supervisors or managers also want to view published dashboard in the agent workspace, assign them the following Analytics and Optimization permissions:
   + **Saved reports - View**: Grants permission to view the published dashboard.
   + Assign one of the following permissions: 
     +  **Dashboards - Access**: Grants access to only the **Dashboards** tab.
     + OR **Access metrics - Access**: Grants permission to all the tabs on the **Dashboards** page, such as Real-time metrics reports and Historical metrics reports.

# [New] Custom Metrics


## Overview


If your Connect instance is enabled Ultimate AI, you can create and manage custom metrics with advanced filters and functions on metric primitives and have them available for your dashboards. 

**Topics**

## Manage your custom metrics


In the Dashboards and reports, you will find "Custom metrics" under Dashboards tab that list all the custom metrics in your instance. Custom service level metrics that were created via the custom dashboards will be listed and can be managed here as well. 

You can do character matching quick search on the metric name or description by entering on the search text box.

You can select a metric to edit, delete or clone. Clicking on the metric name in the listing page leads you to the full view of the custom metric.

![\[The Custom metrics table with search functionality in Dashboards and reports.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-custom-metric-table-with-search.png)


## Create, Edit custom metric


To create a custom or edit a metric, navigate to Dashboards and reports page “Custom metrics” section. Click on the “Create metric” button to create a metric or select an existing metric and click on “Edit” button.

When creating a custom metric, you need to choose if the metric is for Service level configuration or and advanced metric using metric builder.
+ **Service level configuration** - Set exclusion criteria and define answer time, abandon time thresholds for service level calculations
+ **Metric builder** - Create advanced custom metrics with metric primitives using mathematical operations and functions. Please see [custom metric primitives](https://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html) for more information.

### Service Level Configuration

+ **Metric name**:- Enter a unique name (maximum 128 characters)
+ **Description (optional)**: Provide details about the metric's purpose (maximum 500 characters)
+ **Target time**: Specify the service level threshold.
  + **Length**: Enter a value between 1 second and 7 days
  + **Unit**: Select seconds, minutes, hours, or days
+ **Excluded contact outcomes**: Choose which types of contacts to exclude from the denominator:
  + **Contacts transferred**
  + **Contacts resulted in callbacks**
  + **Contacts abandoned in X seconds/minutes/hours/days**
+ The service level calculation preview updates automatically as you configure these settings. The preview shows:
  + The calculation formula.
  + A plain language explanation of what the metric measures.
  + The percentage of contacts answered within your target time, excluding any contact types you specified.

![\[The Service Level Configuration editor showing configuration options for custom service level metrics.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-service-level-editor.png)


### Metrics Builder


The metrics builder is an interactive editor that allows you to define an advanced custom metric with metric primitives and mathematical operators. For the full list of primitives and operators, and examples of advanced custom metrics, please see [link](https://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html)

**Steps to create a custom metrics with Metric Builder:**

1. Click on the “Create Metric” button on the main dashboard page.

1. In the “Create Custom Metric” page, select the “Metric Builder” option.

1. Start by defining the components for a custom metric. 

1. For example, we want to create a rate metric that calculates the percentage of total contacts handled that are SMS that is a channel subtype of Chat. 

   1. Specify “M1” or any variable name for “contacts handled”, then add optional filters: channel = “Chat” and subtype = “SMS”.

   1. Next specify “M2” for another metric primitive. For example, “contacts handled” with no filters.

1. In the definition, specify “100 \$1 SUM(M1) / SUM(M2)” which will be a rate metric that defines sum of all contacts handled for chat SMS channel versus all contacts handled.

1. Select display format as “Percent”.

1. Select appropriate value for optional field positive trend indicator.

1. Specify a unique name for your metric.

1. Add appropriate description for your metric.

1. Check if there are any errors in the form, the "Save" button will automatically become enabled at the bottom of the page once there are no errors.

1. Click “Save” at the bottom of the page to create your custom metric.

1. When this custom metric is added to a widget, appropriate grouping will apply to the metric.

**Components**

A component represents the metric primitive or base metric expression that can be referenced as the variable for the metric formula that will be entered via the definition editor.
+ Maximum of 5 metric components can be added. 
+ Component identifier
  + Starts with underscore or letter followed by letters, numbers or underscores only.
  + Should be unique across the added components.
+ Metric
  + Metric primitive to attach with the respective component.
  + Refer [link ](https://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html) to see what metric primitives can be used together among different components
+ Filters and thresholds
  + Applies filters and thresholds to a selected metric.
  + Existing filters and thresholds will be removed upon selecting a new metric.
  + Can apply up to 5 filters for any selected metric.
  + Can select up to 10 values for a particular filter.
  + Refer [link](https://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html#supported-metric-filters) for supported filter values.
  + Optional

**Note**  
A custom metric utilizing a metric primitive of `Current Contact` category can only support at most 1 component.

**Definition:**

Define an expression using component identifiers, available mathematical operators and functions. The expression will be evaluated to calculate a custom metric value.
+ Refer [link](https://docs.aws.amazon.com/connect/latest/adminguide/metric-primitive-definitions.html) for supported mathematical operators, functions and sample expressions.
+ The definition section requires users to add at least one component.
+ Up to 1024 characters are allowed in the expression.

**Note**  
This section is disabled and cannot be used when a `Current Contact` metric primitive is used to build a custom metric.

**Example**  
**Display format:**  
Specifies the display format for calculated custom metric value on dashboards.  
+ Percent - “%” added to the end of the calculated custom metric value display
+ Integer - integer value on the calculated custom metric. If the calculated metric is “3.141592”, the value will be “3.00”
+ Double - decimal value on the calculated custom metric. If the calculated metric is “3.141592”, the displayed value will be “3.142” after rounding up to 3 decimal places.
+ Seconds - “HH:MM:SS” formatted value on the calculated custom metric.
**Positive trend indicator:**  
+ Positive - changes will be shown with a green arrow
+ Negative - changes will be shown with a red arrow
+ Neutral - changes will be shown without any indicators.
+ Optional
**Metric name:**  
+ Up to 128 characters
+ Should be unique
**Description:**  
+ Up to 500 characters
+ Optional
Typical callouts when using the editor  
+ In order to access metric builder your Connect instance should have Ultimate AI enabled.
+ Metrics created using metric builder will not be accessible for editing once Ultimate AI is disabled.

![\[The Metric Builder editor showing components, definition, and configuration options for creating advanced custom metrics.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-metric-builder-editor.png)


## View Custom metric


To view a custom metric, navigate to Dashboards and reports, and click on the name of a custom metric in the "Custom metrics" section under Dashboards tab that list all the custom metrics in your instance. When you view a custom metric, you'll see the following information:

**Custom metric details:**
+ Metric name: The name you assigned to the custom metric
+ Status: Shows whether the metric is "Published" and available for use
+ Description: A brief explanation of the metric's purpose
+ Creation method: Shows how the metric was created (Service level or Metric builder)
+ Created: Date, time, and user who created the metric
+ Modified: Date, time, and user who last modified the metric
+ ARN: The Amazon Resource Name unique identifier for the metric, this can be used to query the GMDv2 api.

**Components:**
+ Component identifier: The reference ID for each component (e.g., M1, M2)
+ Metric: The base metrics used in the calculation (e.g., Contacts handled, Contacts queued)
+ Filters and thresholds: Any conditions applied to the metrics (e.g., Queue time (ms) <= 12000)
+ Definition: The mathematical formula used to calculate the custom metric (e.g., 100 \$1 SUM(M1) / SUM(M2))

**Display Settings:**
+ Display format: How the metric value is presented (e.g., Percent)
+ Positive trend indicator: How positive trends are indicated (e.g., Neutral)

You can also manage your custom metric using the action buttons at the top of the page:
+ Delete: Remove the custom metric
+ Clone: Create a copy of the custom metric
+ Edit: Modify the custom metric's configuration

## Clone Custom metric


Cloning a custom metric, allows you to copy over an existing custom metric calculation, make any changes and save as a new custom metric. Clone can be performed on the Dashboards and reports, by selecting a custom metric in the "Custom metrics" section under Dashboards tab that list all the custom metrics in your instance and clicking on the clone button. It can also be performed by navigating to the custom metrics view page and clicking on the clone button. 

## Delete Custom metric


Custom metrics can be deleted from either the custom metrics list or the metric view page. When you delete a custom metric, the system requires confirmation to prevent accidental deletions.

**To delete a custom metric:**

1. Navigate to **Dashboards and reports**, and locate the custom metric you want to delete in the "Custom metrics" section under the Dashboards tab.

1. Click the **Delete** button for the metric you wish to remove (or open the metric and click **Delete** from the view page).

1. A confirmation dialog will appear requiring you to type "confirm" to prevent accidental deletions.

1. Click Delete to permanently remove the metric, or Cancel to abort the deletion process.

**Important**  
Important considerations:  
This action is permanent and cannot be undone. Once deleted, the metric and all its associated data will be removed from your instance.
Impact on dashboards: If the deleted metric was used in any dashboards, those widgets will display an error message indicating that the metric is no longer available. 

## Add custom metric to dashboard widget


Custom metrics that you create can be added to dashboard widgets to visualize and monitor your data. You can add custom metrics through the widget edit menu, from any [dashboard widget](https://docs.aws.amazon.com/connect/latest/adminguide/dashboard-customize-widgets.html#dashboard-changing-metrics), select the **Actions** icon and then choose **Edit**.

**To add a custom metric to a dashboard widget:**

1. From any [dashboard widget](https://docs.aws.amazon.com/connect/latest/adminguide/dashboard-customize-widgets.html#dashboard-changing-metrics), select the **Actions** icon and then choose **Edit**.

1. In the edit panel, you'll see a list of available metrics organized into categories:

   1. Standard metrics (such as Proactive intent engagement rate, Reference count, and Response completion rate)

   1. **Custom metrics** section showing the list of available custom metrics in your instance.

   1. To add a custom metric:

      1. Use the search field at the top to find a specific metric by name

      1. Scroll through the **Custom metrics** section to browse available options

      1. Click on the custom metric you want to add from the list

1. Click **Add metric** to include your selection in the widget. 
**Note**  
Widgets have a limit on the number of metrics that can be added. The interface will display how many more metrics you can add (e.g., "You can add up to 1 more").

1. Click **Save** to apply your changes to the widget, or **Cancel** to discard your changes.

# Real-time metrics reports in Amazon Connect
Real-time metrics reports

Real-time metrics reports show real-time or near-real time metrics information about activity in your contact center. Metrics such as **Online** show the number of agents currently online in real-time, updating every 15 seconds. Metrics such as **Handled** and **Abandoned** reflect near real-time values for your contact center.

You can customize the reports, specify a time range for each report, select metrics for each report, and select filters for data to include or exclude from each report.

You can also use the [Amazon Connect Service APIs](https://docs.aws.amazon.com/connect/latest/APIReference/welcome.html) to create custom reports, such as real-time reports that are filtered by teams of agents.

**Topics**
+ [Real-time metrics tag-based access control](rtm-tag-based-access-control.md)
+ [How often real-time metrics refresh in Amazon Connect](rtm-refresh.md)
+ [Create alerts on real-time metrics](rule-real-time-metrics.md)
+ [Use one-click drill-downs](one-click-drill-downs.md)
+ [Visualize: Queue dashboard](visualize-queue-dashboard.md)
+ [View contacts in queue](view-contacts-in-queue.md)
+ [Create a real-time metrics report](create-real-time-report.md)
+ [Troubleshoot no metrics or too few rows in a report](troubleshoot-rtm.md)
+ [List queues by routing profile](queues-by-routing-profile.md)
+ [List agents by routing profile](agents-grouped-by-routing-profile.md)
+ [Sort agents by activity](rtm-sort-by-agent-activity.md)
+ [Change an agent's activity status](rtm-change-agent-activity-state.md)
+ [Download real-time metrics](download-real-time-metrics-report.md)

# Real-time metrics tag-based access control in Amazon Connect
Real-time metrics tag-based access control

You can use resource tags and access control tags to apply granular access to users, queues, and routing profiles for real-time metrics. For example, you can control who has access to view specific users, queues, and routing profiles on the **Real-time metrics** page. 

You can configure tag-based access controls by using the Amazon Connect admin website or the [TagResource](https://docs.aws.amazon.com/connect/latest/APIReference/API_TagResource.html) API.

**Topics**
+ [

## Important things to know
](#rtm-tag-based-access-control-limitations)
+ [How to enable tag-based access control](#rtm-tag-based-access-control-how-to-enable)
+ [

## How to view hundreds of agents, queues, and routing profiles on the real-time metrics report
](#view-tag-based-agents)
+ [

## How to transition to tag-based access control
](#rtm-tag-based-access-control-transitioning)
+ [

## Required security profile permissions
](#rtm-tag-based-access-control-permissions)
+ [

## Example report with tag-based access controls applied
](#example-tag-based-results)

## Important things to know

+ Amazon Connect can display up to 500 resources at a time on a real-time metrics table. For example, in an Agents table it can display up to 500 agents at a time. In a Queues table it can display up to 500 queues, and so on. 
+ Very often fewer than 500 agents will appear on a real-time metrics table at any given time when tagging is enabled. Here's why:
  + Amazon Connect can return a maximum of 500 agents at a time.
  + When tagging is enabled, Amazon Connect selects the first 500 agents who have the appropriate tags, and then displays only those agents in that group of 500 **who are active** (Online or On Contact). Because not all of the 500 tagged agents may be active, it is very likely fewer than 500 tagged agents will be displayed in the table.
  + For example, you have 1000 tagged agents. In the first group of 500 tagged agents only 50 are online. Amazon Connect selects the first 500 tagged agents but displays only 50 because they are currently active. It does not select the first 500 active agents. 
  + For instructions that explain how to view the status of hundreds of agents when tagging is enabled, see [How to view hundreds of agents, queues, and routing profiles on the real-time metrics report](#view-tag-based-agents).
+ You can filter and group tables only by the primary resource (agent, queue, or routing profile). You cannot filter and group tables by non-primary resources. For example, you cannot filter by queue in an Agent table and you cannot group by queue in a Routing profile table.
+ The drill-down button is disabled within tables except for **View queue graphs**. For example, you cannot choose **View agents** in a Queue table.
+ Access to the homepage service level dashboard is disabled.
+ Access to view **Agent Queues** is disabled.
+ The **Agent Adherence** table is not supported.

## How to enable tag-based access control for real-time metrics
How to enable tag-based access control

1. Apply resource tags, for example, to agents, queues, and routing profiles. For a list of which resources support tagging, see [Add tags to resources in Amazon Connect](tagging.md).

1. Apply access control tags. In this step, you need to provide tag information in the condition element of an IAM policy. For more information, see [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).
**Note**  
You must configure user resource tags and access control tags before tag-based access control is applied to users for the agent activity audit report.

1. Assign the required security profile permissions to users who are going to view the real-time metrics reports with tagging enabled. They need permissions to access the reports, and permissions to access the resources. For more information, see [Required security profile permissions](#rtm-tag-based-access-control-permissions).

## How to view hundreds of agents, queues, and routing profiles on the real-time metrics report


Amazon Connect displays up to 500 resources at a time on the real-time metrics report. For agents in particular when tags are applied it's very likely that fewer than 500 agents will be displayed. We recommend the following workaround to view the status of hundreds of agents, queues, and routing profiles when tags are applied.

1. Add one table for each group of 500 resources. For example, you have 2500 agents. You would create 5 Agent tables. 

1. For each table, manually filter to add up to 500 resources. For example, to add agents to the first table, you would choose to filter by **Agents**, and then choose 500 agents to include in the table, as shown in the following image. In table 2, add the next group of 500 agents, and so on.  
![\[The table filters page, set to filter by agent.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/filterbyagent.png)

1. You will be able to view the data for all 2500 resources across the 5 tables. When tags are applied to agents, each table will likely display fewer than 500 agents because not all of them may be active at the same time.

## How to transition to tag-based access control


If you open a saved report that contains tables with users, queues, or routing profiles that you don't have access to anymore due to tag-based access control, or if groupings or non-primary filters are applied to tables, you won't see data in those tables. 

To view the data, perform one of the following steps:
+ Edit your table filters to include the agents, queues, or routing profiles that you have access to.
+ Create a new report that includes the resources you have access to.
+ Remove the groupings and non-primary filters from the table.

## Required security profile permissions


To view real-time metrics reports that have tag-based access controls applied to them, you need to be assigned to a security profile that has permissions to: 
+ [Access metrics](#tag-access-permissions).
+ [Access the resources you want to view](#tag-access-resources), such as routing profiles, queues, and agents.

### Permissions to access metrics


You need one of the following **Analytics and Optimization** security profile permissions: 
+ **Access metrics - Access**
+ **Real-time metrics - Access**, as shown in the following image of the **Analytics and Optimization** section of the security profiles page.

![\[The Real-time metrics - Access permission on the security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-tag-based-access-control-perm.png)


When you enable **Access metrics - Access**, permissions are also automatically granted to **Real-time metrics **, ** Historical metrics**, and **Agent activity audit**. The following image shows all of these permissions granted.

**Note**  
When users have all of these permissions, they can see all data for historical metrics for which tag-based access controls are not currently applied.

![\[The Access metrics - Access permission on the security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-tag-based-access-control-perm-2.png)


### Permissions to access resources


The following image shows an example of security profile permissions that grant users the ability to view routing profiles, queues, and Amazon Connect user accounts. **Routing profiles - View**, **Queues - View**, and **Users - View** are selected.

![\[The routing section and users and permissions section of the security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-tag-based-access-control-perm-3.png)


## Example report with tag-based access controls applied


Without tag-based access controls, all queues, routing profiles, and agents appear on the **Real-time metrics** page, as shown in the following image.

![\[The real-time metrics page showing all resources.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tag-based-access-control-metrics-without.png)


With tag-based access controls, a limited set of queues, routing profiles, and agents appear on the **Real-time metrics** page, as shown in the following image.

![\[The real-time metrics page showing a limited set of resources.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tag-based-access-control-metrics-with.png)


# How often real-time metrics refresh in Amazon Connect
How often real-time metrics refresh in Amazon Connect

Data in real-time metrics reports is refreshed as follows:
+ The **Real-time metrics** page refreshes every 15 seconds, as long as the page is active. For example, if you have multiple tabs open in your browser and navigate to a different tab, the real-time metric page won't be updated until you return to it.
+ Metrics such as **Active** and **Availability** refresh as activity occurs, with a small system delay for processing the activity.
+ Agent near real-time metrics, such as **Missed** and **Occupancy**, refresh as activity occurs, with a small delay for processing.
+ Contact near real-time metrics refresh about a minute after a contact ends.

# Create alerts on real-time metrics in Amazon Connect
Create alerts on real-time metrics

You can create rules that automatically send emails or tasks to managers based on the values of real-time metrics. This enables you to alert managers on contact center operations that could potentially impact the end-customer experience. For example, you can set up an alert that sends an email to a manager when one or more agents on their team have been on break for longer than 30 minutes.

**Topics**
+ [Step 1: Define rule conditions](#conditions-rtm)
+ [Step 2: Define rule actions](#rule-actions-rtm2)

## Step 1: Define rule conditions
Step 1: Define rule conditions

1. On the navigation menu, choose **Analytics and optimization**, **Rules**.

1. Select **Create a rule**, **Real-time metrics**.

1. Under **When**, use the dropdown list to choose from the following event sources: **There is an update in queue metrics**, **There is in update in routing profile metrics**, ** There is an update in agent metrics**, and **There is an update in flow metrics**. These options are shown in the following image.   
![\[The option When a real time metric is available.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-rule-condition.png)

1. Choose **Add condition**. The **Metrics** card is added automatically, as shown in the following image.   
![\[The condition for when a real-time metric is updated.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-rule-condition-all.png)
**Note**  
You can add up to 2 Metrics cards. This enables you to create a condition where one card evaluates real-time metrics and another evaluates trailing windows of time. For example, you may want an alert when several agents on are lunch break (Agent activity = Lunch break for 1 hour) and Average handle time is greater than 5 minutes.
You can add up to 10 metrics to each **Metrics** card.

   Following are the available real-time metrics you can add, depending on the event source. 
   + **There is an update in queue metrics - real-time**
     + [Contacts in queue](metrics-definitions.md#contacts-in-queue): Build rules that run when the number of contacts in a queue is a specified value. 
     + [Oldest contact age](metrics-definitions.md#oldest-real-time): Build rules that run when the oldest contact in queue reaches a specified age. 
     + [Agents available](metrics-definitions.md#available-real-time): Build rules that run when the number of agents available to handle contacts reaches a specified value. 

     The following image shows a condition that is met when **Contacts in queue** is greater than or equal to 400 AND **Oldest contact agent** is greater than or equal to 10 minutes AND **Agents available** is greater than or equal to 0, for the **Basic Routing Profile**.   
![\[Multiple real time metrics in a condition.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-rule-condition-example.png)

     To evaluate the condition with OR instead of AND, change the **Logic** setting to **Any**. 
   + **There is an update in queue metrics - trailing windows of time**

     Trailing windows of time is the past x minutes or hours. 
     + [Average handle time](metrics-definitions.md#average-handle-time): Build rules that run when the average handle time reaches a specified duration. 
     + [Average queue answer time](metrics-definitions.md#average-queue-answer-time): Build rules that run when the average queue answer time reaches a specified duration. 
     + [Average agent interaction time](metrics-definitions.md#average-agent-interaction-time): Build rules that run when the average interaction time reaches a specified duration. 
     + [Average customer hold time](metrics-definitions.md#average-customer-hold-time): Build rules that run when the average hold time reaches a specified duration. This metric does not apply to tasks so the value for them is always 0.
     + [Service level](metrics-definitions.md#service-level): Build rules that run when the service level reaches a specified percent. 
   + **There is in update in routing profile metrics**

     Trailing windows is not available for rules based on routing profiles.
     + [Agents available](metrics-definitions.md#available-real-time): Build rules that run when the number of agents available to take inbound contacts reaches a specified value. 
   + **There is an update in agent metrics - real-time**
     + [Agent activity](metrics-definitions.md#agent-activity-state-real-time): Build rules that run when the agent activity equals a certain value such as Available, Incoming, On contact, and more.
   + ** There is an update in agent metrics - trailing windows**
     + [Average handle time](metrics-definitions.md#average-handle-time): Build rules that run when the Average handle time historical metric reaches a specified duration.
     + [Agent occupancy](metrics-definitions.md#occupancy): Build rules that run when the Occupancy historical metric reaches a specified percent.
   + **There is an update in flow metrics - trailing windows of time**
     + [Flows started](metrics-definitions.md#flows-started): Build rules that run when the flow started count reaches a specified value.
     + [Flows outcome](metrics-definitions.md#flows-outcome): Build rules that run when the flow outcome count reaches a specified value for selected flow outcomes.
     + [Flows outcome percentage](metrics-definitions.md#flows-outcome-percentage): Build rules that run when the flow outcome percentage value reaches a specified percent for selected flow outcomes.
     + [Average flow time](metrics-definitions.md#average-flow-time): Build rules that run when the average flow duration reaches a specified duration for selected flow outcomes.
     + [Maximum flow time](metrics-definitions.md#maximum-flow-time): Build rules that run when the maximum flow duration reaches a specified duration for selected flow outcomes.
     + [Minimum flow time](metrics-definitions.md#minimum-flow-time): Build rules that run when the minimum flow duration reaches a specified duration for selected flow outcomes.

1. Choose **Next**.

## Step 2: Define rule actions
Step 2: Define rule actions

1. Choose **Add action**. You can choose the following actions:
   + [Create Task](contact-lens-rules-create-task.md)
   + [Send email notification](contact-lens-rules-email.md)
   + [Generate an EventBridge event](contact-lens-rules-eventbridge-event.md): Use **Metrics Rules Matched** for the detail type.  
![\[The add action dropdown menu, a list of actions.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-lens-add-action-no-wisdom.png)
**Note**  
 You can type @ to include the list of **agents, queues, flows or routing profile** that breached the metrics threshold within the **email** and **task** notifications. This list is automatically included within **resources** in EventBridge notifications.   

![\[The task action with variable injection.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rules-rtm-task-action.png)


1. Choose **Next**.

1. Review and make any edits, then choose **Save**. 

# Use pre-filtered tables for Routing profiles and Queues tables in Amazon Connect
Use one-click drill-downs

In real-time metrics reports, for **Routing profiles** and **Queues** tables, you can open pre-filtered tables that display the associated queues, routing profiles, or agents. These one-click filters provide a way for you to drill into the performance data.

## Example 1: Queues table -> Routing profiles table -> Agents table


For example, at a **Queues** table, choose the dropdown and then choose **View routing profiles**, as shown in the following image.

![\[The real-time metrics report, queues table, dropdown, view routing profiles option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-quick-filter-queue-table.png)


Below the **Queues** table, a **Routing profiles** table appears, as shown in the following image. It is filtered to display only the routing profiles associated with the queue. On the **Routing profiles** table, you can choose quick filters to display queues or agents *only associated with that routing profile*.

![\[The queues table with a box around queue name A, the routing profiles table for queue name A.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-quick-filter-routing-profiles.png)


## Example 2: Queues table -> Agents table


At the **Queues** table, choose **View agents**. Below the **Queues** table, an **Agents** table appears. It is filtered to display all the agents working that queue, as shown in the following image. The agents may be associated with different routing profiles. 

![\[The queues table, view agents option, the agents table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-quick-filter-queues-agents.png)


## Example 3: Queues table -> Steps table


At the **Queues** table, choose **View Steps**. Below the **Queues** table, a **Steps** table appears. It is filtered to display all the routing steps that are being used on active contacts in that queue, as shown in the following image.

![\[The queues table, view steps option, the steps table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/one-click-drill-downs-example3.png)


# Visualize historical queue data in Amazon Connect
Visualize: Queue dashboard

You can visualize historical queue data using time series graphs to help identify patterns, trends, and outliers such as Service Level, Contacts Queued, and Average Handle Time.

**To view queue data**

1. On the **Real-time Metrics** page, display the Queues table.

1. Select **View queue graphs** from the dropdown menu. The following image shows the dropdown menu for a queue named **test queue**.  
![\[The view queue graphs option in the test queue dropdown menu.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-queue-dashboard-ui.png)

1. After you select **View queue graphs**, you are directed to the queue visualization dashboard. 

1. The Queue dashboard automatically refreshes every 15 minutes. You can:
   + Configure a time range of up to 24 hours.
   + Select the channel of your choice.
   + Customize the service level thresholds.

   The following image shows an example Queue dashboard. It displays a graph of service level data for the queue. **Time range** is set to **Previous 24 hours to future 24 hours**. **Channel** is set to **All channels**. **Service level** is set to **60 seconds**.  
![\[An example Queue dashboard, a graph of data.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-queue-dashboard-exp.png)

# View the number of contacts waiting in an Amazon Connect contact center queue
View contacts in queue

**To view the number of contacts waiting in a queue for an agent**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Real-time metrics** - **Access metrics** permissions.

1. In Amazon Connect, on the left navigation menu, choose **Analytics and Optimization**, **Real-time metrics**, and then choose **Queues**.

1. In the **Queues** table, check the **In queue** column. 

   The **In queue** value shows the total number of customers who are waiting for an agent, including those who have requested a callback.  
![\[The In queue column in the Queues table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-waiting-in-queue.png)

# View how many contacts are in a contact center agent's queue
Contacts in agent queue

To see how many contacts are in an agent's personal queue, add an **Agent queues** table to your **Real-time metrics**, **Queues** report. Then view these two metrics: 
+ **In Queue**—how many contacts are in an agent's personal queue.
+ **Queued**—the number of contacts added to their personal queue during the specified time range.

Use the following procedure. 

1. Go to **Analytics and optimization**, **Real-time metrics**, **Queues.**

1. Choose **New table**, **Agent queues** as shown in the following image.  
![\[The Agent queues option in the New table dropdown list.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-agent-queues.png)

   The **In queue** column displays how many contacts are in the agent's queue.

1. Review the metrics in then **In queue** and **Queue** columns.
**Tip**  
An agent is included in the **Agent queues** table only if they are online or there is at least one contact in the their queue.

## Add In Queue and Queue to the Agent queue table


If **In queue** or **Queue** don't appear in your **Agent queue** table, use the following steps to add them.

1. On the **Agent queues** table, choose **Settings**, as shown in the following image.  
![\[The Agent queues table, the settings icon.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-settings2.png)

1. Choose the **Metrics** tab.

1. Scroll to the **Performance** section and choose **In queue** and **Queued**, and then **Apply**, as shown in the following table.  
![\[Queued and In queue options on the table settings page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-metrics-in-queue.png)

   The changes appear in your table immediately.

1. Choose **Save** to add this report to your list of Saved reports. 

# View contacts in a contact center queue waiting for a callback
Contacts waiting callback

To see only the number of customers who are waiting for a call back, you need to create a queue that only takes callback contacts. To learn how to do this, see [Set up routing in Amazon Connect](connect-queues.md).

Currently there isn't a way to see the phone numbers of the contacts waiting for callbacks.

# Create a real-time metrics report for your contact center
Create a real-time metrics report

You can create a real-time metrics report to view real-time or near-real time metrics data for activity in your contact center. You must have permission to access metric data. The **CallCenterManager** and **QualityAnalyst** security profiles include this permission. For more information, see [Security profiles for Amazon Connect and Contact Control Panel (CCP) access](connect-security-profiles.md).

**To create a real-time metrics report**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Real-time metrics**.

1. Choose one of the following report types. They group and order the data in different ways and include different metrics by default.
   + **Queues**
   + **Agents**
   + **Routing profiles**

1. To add another report to the page, choose **New table** and then choose a report type. You can add multiple reports of the same report type.

   There's no limit to the number of tables you can add, but you might start experiencing performance issues if you add a lot of them.

1. To customize a report, choose the gear icon from its table.

1. On the **Time Range** tab, do the following:

   1. For **Trailing windows for time**, select the time range, in hours, for the data to include in the report.

   1. (Optional) If you select **Midnight to now**, the time range is from midnight to the current time, based on the **Time Zone** that you select. If you select a time zone other than the one you are currently in, the time range starts at midnight for the calendar day in that time zone, not your current time zone.

1. (Optional) On the **Filters** tab, specify filters to scope the data to be included in the report. The available filters depend on the report type. The following are the possible filters:
   + **Queues**—Includes data only for the queues that you select from **Include**.
   + **Routing profiles**—Includes data only for the routing profiles that you select from **Include**.
   + **Agents**—Includes data only for the agents that you select from **Include**.
   + **Agent Hierarchies**—Includes data only for the agent hierarchies that you select from **Include**.
   + **Channel**—Available for Queues and Routing Profile report type. Includes data only for Channels you select.

1. On the **Metrics** tab, choose the metrics and fields to include in the report. The available metrics and fields depend on the report type and filters that you select. For more information, see [Metric definitions in Amazon Connect](metrics-definitions.md).

1. When you are finished customizing the report, choose **Apply**.

1. (Optional) To save your report for future reference, choose **Save**, provide a name for the report, and then choose **Save**.

   To view your saved real-time metrics reports, choose **Analytics and optimization**, **Dashboards and reports**, and then choose the **Real-time metrics** tab.

# Troubleshoot no metrics or too few rows in a queues report in Amazon Connect
Troubleshoot no metrics or too few rows in a report

It's possible to run a manually configured queues report and have no metrics returned, or fewer rows than expected. 

This is because a queues report only includes data for a maximum of 500 queues, using one row per queue. If a queue doesn't have any activity\$1 during the time range for the report, it's excluded from the report rather than included with null values. This means that if you create a report, and there is no activity for any of the queues included in the report, your report will not include any data.

This applies to the `GetCurrentMetricsData` API as well. This means that if a queue is not considered active, if you query for its metrics using the API you won't get any data.

**Tip**  
\$1Here's how we define whether a queue is active: there's at least one contact in queue or there's at least one online agent for that queue. Otherwise, it's considered inactive.  
Real-time metrics reports do not include agents who have been inactive for approximately the past 5 minutes. For example, after the agent changes their CCP status to **Offline**, their username continues to appear in the Real-time metrics report for another approximately 5 minutes. At the 5 minute point, the agent no longer appears in the report. 

In the following situations, you could end up with no metrics or fewer rows than expected:

1. You're attempting to run a report with no filters or groupings, and have more than 500 queues in your instance. The report pulls metrics for the first 500 queues, and then displays only those that are active. 

1. You're attempting to run a report with filters and groupings, but it still has more than 500 queues matching that criteria. To process this request, Amazon Connect applies all the specified filters and groupings. This pulls the first 500 queues matching that criteria. Then out of those queues, it displays only the active ones. 

   For example, let's say you have 600 queues in your instance. Of these, 200 match your criteria; 100 are active and by coincidence all happen to be Queues \$1500-\$1600. When you run the report, you'd get just 1 row (Queue \$1500) since the other 499 queues that were returned (Queues \$11-\$1499) were considered inactive and were not displayed.

1. You're running a report with fewer than 500 queues. While you may expect to see metrics for all filtered queues, only active queues are shown on the real-time metrics report page. Try changing the settings for the report, such as changing the time range. 

1. If you as a user don't have any tags assigned to you (in other words, you have access to every queue in your Amazon Connect instance), then the metrics page randomly selects 100 queues from your Amazon Connect instance and any filters/groupings are applied to those 100 queues only. The same applies for other resources that can be tagged. This is done to limit the amount of data so dashboard performance is optimized. 

# List queues grouped by routing profile in Amazon Connect
List queues by routing profile

This topic explains how to display a list of queues organized by routing profile in your Amazon Connect contact center.

1. On the Amazon Connect admin website, choose **Analytics and optimization**, **Real-time metrics**, **Queues**.

1. Access the **Settings** menu: look for and choose the "Settings" icon.  
![\[The settings icon for the queues table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-settings.png)

1. In the Settings menu, select the **Groupings** tab. 

1. Choose the option **Queues grouped by routing profiles**.

1. Choose **Apply** to apply your changes.

After completing these steps, your queues will be displayed grouped by their associated routing profiles.

# List agents grouped by routing profile in Amazon Connect
List agents by routing profile

This topic shows you how to display a list of agents grouped by routing profile in your Amazon Connect contact center.

1. Go to **Analytics and optimization**, **Real-time metrics**, **Queues**.

1. Choose **New table**, **Agents**.

1. Click **Settings**, as shown in the following image.  
![\[The settings icon for the queues table.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-settings.png)

1. On the **Filters** tab, choose **Routing profiles** from the **Filter primary groupings by** dropdown list. In **Include**, select the routing profiles you want included in the table, as shown in the following image.  
![\[The Filters tab of the table settings page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/table-settings-routing-profiles.png)

1. Choose **Apply**.

# Sort agents by activity in a real-time metrics report in Amazon Connect
Sort agents by activity

On the real-time metrics **Agents** report, you can sort agents by **Activity** when agents are enabled to use the same channel.

For example, the following image shows that you can sort agents by the **Activity** column because all the agents are enabled to use the same channel: voice.

![\[The Agents report, the sort icon for the Activity column.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-sortable.png)


However, if one or more agents are enabled to handle voice, chat, and tasks—or any two of the channels—you can't sort them by the **Activity** column because of the multiple channels. In this case, there's no option to sort by the **Activity** column, as shown in the following image:

![\[The Agents report, no sort icon appears in the Activity column.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-not-sortable.png)


**Note**  
The real-time metrics Agents report doesn't support secondary sorting. For example, you can't sort by **Activity**, and then sort by **Duration**.

# Change the "Agent activity" status in a metrics report in the Contact Control Panel (CCP)
Change an agent's activity status

Agents manually set their status in the Contact Control Panel (CCP). However, on the real-time metrics report, managers can manually change the **Agent Activity** status of an agent. This overrides what the agent has set in the CCP.

 The value that's displayed in the **Agent Activity** column can be either: 
+ The agent's availability status, such as **Offline**, **Available**, or **Break**.
+ The contact state, such as **Incoming** or **On contact**.

When you choose the **Agent Activity** column, you can select and change an agent's *availability status*, such as **Offline**, **Available**, or **Break**. The following image shows an example where only the **Available** status is in the dropdown list of the **Activity** column.

![\[The dropdown list of availability statuses for the Agent activity column.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-change-agent-activity-state.png)


This change appears in the agent event stream.

However, when a *contact state* is displayed in the **Agent Activity** column, such as **Incoming** or **On contact**, you cannot change it to **Available** or **Offline**, for example, even though those options are displayed in the dropdown menu, as shown in the following image. This means you can't set the agent's next status while they are on a contact.

![\[The dropdown list of availability statuses when an agent is on contact.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-change-agent-activity-state-incoming.png)


You'll get an error message that says *Error changing agent status*, as shown in the following image.

![\[The error message the appears when you try to change the On contact status.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-change-agent-activity-state-error-message.png)


**Note**  
The Real-time metrics report does not display who changed the agent's status.

## Required permissions to change an agent's activity status


For someone such as a manager to be able to change an agent's activity status, they need to be assigned a security profile that has the following permissions: 
+ View - Agent Status
+ Access metrics

The **Agent status - View** permission is shown in the following image of the **Users and permissions** section of the security profile page.

![\[The Agent status - View permission.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/security-profile-change-agent-status2.png)


The **Access metrics - Access** permission is shown in the following image of the **Analytics and Optimization** section of the security profile page. 

![\[The Access metrics - Access permission.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/security-profile-change-agent-status.png)


# Download real-time metrics for Amazon Connect
Download real-time metrics

You can download the data included in your report as a comma-separated value (CSV) file so that you can use it with other applications. If there is no data for one of the selected metrics, the field in the downloaded CSV file contains a dash.

All exported times are in seconds.

**To download a real-time metrics report as a CSV file**

1. Create the report.

1. Choose the down arrow next to **Save** in the top-right corner of the page and choose **Download CSV**.

1. When prompted, confirm whether to open or save the file.

The following image shows real-time metrics in a Queue table. All times in the online report are in hours:minutes:seconds (hh:mm:ss). Below the image of the Queue table, there is an image of the same data in a downloaded CSV file opened with Excel. All times in the downloaded report are in seconds.

![\[Data in a queue table and the same data in a CSV file.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/example-downloaded-metrics-report.png)


You can convert the seconds to minutes using an Excel formula. Alternatively, if you have a short report, you can copy and paste the data from Amazon Connect to Excel and it will preserve the format.

# Historical metrics reports in Amazon Connect
Historical metrics reports

Historical metrics reports include data about past, completed activity and performance in your contact center. Amazon Connect includes built-in historical reports that you can start using right away. You can also build your own custom reports. 

When creating and analyzing your historical metrics reports, keep in mind that there are two categories of metrics:

**Contact record-driven metrics**  <a name="ctr-driven-metrics"></a>
These metrics are based on formed contact record records. For a given interval, contact records whose disconnect date falls in the interval are selected to calculate metrics. For example, if a contact starts at 05:23 and ends at 06:15, this contact contributes 52 minutes of metrics for the 06:00-06:30 interval.   
Example contact record-driven metrics are **Service level**, **Agent interaction time**, and **After contact work time**. 

**Agent activity-driven metrics**  <a name="termdef"></a>
These metrics are based on agent activities, like agent status changes, agent conversation changes. The metrics reflect on the actual time the activity happens. For example, if agent handles a contact from 05:23 to 06:15, the **Agent on contact time** has 7 minutes for the 05:00-05:30 interval, 30 minutes for the 05:30-06:00 interval, and 15 minutes for the 06:00-06:30 interval.  
For example, an agent activity-driven metric is **Non-Productive Time**. 

You can customize the report settings to get the view of the data that is most meaningful for your organization. You can change the time frame for the report, which metrics are included in the report, and how data is grouped in the report. After you have customized a report, you can save it for future reference. You can generate a report using a recurring schedule that you define.

**Topics**
+ [Apply tag-based access control](hm-tag-based-access-control.md)
+ [

# Create a custom historical metrics report in Amazon Connect
](create-historical-metrics-report.md)
+ [Report limits](historical-reporting-limits.md)
+ [

# Schedule a historical metrics report in Amazon Connect
](schedule-historical-metrics-report.md)
+ [

# Update a historical metrics report
](update-historical-metrics-report.md)
+ [

# Download a historical metrics report in Amazon Connect
](download-historical-metrics-report.md)
+ [Show agent queues in a Queues table](show-agent-queues.md)
+ [How many contacts in queue on a specific date](contacts-in-queue-on-specific-date.md)
+ [

# Agent activity audit report in Amazon Connect
](agent-activity-audit-report.md)

# Apply granular access control to historical metrics reports in Amazon Connect
Apply tag-based access control

You can use resource tags and access control tags to apply granular access to users, queues, and routing profiles for historical metrics. For example, you can control who has access to view specific users, queues, and routing profile historical metrics. 



Amazon Connect also supports tag-based access controls for real-time metrics and the agent activity audit, but it does not support dashboards and the login/logout report. For more information, see [Real-time metrics tag-based access control in Amazon Connect](rtm-tag-based-access-control.md) and [Agent activity audit tag-based access control in Amazon Connect](agent-activity-audit-tag-based-access-control.md). 

Tag-based access controls enable you to configure granular access to specific resources based on assigned resource tags. You can configure tag-based access controls by using the API or the Amazon Connect admin website for supported resources. You must configure resource tags and access control tags before tag-based access control is applied to users, queues, and routing profiles for real-time metrics. For more information, see [Add tags to resources in Amazon Connect](tagging.md) and [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).

## How to enable tag-based access control for historical metrics reports
How to enable tag-based access control

To apply tags to control access to users, queues, and routing profiles metrics in historical metrics reports:

1. Apply tags to the resources that you're going use in the historical metrics report, such as users, queues, and routing profiles. For more information, see [Add tags to resources in Amazon Connect](tagging.md). 

1. You need to be assigned to a security profile that specifically grants you access to the resources that have been tagged. On the Security profiles page, choose **Show advanced** options to assign these permissions.

1. In addition, you need the one of following permissions to view the historical metrics reports: 
   + **Analytics and Optimization - Access metrics - Access**: If you choose this option, access is also granted to Real-time metrics, Historical metrics, Agent activity audit, and Dashboards. This means you are granting users permission see all data for Dashboards where tag-based access controls are not currently applied.

   OR
   + **Analytics and Optimization - Historical metrics - Access**

## Limitations
Limitations

The following limitations apply when you use tag-based access controls with historical metrics:
+ You can only filter and group by the same resource (user, queue, or routing profile). For example, you cannot filter by queue for an agent grouping and you cannot group by queue and routing profile. The only additional grouping you can do is channel (for example, Group by queue and channel).
+ You can filter for 500 resources per report.
+ You can't group by agent hierarchy, phone numbers, or email address. You can't filter by agent hierarchy, phone numbers, email address, or agent queues. 
+ Access to the homepage service level dashboard is disabled.

## How to transition to tag-based access control
How to transition to tag-based access control

If you open a saved report containing tables with users, queues, or routing profiles that you don't have access to anymore due to tag-based access control, or if groupings or non-primary filters are applied to tables, you won't see data in those tables. 

To view the data, perform one of the following steps:
+ Edit your table filters to include the agents, queues, or routing profiles that you have access to.
+ Create a new report that includes the resources you have access to.
+ Remove the groupings and non-primary filters from the table.

# Create a custom historical metrics report in Amazon Connect


Create your own customized historical metrics reports to look at specific data. 

**Requirement**
+ You must have permission to access metric data. The following security profiles include this permission: **CallCenterManager** and **QualityAnalyst**. For more information, see [Security profiles for Amazon Connect and Contact Control Panel (CCP) access](connect-security-profiles.md).

## Grouping options


You can group the metrics included in your reports in different ways to provide greater insight into how your contact center is performing.

You can group reports by queue, agent, agent hierarchy, routing profile, phone number, email address, channel, Amazon Q, or subtype. Some options are limited to instances using [service linked roles](connect-slr.md). The metric calculations, and therefore metrics values displayed in the report, are different when reports are grouped differently. For example, if you group a report by queue, the value of a metric includes all contacts associated with the queue. If you group a report by agent, the values for the metrics associated with queues might not provide much insight.

When you create a report, the values for calculated metrics are displayed as rows in the report. The rows in the report are grouped by the grouping options you select. Grouping the data enables you to generate global data for your contact center, or more specific data for queues, agents, routing profiles, or agent hierarchy defined in your contact center.

For example, consider the **Contacts handled** metric. This metric is a count of the contacts handled during the time range defined for the report. Here are the results based on the grouping:
+ **Queue** - The metric is the total number of contacts handled during the time range from that queue by all agents in your contact center.
+ **Agent** - The metric is the total number of contacts handled by that agent during the time range across all queues and routing profiles.
+ **Routing Profile** - The metric is the total number of contacts handled during the time range by agents assigned that routing profile.
+ **Queue**, then **Agent**, then **Routing Profile** - The metric is the total number of contacts that agent assigned that routing profile handled from that queue.

Agent activity can be included in one routing profile at a time, but agents can switch between routing profiles over the reporting time interval. If agents are assigned multiple routing profiles and handle contacts from multiple queues, there are multiple rows in the report for each routing profile assigned to the agent and the queue that the agent handled contacts from.

## Filters


When you customize a report, you can add filters to control which data is included in the report. Some options are limited to instances using [service linked roles](connect-slr.md). You can filter on the following:
+ **Amazon Q**—Includes data only for the specified Amazon Q status. If you don’t specify any Amazon Q status, data for all statuses are included.
+ **Agent hierarchy**—Includes data only for the contacts handled by agents in the specified hierarchies. If you don't specify a hierarchy, data for all contacts handled by agents in all hierarchies is included. When only one hierarchy is specified, you can specify a more granular filter within the hierarchy.
+ **Agent Queues**—Includes data only for the specified agent queues. If you don’t specify any agent queues, data for all agent queues are included. This option is only available when the [show agent queues](show-agent-queues.md) checkbox is selected.
+ **Channel**—Includes data only for the specified channels. If you don't specify any channels, data for all channels are included.
+ **Phone number**—Includes data only for the contacts associated with the specified phone numbers. If you don't specify a phone number, data for all contacts associated with any or no phone numbers is included.
+ **Email address**—Includes data only for the contacts associated with the specified email address. If you don't specify an email address, data for all contacts associated with any or no email address is included.
+ **Queue**—Includes data only for the specified queues. If you don't specify any queues, data for all queues are included.
+ **Routing profile**—Includes data only for the agents assigned to the specified routing profiles. If you don't specify any routing profiles, data for all agents for all routing profiles is included.
+ **Subtype**—Includes data only for the specified subtypes. If you don’t specify any subtypes, data for all subtypes are included.

## How to create a historical metrics report
How to create a historical metrics report

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Historical metrics**.

1. Choose one of the following report types, which group and order the data in different ways, and include different metrics:
   + **Queues**
     + **Contact metrics**
     + **Agent metrics**
   + **Agents**
     + **Agent performance**
     + [Agent activity audit report in Amazon Connect](agent-activity-audit-report.md) 
   + **Phone numbers**
     + **Contact metrics**
   + **Email addresses**
     + **Email contact metrics**

1. To customize your report, choose the gear icon.

1. On the **Interval & Time range** tab, do the following:

   1. For **Interval**, choose **30 minutes** to get a row for each 30-minute period in the time range, **Daily** to get a row for each day in the time range, or **Total** to get all data for the time range in a single row.

   1. For **Time Zone**, select a time zone, which determines the hour at which a day starts. For example, to align the report with your calendar days, select the time zone for your location.

      You should use the same time zone for reports over time to get accurate and consistent metrics data for your contact center. Using different time zones for different reports may result in different data for the same time range selection.

   1. The possible values for **Time range** depend on the value that you select for **Interval**. Alternatively, you can specify a custom time range.

      For **Last *x* days** and **Month to date**, the current day is not included in the report. **Yesterday** specifies the previous calendar day while **Last 24 hours** specifies the 24 hours prior to the current time.

1. (Optional) On the **Groupings** tab, choose up to five groupings. If you choose one grouping option, the data is grouped by that option. If you choose multiple grouping options, the data is group by the first grouping option and then by the subsequent grouping options. For more information, see [Grouping options](#historical-metrics-groupings).

1. (Optional) On the **Filters** tab, specify filters to scope the data to be included in the report. The available filters depend on the groupings that you select. For more information, see [Filters](#historical-metrics-filters).

1. On the **Metrics** tab, choose the metrics and fields to include in the report. An exclamation point (\$1) is displayed next to any metrics that are not available based on the groupings that you selected. For more information, see [Metric definitions in Amazon Connect](metrics-definitions.md).

1. When you are finished customizing your report, choose **Apply**.

1. (Optional) To save your report for future use, choose **Save**, provide a name for the report, and then choose **Save**.

# Historical metrics report limits in Amazon Connect
Report limits

Historical metrics reports have the following limits:

**Service quotas**
+ Historical metrics reports have service quotas, such as **Reports per instance** and **Scheduled reports per instance**. When service quotas are breached, the following error message is displayed: *Report cannot be saved*. For more information about these quotas, see [Amazon Connect service quotas](amazon-connect-service-limits.md)

**Data only for active queues**
+ You can get data only for active queues. A queue is inactive if there are no contacts in the queue and no agents available.

**Query data for three days at a time, for the past 2 days**
+ When you create a report that uses 15 minute intervals, you can return data for three days at a time, for the past 35 days. For 30 minute intervals you can return data for only three days at a time, but the data is available based on the retention period of contact records. 

**The availability of historical metric data is based on the retention period of contact records**
+ Historical metrics are based contact records. For the current retention period for contact records, see [Amazon Connect feature specifications](feature-limits.md).

**For daily and total intervals**
+ You can select up to 31 days in a single request.

**200k cell limit**
+ There is a 200k cell limitation on historical metrics reports and scheduled reports. This applies to number of cells with data (and not rows\$1columns in the report). 

# Schedule a historical metrics report in Amazon Connect


Before you schedule a historical metrics report, here are a few things you need to know:

**Others can access the report**
+ Scheduling a report makes the report accessible by any other users in your contact center who have permissions to view saved reports. 

**Anyone with Schedule permissions can create, edit, or delete the schedule of your report**
+ After you publish a report, any user with **Saved reports - Schedule** permissions in their security profile can create, edit, or delete the schedule of your report. They cannot delete the actual report.

**Scheduled reports are located in an Amazon S3 bucket**
+ Scheduled reports are saved as CSV files in the Amazon S3 bucket specified for reports for your contact center. When you set up the scheduled report, you can add a prefix to the location in Amazon S3 for the report files.
+ When the report is exported to your Amazon S3 bucket, the file name includes the date and UTC time when the report was created. The **Last modified date** for the file is displayed using the time zone for the Amazon S3 bucket, and may not match the creation time for the report, which is in UTC.

**There's a 15 minute delay**
+ For scheduled reports, there is a delay of 15 minutes after the scheduled report time before the report is generated. This is to ensure that the report includes the data for all of the activity that occurred during the time range specified for the report. Data from your contact center is not immediately processed and available to include in reports, so some data from the time range might not be captured in a report if the report is generated at the second the time range ends. 
+ For example, if you create a scheduled report for time frame of 8:00 AM to 5:00 PM, and there is activity in your contact center between 4:46:00 PM and 4:59:59 PM, the data about that activity may not be aggregated prior 5:00 PM when the report is scheduled to generate. Instead, the report is generated after 5:15 PM, by which time the data for the last 15 minutes of the time range is included in the report.

**The time range of the scheduled report is independent of the time range in the historical report**
+ The scheduled report uses the time range defined in the report schedule, not the time range of the historical metric report.

  For example:
  +  Today is January 14th. The time range set in the historical metric report is **Trailing 7 days: January 7th - January 14th**. However, the report schedule is set up to run every 1 day for the previous 1 day.
  + The generated scheduled report will contain data for January 13th to January 14th (the previous 1 day) as defined in the report schedule. It does not use the time range of Trailing 7 days in the historical metrics report.

**A scheduled report runs during the following time ranges:**
+ A scheduled report with **Generate this report** = **Daily** produces a report using trailing 24 hour intervals for the specified number of days.
  + For example, to create a scheduled report for yesterday that generates a report at 2:00PM EST every day apply the following settings:
    +  Generate this report **Daily**, running every **1 Day**, starting at 2:00PM EST for the previous **1 Days**.
    + If today was November 10th, the report would be delivered at 2:00PM EST November 10th and contain data from 2:00 PM EST November 9th to 2:00 PM EST November 10th. This 24 hour interval will appear as two rows in the generated report for every run.
      + Row 1: 2:00PM EST November 9th to midnight (00:00) November 10th
      + Row 2: Midnight (00:00) November 10th to 2:00PM EST November 10th  
![\[Settings to create a scheduled report for yesterday that generates a report at 2:00PM EST every day\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/metrics-scheduled-reports-historical-daily-2pm.png)
  + To create a scheduled report for yesterday that generates only one row for the 24 hour interval in each run, apply the following settings:
    +  Generate this report **Daily**, running every **1 Day**, starting at 12:00 AM in your **required timezone** for the previous **1 Days**.
    + If today was November 10th, the report would be delivered at 12:00 AM EST November 10th and contain data from midnight (00:00) November 9th to midnight (00:00) November 10th with 1 row for the 24 hour interval in each run.  
![\[Settings to create a scheduled report for yesterday that generates a report at 12:00AM EST every day\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/metrics-scheduled-reports-historical-daily-12am.png)
+ A scheduled report with **Generate this report** = **Hourly - - For the Previous 24 Hours** always produces a report where the start time is 24 hours before the set run time. The end time is set to the run time. 

  For example, a scheduled report is set to run hourly starting 2:00PM EST on October 5th for the trailing 24 hours. The start and end times are as follows:
  +  The start time for the first report is October 4th 2:00PM EST. The end time is October 5th 2:00PM EST.
  + The next report runs October 4th 3:00PM EST and has an end time of October 5th 3:00PM EST.

**No message if a scheduled report doesn't run**
+ If a scheduled report fails to run, you won't get any message in the Amazon Connect UI. You just won't see the report in the Amazon S3 location. 

**Use your messaging system to email scheduled reports**
+ To email a scheduled report to a list of co-workers, you need to generate the email manually using your messaging system. Amazon Connect doesn't provide an option to email the scheduled report automatically. 

## How to schedule a historical metrics report


1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Create a new report and save it, or open a saved report.

1. Choose the down arrow next to **Save** in the top-right corner of the page and choose **Schedule**.

1. On the **Recurrence** tab, specify how often this report should be run (for example, weekly on Saturdays) and the range (for example, from midnight for the previous 5 days).

1. (Optional) On the **Delivery Options** tab, specify a prefix for the location in Amazon S3 for the report files.

1. Choose **Create**.

## How to delete a scheduled report


To get to the page where you can delete a scheduled report, you need to create another temporary scheduled report.

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. On the navigation menu, choose **Analytics and optimization**, **Dashboards and reports**. 

1. On the **View reports** page, choose the **Historical metrics** tab.

1. Click or tap on the saved report that has been scheduled.

1. Choose the down arrow next to **Save** in the top-right corner of the page and choose **Schedule**.

1. Choose **Create**. 

1. On the **Schedule Report** page, choose **Delete** next to the scheduled reports you want to delete. 

For instructions on deleting saved reports, see [How to delete saved reports](save-reports.md#how-to-delete-saved-reports).

## Frequently Asked Questions


1. My scheduled reports are missing data for a specific time period?

   Compare the data in the generated report (published to your S3 bucket) with the historical report for that time period. If you find discrepancies, contact AWS Support for assistance.

1. My scheduled report failed to generate due to cell limits?

   Reports have a 200,000 cell limit (data cells, not total rows \$1 columns in the report). To resolve this, you can:
   + Reduce the number of metrics in your report
   + Apply filters to narrow the data scope
   + Split large reports into multiple smaller reports

1. My scheduled report is affected after a Daylight Saving transition?

   When you create a daily scheduled report, the selected start time is saved as a fixed UTC time and the schedule will always run at that same UTC time. It does not automatically adjust when Daylight Savings Time begins or ends.
   + To avoid this, we recommend configuring your schedule using UTC timezone, which never observes Daylight Saving Time and will produce consistent results year-round.
   + If you prefer to use a Daylight Savings Time-aware timezone, we recommend recreating the schedule with same configuration after each Daylight Saving Time transition to realign it with your intended local time.

# Update a historical metrics report


After you save a report, you can update it at any time.

**To update a historical metrics report**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Saved reports**.

1. From the **Historical metrics** tab, choose the name of the report. Choose the gear icon, update the report settings as needed, and choose **Apply**.

1. To update the current report, choose **Save**. To save your changes to a new report, choose **Save as**.

# Download a historical metrics report in Amazon Connect


You can download the data included in a report as a comma-separated value (CSV) file so you can use it with other applications. If there's no data for one of the selected metrics, the field in the downloaded CSV file contains a dash.

**To download a historical metrics report as a CSV file**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Create a new report or open a saved report.

1. Choose the down arrow next to **Save** in the top-right corner of the page and choose **Download CSV**.

1. When prompted, confirm whether to open or save the file.

The following image shows metrics in a Queue table. All times in the online report are in hours:minutes:seconds (hh:mm:ss). Below the image of the Queue table, there is an image of the same data in a downloaded CSV file opened with Excel. All times in the downloaded report are in seconds.

![\[Data in a queue table and the same data in a CSV file.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/example-downloaded-metrics-report.png)


You can convert the seconds to minutes using an Excel formula. Alternatively, if you have a short report, you can copy and paste the data from Amazon Connect to Excel and it will preserve the format.

## Interval downloaded in ISO date format


The interval is downloaded in ISO date format, as shown in the following image. When you download a historical metrics report, the interval will be in ISO data format and won't match the UI. If needed, use Excel to convert it to the desired format.

![\[Downloaded interval data in excel, next to image of the same data in a historical metrics report.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/downloaded-hmr-interval-format.png)


## Download all historical metric results


If you need to download more than a page or two of historical metrics, we recommend using the following steps:

1. Schedule the report to run as often as needed.

   For example, you might schedule the Login/Logout report to run daily at midnight.

1. The full report is saved to your Amazon S3 bucket.

1. Go to your Amazon S3 bucket and download the report.

To learn how scheduled reports work, see [Schedule a historical metrics report in Amazon Connect](schedule-historical-metrics-report.md). 

# Show agent queues in a Queues table for historical metrics
Show agent queues in a Queues table

By default agent queues don't appear in a Queues table in a historical metrics report. You can choose to show them.

**To show agent queues in a Queues table**

1. In a historical metrics report, choose the **Settings** icon, as shown in the following image.  
![\[The historical metrics queues report, the settings icon.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-queues-settings.png)

1. Choose **Filters**, **Show agent queues**, **Agent queues**, and then use the drop-down to choose the agent's queues you want to include in the table. These options are shown in the following image.  
![\[Tables settings page, Filters tab, show agent queues option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-queues-settings-agent-queues.png)

1. Choose **Apply**. The agent queues you selected appear in the Queues table in the historical metrics report.

# Determine the number of contacts in a queue on a specific date
How many contacts in queue on a specific date

The historical metrics reports don't provide a way for you to determine how many contacts were in queue on a specific date, at a specific time. 

To get this information in a historical report, you need the help of a developer. The developer uses the [GetCurrentMetricData](https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html) API to store the data so you can look it up later.

# Agent activity audit report in Amazon Connect


The agent activity audit is like a report version of the [agent event stream](agent-event-streams.md). All of the data in this report is also in the agent event stream.

For example, if there's something in the audit report you want to recreate, or if you want to recreate a different time period, you can do so using the agent event stream.

**Topics**
+ [

## Run the agent activity audit report
](#access-agent-activity-audit)
+ [

## Status definitions
](#agent-activity-status-definitions)
+ [

## Status changes
](#agent-activity-status-changes)
+ [

## When is the status Agent Disconnected, Contact Missed, or Rejected?
](#rejected-missed-disconnected)
+ [Required permissions](#agent-activity-audit-permissions)
+ [Agent activity audit tag-based access control](agent-activity-audit-tag-based-access-control.md)

## Run the agent activity audit report


For a list of required permissions to perform this procedure, see [Assign permissions](dashboard-required-permissions.md). 

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Historical metrics**, **Agents**, **Agent activity audit**.

1. Choose the agent login, date, and timezone, and then choose **Generate Report**.

1. To download the results, choose **Download CSV**.

## Status definitions


The following values may appear in the **Status** column on agent activity audit report. 
+ **Available**: The agent has set their status in the Contact Control Panel (CCP) to **Available**. Contacts can be routed to them.
+ **Offline**: The agent has set their status in the Contact Control Panel (CCP) to **Offline**. Contacts can not be routed to them.
+ **Custom status**: The agent has set their status in the Contact Control Panel (CCP) to a custom status. Contacts can not be routed to them.
+ **Connecting**: The state between an inbound contact arriving in the flow and routing to the agent.
+ **Connecting Agent**: The state between an inbound contact being routed to an agent and the agent receiving the contact.
+ **Call Connected**: When an inbound Voice contact has been established by the agent choosing **Accept** in their CCP 
+ **Connected**: When an inbound **Chat/Task/Email** contact has been established by the agent choosing **Accept** in their CCP.
+ **Busy**: The agent is interacting with a **Voice/Task/Email** customer.
+ **Agent Disconnected**: When the agent doesn't choose **Accept** on the inbound voice contact in 20 seconds, or they choose **Reject**.
+ **Calling Customer**: The state before an outbound call is established.
+ **Contact Missed**: When the agent misses a chat or task contact. 
+ **Missed Call Agent**: When an agent accepts a callback, but they end the call before ringing the customer has finished. 
+ **Paused**: When a contact has been paused after being connected to an agent using the CCP or public API.
+ **Telecom issue**: When an outbound call is ended before the call is established. For example, there was an error with the agent's soft phone connection.
+ **On Hold**: When the agent pauses a contact.

**Note**  
If a status appears in your report but is not listed on this page, it is a custom status created by your organization. Contact your Amazon Connect admin to learn the definition.

## Status changes


Starting March 09, 2026, the following statuses have been updated for the corresponding contact types.
+ Chat
  + **Joining Customer** → **Connecting**
  + **Busy** → **Connected**
+ Voice
  + **Connected** → **Call Connected**

Starting March 09, 2026, a new status has been added for the corresponding contact types.
+ Voice/Chat/Task/Email
  +  **On Hold** 

**Note**  
Reports generated before March 09, 2026, will reflect the previous status values.

## When is the status Agent Disconnected, Contact Missed, or Rejected?


Following is a summary of when the **Status** column can be **Agent Disconnected**, **Contact Missed**, or **Rejected**:
+ Voice contact
  + When anyone misses a voice contact, the status in the agent audit is **Agent Disconnected**.
  + When anyone rejects a voice contact, the status in the agent audit is **Agent Disconnected**.
+ Chat contact
  + When anyone misses a chat contact, the status in the agent audit is **Contact Missed**.
  + When anyone rejects a chat contact, the status in the agent audit is **Contact Missed**.
+ Task contact
  + When anyone misses a task contact, the status in the agent audit is **Contact Missed**.
  + When anyone rejects a task contact, the status in the agent audit is **Rejected**.
+ Email contact
  + When anyone misses an email contact, the status in the agent audit is **Contact Missed**.
  + When anyone rejects an email contact, the status in the agent audit is **Rejected**.

## Permissions required to view agent activity audit reports
Required permissions

To view real-time metrics reports, you need to be assigned to a security profile that has either the **Access metrics - Access** permission or the **Real-time metrics - Access** permission. Note the following behavior when you assign these permissions:
+ When **Access metrics - Access** is selected, the **Real-time metrics**, **Historical metrics**, and **Agent activity audit** permissions are also automatically assigned. 
+ When **Access metrics - Access** is assigned, you have access to all real-time and historical metrics reports.

![\[The Analytics and Optimization section of the security profiles permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/permissions-create-and-share-reports.png)


If only **Agent activity audit - Access** is selected, you have access to only agent activity audit report and no other analytics pages or reports. The following image shows the **Analytics and Optimization** section, with only **Agent activity audit - Access** selected.

![\[The agent activity audit permission on the security profile permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/permissions-create-and-share-reports-3.png)


# Agent activity audit tag-based access control in Amazon Connect
Agent activity audit tag-based access control

You can use resource tags and access control tags to apply granular access to users for the agent activity audit report. For example, you can control who has access to view agent status history for specific users in the report. The following images provide example views of the agent activity audit report with and without tag-based access controls:

**Without tag-based access controls, you see all agents:**

![\[Without tag-based access controls, you see all agents.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-audit-tag-based-access-control-before.png)


**By using tag-based access controls, you can see a limited set of agents:**

![\[By using tag-based access controls, you can see a limited set of agents.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-audit-tag-based-access-control-after.png)


Tag-based access controls are available for real-time metrics; however, they are not applicable to other historical metric reports or the login/logout report. For more information, please see [Real-time metrics tag-based access control in Amazon Connect](rtm-tag-based-access-control.md).

Tag-based access controls enable you to configure granular access to specific resources based on assigned resource tags. You can configure tag based access controls by using the API/SDK or the Amazon Connect admin website (for supported resources). You must configure user resource tags and access control tags before tag-based access control is applied to users for the agent activity audit report. For more information, see [Add tags to resources in Amazon Connect](tagging.md) and [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).

## How To Enable Tag-based Access Control for Agent Activity Audit Report


To use tags to control access to users for the agent activity audit report, you must first configure user resource tags and access control tags. After your resource tags and access control tags are configured, you need to apply the appropriate permissions.

After your resource tags, access control tags, and permissions have been appropriately configured, you will have access controls applied to users for the agent activity audit report.

For more information on tagging resources and tag-based access control in Amazon Connect, see [Add tags to resources in Amazon Connect](tagging.md) and [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).

## Permissions


To view agent activity audit reports with tag-based access controls applied, you need to be assigned to a security profile that has Access selected for **Agent Activity Audit** or has Access selected for **Access metrics** permission, along with access to the user resource. Note that if you enable **Access metrics**, then **Real-time metrics**, **Historical Metrics**, and **Agent Activity Audit** will be filled in automatically, and you therefore will be enabling users to see all data for historical metrics for which tag-based access controls are not currently applied.

![\[The Analytics and Optimization section of the security profiles permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-audit-tag-based-access-control-permissions-1.png)


![\[The Analytics and Optimization section of the security profiles permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-audit-tag-based-access-control-permissions-2.png)


![\[The Analytics and Optimization section of the security profiles permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-activity-audit-tag-based-access-control-permissions-3.png)


# Login/Logout reports for agents in Amazon Connect


The Login/Logout report displays the login and logout information for the users in your contact center (for example, agents, managers, and administrators). For each user session, the login and logout times are displayed as a row in the report. You can use the report to determine the time users were logged in to Amazon Connect. The report also displays the amount of time for each session that user was logged in to Amazon Connect.

**Topics**
+ [Why your Login/Logout report may appear incorrect](#login-logout-incorrect)
+ [Report limit: 10,000 rows](#login-logout-considerations)
+ [Required permissions](#loginlogout-report-permissions)
+ [

## Generate a Login/Logout report
](#loginlogout-report-generate)
+ [

## Edit a Saved Login/Logout Report
](#loginlogout-report-edit)
+ [

## Download a Login/Logout report as a CSV file
](#loginlogout-report-downloadcsv)
+ [

## Share a Login/Logout report
](#loginlogout-report-share)
+ [

## Schedule a Login/Logout report
](#loginlogout-report-schedule)
+ [

## Delete a Saved Login/Logout report
](#loginlogout-report-delete)
+ [Not supported: Tag-based access control](#login-logout-tag-based-access-control)

## Why your Login/Logout report may appear incorrect
Why your Login/Logout report may appear incorrect

You may observe that the data in your Login/Logout report appears incorrect. For example: 
+ The report doesn't show any data, or is missing data, even though everyone on your team is logged in.
+ The report shows users are logged in although you know they are **Offline** and their CCP window is closed.

These issues are usually because users are not actually logged out. They aren't clicking the **Logout** button. For example, they may be changing their status to **Offline** and then closing their CCP window.

To log out, in the CCP or the agent workspace, they need to choose **Settings**, scroll down the page, and choose **Logout**. These buttons are shown in the following image.

![\[The Contact Control Panel, the Settings icon, the Logout option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/logout-ccp.png)


A few other reasons a report may appear incorrect:
+ The report includes login and logout events that occur within the specified time range. If a user logs in and out outside of that time range, those events will not be captured in the report. 
+ In an SSO scenario, if agents are automatically logged out due to session timeout, or if they simply close the browser without choosing the **Logout** button, those logout events will not be registered in the report. The report only captures explicit logout actions performed by the user.

## Login/Logout report limit: 10,000 rows
Report limit: 10,000 rows
+ If you try to generate a Login/Logout report that has more than 10,000 rows, it won't complete.
+ The Login/Logout report page displays only 10,000. 
+ If you schedule a Login/Logout report that contains more than 10,000 rows, the report will fail. In addition, no report output will be saved to your S3 bucket, and you cannot view the report.
+ If you have a contact center with a lot of users, and your reports fail to complete, you can specify a shorter time range to reduce the size of the report generated, or apply filters to the report, such as routing profile and agent hierarchy. You can then use other filters to capture all of the login/logout data for your instance.

## Required permissions to access the Login/Logout report
Required permissions

Before you can generate a Login/Logout report, you need the following permissions assigned to your security profile: **Login/Logout report - View**.

![\[The metrics and quality section of the security profile permissions page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/login-logout-report-permissions.png)


By default, the Amazon Connect **Admin** security profile has these permissions.

For information about how to add more permissions to an existing security profile, see [Update security profiles in Amazon Connect](update-security-profiles.md).

## Generate a Login/Logout report


A Login/Logout report includes only login or logout actions by your users that occurred during the specified time range.
+  If user logged in during the time range and did not log out, the report shows a login time but not a logout time.
+ If the user logged in before the start of the time range, and then logged out during the time range, the report shows both the login and logout times even though the login occurred before the start of the time range. This is so you can view the duration of the user session associated with the most recent logout.

**To generate a Login/Logout report**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Login/Logout report**.

1. On the **Login/Logout report** page, choose the **Time range** for the records to include in the report. Choose **Custom time range** to specify a range up to 7 days. This configuration is shown in the following image.  
![\[The Login/Logout report page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/login-logout-report-custom-time-range.png)

1. Choose the **Time zone** to use for your report.

1. To filter data included in the report, for **Filter by**, choose a value.

1. Choose **Generate report**, **Save**.

1. Provide a name for the report, and choose **Save**.

## Edit a Saved Login/Logout Report


After you save your report, you can edit it at any time. When you open a saved report, the time frame and date range displayed show the date and time defined when you saved the report.

**To edit a saved Login/Logout report**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/.

1. Choose **Analytics and optimization**, **Saved reports**.

1. Choose **Login/Logout report** and select the report to edit.

1. Update the **Time range**, **Time zone**, and **Filter by** settings.

1. To overwrite your existing report, choose **Save**.

1. To save the changes as a new report, choose **Save**, **Save as**. Provide a name for the report and choose **Save as**.

## Download a Login/Logout report as a CSV file


When you have generated a report, you can download it as a comma-separated value (CSV) file so that you can use it other applications to work with the data, such as a spreadsheet or database.

**Important**  
Only the data that is displayed on the page is downloaded into the CSV file. 

For example, if you're displaying a page with 25 rows and there are 26 results, the downloaded CSV file will include only rows 1-25. You need to increase the **Rows per page** to include all results. 

![\[Use table preferences to increase Rows per page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/login-logout-report-table-preferences.png)


![\[The number of rows that will be downloaded to the CSV file.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/login-logout-report-rows-per-page.png)


**To download a report as a CSV file**

1. Open the report to download.

1. On the **Login/Logout report** page, at the top right corner, choose the **Share report** menu (arrow) next to **Save**.

1. Choose **Download CSV**. The file `Login_Logout report.csv` is downloaded to your computer.

## Share a Login/Logout report


To make the report available to other people in your organization, you can share a report. People can access the report only if they have appropriate permissions in Amazon Connect.

**To share a Login/Logout report**

1. On the **Login/Logout report** page, at the top right corner, choose the **Share report** menu (arrow) next to **Save**.

1. Choose **Share report**.

1. To copy the URL to the report, choose **Copy link address**. You can send the URL to others in your organization by pasting the link into an email or other document.

1. To publish the report to your organization, for **Publish report to organization**, move the toggle to **On**.

1. Choose **Save**.

## Schedule a Login/Logout report


To generate a report with the same settings on a regular basis, you can schedule the report to run daily or on specific days of the week. Note that *scheduled* Login/Logout reports work differently than Login/Logout reports you [generate](#loginlogout-report-generate) from the user interface for a specified time range.

### Important things to know

+ When you schedule a report, it is automatically published to your organization. Anyone with appropriate permissions can view the report. Users with all permissions for Login/Logout reports can also edit, schedule, or delete the report.
+ For scheduled Login/Logout reports, the trailing window value is always the last 24 hours.
+ A scheduled report always runs at 12AM on the day you select, in the time zone that you choose. 

  For example, if you select Wednesday, the report runs at midnight Wednesday and does not include any data for Wednesday.
+ Scheduled reports are saved as CSV files in your Amazon S3 bucket. The default time zone is UTC. To have your report run at 12AM in your local time, choose your time zone instead. 
+ To email a scheduled report to a list of co-workers, you need to generate the email manually using your messaging system. Amazon Connect doesn’t provide an option to email the scheduled report automatically. 

### How to schedule a Login/Logout report


1. If you already have a saved report to schedule open, skip to step 4. Otherwise, in the dashboard, choose **Analytics and optimization**, **Dashboards and reports**.

1. Choose **Login/Logout report**.

1. Hover the mouse pointer over the row containing the name of the report to schedule, and choose the **Schedule report** icon.

1. On the **Schedule report** page, under **Recurrence**, for **Generate this report**, choose whether to generate the report **Daily** or **Weekly**.

1. If you choose **Weekly**, select the day or days of the week on which to run the report.

1. Choose the **Time zone**.

1. To add a prefix to the S3 path to the saved report, choose **Delivery Options** and enter a value in the **Prefix** field.

   The prefix is added to the path between /Reports and the report name. For example: .../Reports/*my-prefix*/report-name-YYYY-MM-DD…

1. Choose **Create**.

After you schedule a report, you can change or delete the schedule for it at any time.

**To edit or delete the schedule for a report**

1. Follow the steps in the preceding section to open the **Schedule report** page.

1. To edit the schedule, choose **Edit**, update the **Recurrence** and **Delivery Options** as desired, and then choose **Save**. 

1. To delete the schedule for the report, choose **Delete**, and then choose **Delete** again on the confirmation dialog.

## Delete a Saved Login/Logout report


Too many reports in your report library? If you no longer want to use a saved report, you can delete it. When you delete a report, you are only deleting the settings for the report, not any reports that have already been generated using those settings. No CSV files created from a scheduled report are removed from your S3 bucket.

**To delete a saved Login/Logout report**

1. Open your Amazon Connect dashboard.

1. Choose **Analytics and optimization**, **Saved reports**.

1. Hover over the row for the report to delete, and choose the **Delete** icon.

1. Choose **Delete** again.

## Not supported: Tag-based access control
Not supported: Tag-based access control

Amazon Connect does not support tag-based access controls for login/logout reports.

# Amazon Connect agent event streams
Agent event streams

Amazon Connect agent event streams are Amazon Kinesis data streams that provide you with near real-time reporting of agent activity within your Amazon Connect instance. The events published to the stream include these CCP events: 
+ Agent login
+ Agent logout
+ Agent connects with a contact
+ Agent status change, such as to Available to handle contacts, or on Break or at Training. 

You can use the agent event streams to create dashboards that display agent information and events, integrate streams into workforce management (WFM) solutions, and configure alerting tools to trigger custom notifications of specific agent activity. Agent event streams help you manage agent staffing and efficiency.

**Topics**
+ [

# Enable agent event streams to report agent activity in Amazon Connect
](agent-event-streams-enable.md)
+ [

# Sample agent event stream in Amazon Connect
](sample-agent-event-stream.md)
+ [

# Determine the contact center agent's ACW (After Contact Work) time
](determine-acw-time.md)
+ [

# Agent event streams data model in Amazon Connect
](agent-event-stream-model.md)

# Enable agent event streams to report agent activity in Amazon Connect


Agent event streams are not enabled by default. Before you can enable agent event streams in Amazon Connect, create a data stream in Amazon Kinesis Data Streams. Then, choose the Kinesis stream as the stream to use for agent event streams. Though you can use the same stream for both agent event streams and contact records, managing and getting data from the stream is much easier when you use a separate stream for each. For more information, see the [Amazon Kinesis Data Streams Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/).

When data is sent to Kinesis, the partition key used is the agent ARN. All events for a single agent are sent to the same shard, and any resharding events in the stream are ignored.

**Note**  
If you enable server-side encryption for the Kinesis stream you select for agent event streams, Amazon Connect cannot publish to the stream. This is because it does not have permission to Kinesis `kms:GenerateDataKey`. To work around this, first enable encryption for scheduled reports or recordings of conversations. Next, create a AWS KMS key using KMS for encryption. Finally, choose the same KMS key for your Kinesis data stream that you use for encryption of scheduled reports or recordings of conversations so that Amazon Connect has appropriate permissions to encrypt data sent to Kinesis. For more information about creating a KMS key, see [Creating Keys](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html).

**To enable agent event streams**

1. Open the Amazon Connect console at [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/).

1. On the console, choose the name in the **Instance Alias** column of the instance for which to enable agent event streams.

1. Choose **Data streaming**, then select **Enable data streaming**.

1. Under **Agent Events**, select the Kinesis stream to use, and then choose **Save**.

# Sample agent event stream in Amazon Connect


In the following sample agent event stream, the agent is assigned to a routing profile that requires them to take both chats and calls. They can take one call, and up to three chats at a time. 

**Note**  
For how many chats and tasks an agent can take concurrently, see [Amazon Connect service quotas](amazon-connect-service-limits.md).

```
{
    "AWSAccountId": "012345678901",
    "AgentARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent/agent-ARN",
    "CurrentAgentSnapshot": 
      {
    "AgentStatus": {
            "ARN": "example-ARN", //The ARN for the agent's current agent status (not for the agent).
            "Name": "Available",  //This shows the agent status in the CCP is set to Available. 
            "StartTimestamp": "2019-08-13T20:52:30.704Z"
        },
     "NextAgentStatus": {
            "Name": "Lunch", //They set their next status, which pauses new contacts being routed to them while they finish their current contacts.
            "ARN": "example-ARN2",  //The ARN of the agent status that the agent has set as their next status. 
            "EnqueuedTimestamp": "2019-08-13T20:58:00.004Z",   //When the agent set their next status and paused routing of incoming contacts.
        }
      } ,
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "AgentEventStreamTest",
            "LastName": "Agent",
            "Proficiencies": [{
                 "Level": 3.0,
                 "Name": "Technology",
                 "Value": "Kinesis"
             }, {
                 "Level": 1.0,
                 "Name": "Location",
                 "Value": "WA"
             }],
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "Concurrency": [
                    {
                        "AvailableSlots": 3, //This shows the agent has 3 slots available. 
                                            //They aren't on any chats right now.
                        "Channel": "CHAT",
                        "MaximumSlots": 3  //The agent's routing profile allows them to take up to 3 chats.
                    },
                    {
                        "AvailableSlots": 1, //The agent has 1 slot available to take a call.
                        "Channel": "VOICE",
                        "MaximumSlots": 1  //The agent's routing profile allows them to take 1 call at a time.
                    }
                ],
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN",
                    "Channels": [
                        "VOICE"  //This outbound queue only works for calls. 
                    ],
                    "Name": "OutboundQueue"  
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/agent/agent-ARN",
                        "Channels": [
                            "VOICE",
                            "CHAT"
                        ],
                        "Name": null  //This queue has a name of "null" because it's an agent queue, 
                                      //and agent queues don't have names.
                    },
                    {
                        "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN",
                        "Channels": [
                            "CHAT",
                            "VOICE"
                        ],
                        "Name": "Omni-channel-queue" //This inbound queue takes both chats and calls. 
                    }
                ],
                "Name": "AgentEventStreamProfile"
            },
            "Username": "aestest"
        },
        "Contacts": [ ]
    },
    "EventId": "EventId-1",
    "EventTimestamp": "2019-08-13T20:58:44.031Z",
    "EventType": "HEART_BEAT",
    "InstanceARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111",
    "PreviousAgentSnapshot": {
        "AgentStatus": {
            "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
            "Name": "Offline",
            "StartTimestamp": "2019-08-13T20:52:30.704Z"
        },
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "AgentEventStreamTest",
            "LastName": "Agent",
            "Proficiencies": [{
                 "Level": 3.0,
                 "Name": "Technology",
                 "Value": "Kinesis"
             }, {
                 "Level": 1.0,
                 "Name": "Location",
                 "Value": "WA"
             }],
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "Concurrency": [
                    {
                        "AvailableSlots": 3,
                        "Channel": "CHAT",
                        "MaximumSlots": 3
                    },
                    {
                        "AvailableSlots": 1,
                        "Channel": "VOICE",
                        "MaximumSlots": 1
                    }
                ],
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN",
                    "Channels": [
                        "VOICE"
                    ],
                    "Name": "OutboundQueue"
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/agent/agent-ARN",
                        "Channels": [
                            "VOICE",
                            "CHAT"
                        ],
                        "Name": null
                    },
                    {
                        "ARN": "arn:aws:connect:us-west-2:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN",
                        "Channels": [
                            "CHAT",
                            "VOICE"
                        ],
                        "Name": "Omni-channel-queue"
                    }
                ],
                "Name": "AgentEventStreamProfile"
            },
            "Username": "aestest"
        },
        "Contacts": [ ]
    },
    "Version": "2017-10-01"
}
```

# Determine the contact center agent's ACW (After Contact Work) time


There's no event in the agent event stream that tells you how long a contact is in the After Contact Work (ACW) state, and by extension how long an agent spends doing ACW. However, there's other data in the agent event stream that you can use to figure this out. 

First, identify when the contact entered ACW. Here's how to do that: 

1. Identify when the conversation between the contact and agent `ENDED`.

1. View the `StateStartTimeStamp` for the event.

For example, in the following agent event stream output, the contact enters ACW state at "**StateStartTimestamp**": "2019-05-25T18:55:27.017Z".

**Tip**  
In the agent event stream, events are listed in reverse chronological order. We recommend reading through following examples by starting at the bottom of each example.

```
{
    "AWSAccountId": "012345678901",
    "AgentARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent/agent-ARN",
    "CurrentAgentSnapshot": {
        "AgentStatus": {
            "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
            "Name": "Available",  //This just refers to the status that the agent sets manually in the CCP. 
                It means they are ready to handle contacts, not say, on Break.  
            "StartTimestamp": "2019-05-25T18:43:59.049Z"
        },
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "(Removed)",
            "LastName": "(Removed)",
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                        "Name": "BasicQueue"
                    },
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-PrimaryQueue",
                        "Name": "PrimaryQueue"
                    }
                ],
                "Name": "Basic Routing Profile"
            },
            "Username": "(Removed)"
        },
        "Contacts": [
            {
                "Channel": "VOICE",
                "ConnectedToAgentTimestamp": "2019-05-25T18:55:21.011Z",
                "ContactId": "ContactId-1",  //This is the same contact the agent was working on when their state was CONNECTED (below). 
                    Since it's still the same contact but they aren't connected, we know the contact is now in ACW state.
                "InitialContactId": null,
                "InitiationMethod": "OUTBOUND",  //This indicates how the contact was initiated. OUTBOUND means the agent initiated contact with the customer. 
                    INBOUND means the customer initiated contact with your center.
                "Queue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "QueueTimestamp": null,
                "State": "ENDED",  //This shows the conversation has ended. 
                "StateStartTimestamp": "2019-05-25T18:55:27.017Z"  //This is the timestamp for the ENDED event (above), 
                    which is when the contact entered ACW state.
            }
        ]
    },
    "EventId": "EventId-1",
    "EventTimestamp": "2019-05-25T18:55:27.017Z",
    "EventType": "STATE_CHANGE",  //This shows that the state of the contact has changed; above we can see the conversation ENDED. 
    "InstanceARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111",
    "PreviousAgentSnapshot": {
        "AgentStatus": {
            "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
            "Name": "Available", //This just refers to the status that the agent sets manually in the CCP. 
                It means they were ready to handle contacts, not say, on Break.  
            "StartTimestamp": "2019-05-25T18:43:59.049Z"
        },
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "(Removed)",
            "LastName": "(Removed)",
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                        "Name": "BasicQueue"
                    },
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-PrimaryQueue",
                        "Name": "PrimaryQueue"
                    }
                ],
                "Name": "Basic Routing Profile"
            },
            "Username": "(Removed)"
        },
        "Contacts": [
            {
                "Channel": "VOICE",  //This shows the agent and contact were talking on the phone. 
                "ConnectedToAgentTimestamp": "2019-05-25T18:55:21.011Z",
                "ContactId": "ContactId-1",  //This shows the agent was working with a contact identified as "ContactId-1".
                "InitialContactId": null,
                "InitiationMethod": "OUTBOUND",
                "Queue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "QueueTimestamp": null,
                "State": "CONNECTED",  //This shows the contact was CONNECTED to the agent, instead of say, MISSED. 
                "StateStartTimestamp": "2019-05-25T18:55:21.011Z"  //This shows when the contact was connected to the agent.
            }
        ]
    },
    "Version": "2019-05-25"
}
```

Next, determine when a contact left ACW. Here's how to do that: 

1. Find where the `CurrentAgentSnapshot` has no contacts, and the state for the contact listed in the `PreviousAgentSnapshot` equals ENDED.

   Because a STATE\$1CHANGE event also occurs when the agent's configuration is changed, such as when they are assigned a different routing profile, this step confirms you have the right event.

1. Find where the `EventType` = "STATE\$1CHANGE".

1. View the `EventTimeStamp` for it.

For example, in the following agent event stream file, the contact left ACW at "**EventTimestamp**": "2019-05-25T18:55:32.022Z".

```
{
    "AWSAccountId": "012345678901",
    "AgentARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent/agent-ARN",
    "CurrentAgentSnapshot": {
        "AgentStatus": {
            "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
            "Name": "Available",  //This just refers to the status that the agent sets manually in the CCP. It means they 
                are ready to handle contacts, not say, on Break. 
            "StartTimestamp": "2019-05-25T18:43:59.049Z"
        },
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "(Removed)",
            "LastName": "(Removed)",
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                        "Name": "BasicQueue"
                    },
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-PrimaryQueue",
                        "Name": "PrimaryQueue"
                    }
                ],
                "Name": "Basic Routing Profile"
            },
            "Username": "(Removed)"
        },
        "Contacts": []  //Since a contact isn't listed here, it means ACW for ContactId-1 (below)
            is finished, and the agent is ready for a new contact to be routed to them. 
    },
    "EventId": "477f2c4f-cd1a-4785-b1a8-97023dc1229d",
    "EventTimestamp": "2019-05-25T18:55:32.022Z",  //Here's the EventTimestamp for the STATE_CHANGE event. This is when
        the contact left ACW.
    "EventType": "STATE_CHANGE",  //Here's the STATE_CHANGE
    "InstanceARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111",
    "PreviousAgentSnapshot": {
        "AgentStatus": {
            "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
            "Name": "Available",  //This just refers to the status that the agent sets manually in the CCP. 
                It means they were at work, not say, on Break. 
            "StartTimestamp": "2019-05-25T18:43:59.049Z"
        },
        "Configuration": {
            "AgentHierarchyGroups": null,
            "FirstName": "(Removed)",
            "LastName": "(Removed)",
            "RoutingProfile": {
                "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/routing-profile/routing-profile-ARN",
                "DefaultOutboundQueue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "InboundQueues": [
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                        "Name": "BasicQueue"
                    },
                    {
                        "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-PrimaryQueue",
                        "Name": "PrimaryQueue"
                    }
                ],
                "Name": "Basic Routing Profile"
            },
            "Username": "(Removed)"
        },
        "Contacts": [
            {
                "Channel": "VOICE",
                "ConnectedToAgentTimestamp": "2019-05-25T18:55:21.011Z",
                "ContactId": "ContactId-1",  //This is the ContactId of the customer the agent was working on previously. 
                "InitialContactId": null,
                "InitiationMethod": "OUTBOUND",
                "Queue": {
                    "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
                    "Name": "BasicQueue"
                },
                "QueueTimestamp": null,
                "State": "ENDED", //The ACW for ContactId-1 has ended.  
                "StateStartTimestamp": "2019-05-25T18:55:27.017Z"
            }
        ]
    },
    "Version": "2019-05-25"
}
```

Finally, to calculate the amount of time the contact was in the ACW state, and thus how long the agent spent working on it:
+ Subtract the "**StateStartTimestamp**": "2019-05-25T18:55:27.017Z" from the "**EventTimestamp**": "2019-05-25T18:55:32.022Z". 

In this example, the agent spent 5.005 seconds doing ACW for ContactId-1. 

# Agent event streams data model in Amazon Connect


Agent event streams are created in JavaScript Object Notation (JSON) format. For each event type, a JSON blob is sent to the Kinesis data stream. The following event types are included in agent event streams:
+ LOGIN—An agent login to the contact center.
+ LOGOUT—An agent logout from the contact center.
+ STATE\$1CHANGE—One of the following changed:
  + The agent changed their status in the Contact Control Panel (CCP). For example, they changed it from Available to on Break.
  + The state of the conversation between the agent and contact changed. For example, they were connected and then on hold. 
  + One of the following settings changed in the agent's configuration:
    + Their routing profile
    + The queues in their routing profile
    + Auto-accept call
    + Sip address
    + Agent hierarchy group
    + Language preference setting in the CCP
+ HEART\$1BEAT—This event is published every 120 seconds if there are no other events published during that interval.
**Note**  
These events continue to be published up to an hour after an agent has logged off. 

**Topics**
+ [

## AgentEvent
](#AgentEvent)
+ [

## AgentSnapshot
](#AgentSnapshot)
+ [

## Configuration
](#Configuration)
+ [

## Contact object
](#Contact)
+ [

## HierarchyGroup object
](#Hierarchygroup-object)
+ [

## AgentHierarchyGroups object
](#Hierarchygroups-object)
+ [

## Proficiency
](#proficiency-object)
+ [

## Queue object
](#queue-object)
+ [

## RoutingProfile object
](#routingprofile)

## AgentEvent


The `AgentEvent` object includes the following properties:

**AgentARN**  
The Amazon Resource Name (ARN) for the agent account.  
Type: ARN

**AWSAccountId**  
The 12-digit AWS account ID for the AWS account associated with the Amazon Connect instance.  
Type: String

**CurrentAgentSnapshot**  
Contains agent configuration, such as username, first name, last name, routing profile, hierarchy groups, contacts, and agent status.  
Type: `AgentSnapshot` object

**EventId**  
Universally unique identifier (UUID) for the event.  
Type: String

**EventTimestamp**  
A time stamp for the event, in ISO 8601 standard format.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)

**EventType**  
The type of event.   
Valid values: `STATE_CHANGE` \$1 `HEART_BEAT` \$1 `LOGIN` \$1 `LOGOUT` 

**InstanceARN**  
Amazon Resource Name for the Amazon Connect instance in which the agent's user account is created.  
Type: ARN

**PreviousAgentSnapshot**  
Contains agent configuration, such as username, first name, last name, routing profile, hierarchy groups), contacts, and agent status.   
Type: `AgentSnapshot` object

**Version**  
The version of the agent event stream in date format, such as 2019-05-25.  
Type: String

## AgentSnapshot


The `AgentSnapshot` object includes the following properties:

**AgentStatus**  
Agent status data, including:  
+ ARN—The ARN for the agent's current agent status (not for the agent). 
+ Name—This is the [status of the agent that they manually set in the CCP](metrics-agent-status.md), or that the supervisor manually [changes in the real-time metrics report](rtm-change-agent-activity-state.md). 

  For example, their status might be **Available**, which means that they are ready for inbound contacts to be routed to them. Or it might be a custom status, such as Break or Training, which means that inbound contacts can't be routed to them BUT they can still make outbound calls.

  A status of `Error` indicates an internal Amazon Connect error.
+ StartTimestamp—The timestamp in ISO 8601 standard format for the time at which the agent entered the status.

  Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)
+ Type—ROUTABLE, CUSTOM, or OFFLINE
Type: `AgentStatus` object.

**NextAgentStatus**  
If the agent set a next agent status, the data appears here.  
+ ARN—The ARN of the agent status that the agent has set as their next status.
+ Name—This is the name of the agent status that the agent has set as their next status.
+ EnqueuedTimestamp—The timestamp in ISO 8601 standard format for the time at which the agent set their next status and paused routing of incoming contacts.

  Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)
Type: `NextAgentStatus` object.

**Configuration**  
Information about the agent, including:   
+ FirstName—The agent's first name.
+ HierarchyGroups—The hierarchy group the agent is assigned to, if any.
+ LastName—The agent's last name.
+ RoutingProfile—The routing profile the agent is assigned to.
+ Username—the agent's Amazon Connect user name.
Type: `Configuration` object

**Contacts**  
The contacts  
Type: `List of Contact Objects` object

## Configuration


The `Configuration` object includes the following properties:

**FirstName**  
The first name entered in the agent's Amazon Connect account.  
Type: String  
Length: 1-100

**AgentHierarchyGroups**  
The hierarchy group, up to five levels of grouping, for the agent associated with the event.  
Type: `AgentHierarchyGroups` object

**LastName**  
The last name entered in the agent's Amazon Connect account.  
Type: String  
Length: 1-100

**Proficiencies**  
List of all the proficiencies assigned to the agent.  
Type: List of Proficiency objects

**RoutingProfile**  
The routing profile assigned to the agent associated with the event.  
Type: `RoutingProfile` object.

**Username**  
The user name for the agent's Amazon Connect user account.  
Type: String  
Length: 1-100

## Contact object


The `Contact` object includes the following properties:

**ContactId**  
The identifier for the contact.  
Type: String  
Length: 1-256

**InitialContactId**  
The original identifier of the contact that was transferred.  
Type: String  
Length: 1-256

**Channel**  
The method of communication.  
Valid values: `VOICE`, `CHAT`, `TASKS`

**InitiationMethod**  
Indicates how the contact was initiated.   
Valid values:  
+  `INBOUND`: The customer initiated voice (phone) contact with your contact center. 
+  `OUTBOUND`: An agent initiated voice (phone) contact with the customer, by using the CCP to call their number. This initiation method calls the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API.
+  `TRANSFER`: The customer was transferred by an agent to another agent or to a queue, using quick connects in the CCP. This results in a new contact record being created.
+  `CALLBACK`: The customer was contacted as part of a callback flow. 

  For more information about the InitiationMethod in this scenario, see [Queued callbacks in real-time metrics in Amazon Connect](about-queued-callbacks.md). 
+  `API`: The contact was initiated with Amazon Connect by API. This could be an outbound contact you created and queued to an agent, using the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API, or it could be a live chat that was initiated by the customer with your contact center, where you called the [StartChatContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) API.
+  `WEBRTC_API`: The contact used the communication widget to make an in-app voice/video call to an agent.
+  `QUEUE_TRANSFER`: While the customer was in one queue (listening to Customer queue flow), they were transferred into another queue using a flow block.
+  `MONITOR`: A supervisor initiated monitor on an agent. The supervisor can silently monitor the agent and customer, or barge the conversation.
**Note**  
This status shows only if you have opted into [Multi-Party Calls and Enhanced Monitoring](update-instance-settings.md#update-telephony-options). 
+  `DISCONNECT`: When a [Set disconnect flow](set-disconnect-flow.md) block is triggered, it specifies which flow to run after a disconnect event during a contact. 

  A disconnect event is when:
  + A chat, or task is disconnected.
  + A task is disconnected as a result of a flow action.
  + A task expires. The task is automatically disconnected when it completes its expiry timer. The default is 7 days and task expiry is configurable up to 90 days. 

  If a new contact is created while running a disconnect flow, then the initiation method for that new contact is DISCONNECT.
+  `EXTERNAL_OUTBOUND`: An agent initiated voice (phone) contact with an external participant to your contact center using either quick connect in the CCP or a flow block.
+  `AGENT_REPLY`: An agent has replied to an inbound email contact to create an outbound email reply.
+  `FLOW`: An email initiated by a flow block.
+  `CAMPAIGN_PREVIEW`: The contact was initiated by an outbound campaign using preview dialing mode. The agent previews customer information before the call is placed.

**State**  
The state of the contact.  
Valid values: `INCOMING` \$1 `PENDING` \$1 `CONNECTING` \$1 `CONNECTED` \$1 `CONNECTED_ONHOLD` \$1 `MISSED` \$1 `PAUSED` \$1 `REJECTED` \$1 `ERROR` \$1 `ENDED`   
The `PAUSED` state is only available for tasks.

**StateStartTimestamp**  
The time at which the contact entered the current state.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)

**ConnectedToAgentTimestamp**  
The time at which the contact was connected to an agent.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)

**QueueTimestamp**  
The time at which the contact was put into a queue.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*.*sss*Z)

**Queue**  
The queue the contact was placed in.  
Type: `Queue` object

## HierarchyGroup object


The `HierarchyGroup` object includes the following properties:

**ARN**  
The Amazon Resource Name (ARN) for the agent hierarchy.  
Type: String

**Name**  
The name of the hierarchy group.  
Type: String

## AgentHierarchyGroups object


The `AgentHierarchyGroups` object includes the following properties:

**Level1**  
Includes details for Level1 of the hierarchy assigned to the agent.  
Type: `HierarchyGroup` object

**Level2**  
Includes details for Level2 of the hierarchy assigned to the agent.  
Type: `HierarchyGroup` object

**Level3**  
Includes details for Level3 of the hierarchy assigned to the agent.  
Type: `HierarchyGroup` object

**Level4**  
Includes details for Level4 of the hierarchy assigned to the agent.  
Type: `HierarchyGroup` object

**Level5**  
Includes details for Level5 of the hierarchy assigned to the agent.  
Type: `HierarchyGroup` object

## Proficiency


The `Proficiency` object includes the following properties:

**Name**  
The name of predefined attribute.  
Type: String  
Length: 1-64

**Value**  
The value of predefined attribute.  
Type: String

**ProficiencyLevel**  
The proficiency level of the agent.  
Type: Float  
Valid values: 1.0, 2.0, 3.0, 4.0 and 5.0

## Queue object


The `Queue` object includes the following properties:

**ARN**  
The Amazon Resource Name (ARN) for the queue.  
Type: String

**Name**  
The name of the queue.  
Type: String

**Channels**  
The type of communication channel.  
Type: List of Channel objects

## RoutingProfile object


The `RoutingProfile` object includes the following properties:

**ARN**  
The Amazon Resource Name (ARN) for the agent's routing profile.  
Type: String

**Name**  
The name of the routing profile.  
Type: String

**InboundQueues**  
The `Queue` objects associated with the agent's routing profile.  
Type: List of `Queue` object

**DefaultOutboundQueue**  
The default outbound queue for the agent's routing profile.  
Type: `Queue` object

**Concurrency**  
A list of concurrency information. Concurrency information objects have AvailableSlots (number), Channel (a channel object), and MaximumSlots (number) values.

# Contacts, contact chains, and contact attributes
Contacts, contact chains, and contact attributes

This topic explains how Amazon Connect organizes and tracks customer interactions while maintaining relevant contextual information throughout the customer journey.

**Topics**
+ [

## Contacts
](#contacts-defined)
+ [

## Contact chains
](#contact-chains)
+ [

## Contact attributes
](#contact-attributes-overview)

## Contacts
Contacts

In Amazon Connect a *contact* represents either a segment of customer interaction, or it represents an agent's designated task. 

## Contact chains
Contact chains

As a customer interaction proceeds through the Amazon Connect infrastructure, it is represented by a *contact chain*. A contact chain encompasses the complete pathway from initial engagement to final resolution. This journey is orchestrated by a *flow*, a sophisticated routing mechanism that governs both the directional flow of calls, chats, or emails, and the methodology of handling interactions, whether through human agents or automated systems.

For example, consider the following voice interaction scenario: A customer call transfers from an initial agent to a secondary agent, and then subsequently requires escalation to a subject matter expert. This scenario creates three distinct contacts within a single interaction chain. Each participant's involvement constitutes an individual contact segment.

Similarly, in email communications, multiple exchanges between customers and business representatives form comprehensive email threads. Within these threads, each incoming correspondence has the potential to generate its own contact chain, particularly when routing occurs across multiple queues or agent transfers.

The following image illustrates the hierarchical relationship among initial contact ID, related contact ID, and associated contact ID within the Amazon Connect contact management framework. This hierarchical relationship enables you to trace and analyze the complete lifecycle of customer interactions.

![\[The relationship among initial contact ID related contact ID, and associated contact ID.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-chain.png)


## Contact attributes
Contact attributes

There are two types of contact attributes: system-defined attributes and user-defined attributes.

### System-defined attributes
System-defined attributes

Amazon Connect defines attribute names (such as channel), and manages attribute values (such as voice and chat). You can create personalized customer experiences in your contact center by leveraging these system-defined contact attributes. 

For example, you can customize welcome messages based on the customer's communication channel, for example, whether they're connecting through phone or chat. Essential system-defined attributes include customer endpoints (phone numbers or email addresses), agent names, communication channels (voice or chat), and more. These system-defined attributes enable you to build effective decision-making for processing customer interactions.

### User-defined attributes
User-defined attributes

You can capture specific contextual information for your business through user-defined attributes. These attributes encompass details such as line-of-business names, customer account types, and contact drivers. Amazon Connect offers two types of user-defined attributes: 
+ **Contact attributes**: These allow you to attach your own business attributes (key-value pairs) to a specific contact ID.

  Use contact attributes in use cases that require consistent information sharing across interaction segments during transfers and conferences. For example, when a third agent discovers customer account information during a transfer scenario, storing it as contact attributes on the third agent's contact records would automatically reflect back to the first and second agents' contact records.

  Important things to know about contact attributes:
  + For transfers and conference scenarios, the attributes and values are immediately propagated to all interaction segments within the contact chain.
  + When you update an attribute's value for a specific interaction segment, Amazon Connect automatically applies this change across all interaction segments in the contact chain.

  For more information, see [How contact attributes work in Amazon Connect](what-is-a-contact-attribute.md). 
+ **Contact segment attributes**: Unlike contact attributes, contact segment attributes keep the values that remain specific to individual contact segments. 

  Use contact segment attributes in use cases where information varies between transfers or conferences, such as business unit names that may change as a contact moves between departments. You can use contact segment attributes for common information such as account details as well, as long as you don't need to propagate the information to previous interaction segments in the customer journey. 

  Important things to know about contact segment attributes:
  + Changes to segment attributes in one contact segment (such as C3) remain isolated from other segments (such as C1 and C2). 
  + To maintain the continuity of the business context, Amazon Connect transfers attributes and values from previous contacts to subsequent ones. This allows a value to be changed in each new segment.

  For more information, see [Use contact segment attributes](use-contact-segment-attributes.md). 

# Amazon Connect contact events
Contact events

Amazon Connect allows you to subscribe to a near real-time stream of contact (voice calls, chat, task, and email) events (for example, call is queued) in your Amazon Connect contact center.

You can use contact events to create analytics dashboards to monitor and track contact activity, integrate into workforce management (WFM) solutions to better understand contact center performance, or to integrate applications that react to events (for example, call disconnected) in real-time.

**Note**  
As we add new features and event types, we update the contact events data model with new fields. All data model changes maintain backward compatibility.  
When developing applications, design them to handle new fields and event types gracefully. Your applications should:  
Ignore newly added fields they weren't designed to process.
Continue functioning when new event types are introduced.
This approach helps ensure your applications remain stable as the service evolves.

**Topics**
+ [

## Contact events data model
](#contact-events-data-model)
+ [

## Contact timestamps
](#contact-timestamps)
+ [

## Subscribe to Amazon Connect contact events
](#subscribe-contact-events)
+ [

## Sample to stop streaming an event type
](#stop-streaming-event)
+ [

## Sample contact event for when a voice call is connected to an agent
](#sample-contact-event)
+ [

## Sample contact event for when a voice call is disconnected
](#sample-contact-event-call-disconnected)
+ [

## Sample event for when contact properties are updated
](#sample-updated-event)
+ [

## Sample contact event for when a voice call is connected to an agent using routing criteria
](#sample-routing-criteria-event-connected)
+ [

## Sample event for when routing step expires on a contact
](#sample-routing-step-expires)
+ [

## Sample contact event for when a voice call is connected to an agent provided by the customer using routing criteria
](#sample-contact-event-voice-call-routing-criteria)

## Contact events data model
Contact events data model

Contact events are generated in JSON. For each event type, a JSON blob is sent to the target of your choice, as configured in the rule. The following contact events are available: 
+ AMD\$1DISABLED - Answering machine detection is disabled.
+ INITIATED - A voice call, chat, task, or email is initiated or transferred. 
+ CONNECTED\$1TO\$1SYSTEM - The contact has established media (for example, it was answered by a person or by voicemail). This event is generated for any of the [AnsweringMachineDetectionStatus](#AnsweringMachineDetectionStatus) codes.
**Note**  
This event is generated for outbound calls (including [Amazon Connect outbound campaigns](how-to-create-campaigns.md)) tasks, and chats.
+ CONTACT\$1DATA\$1UPDATED - One or more of the following contact properties were updated on a voice call, chat, task, or email: scheduled timestamp (task only), accepted by agent timestamp (outbound campaign voice contact in preview dialing mode only), user-defined attributes and tags, routing criteria is updated or step is expired, and if Contact Lens is enabled for a given contact.
+ QUEUED - A voice call, chat, task, or email is queued to be assigned to an agent.
+ CONNECTED\$1TO\$1AGENT - A voice call, chat, task, or email is connected to an agent.
+ COMPLETED - The COMPLETED event indicates when a contact has fully ended, including After Contact Work (ACW) if applicable.
  + For contacts with ACW:

    When an agent completes ACW for a voice call, chat, task, or email, the following fields are populated:
    + AgentInfo.afterContactWorkStartTimestamp
    + agentInfo.afterContactWorkEndTimestamp
    + agentInfo.afterContactWorkDuration
  + For contacts without ACW:

    These fields are not populated when:
    + No agent was present on the contact.
    + The agent did not enter ACW.

    In these cases, the COMPLETED event is published immediately after the DISCONNECT event with the same data.
**Note**  
For chat contacts, if an agent switches their status to offline without properly clearing the contact in Contact Control Panel (CCP), the following issues may occur:  
The COMPLETED event might not be delivered.
The AfterContactWorkEndTimestamp may show discrepancies.
+ DISCONNECTED - A voice call, chat, task, or email is disconnected. For outbound calls, the dial attempt is not successful, the attempt is connected but the call is not picked up, or the attempt results in a [SIT tone](https://en.wikipedia.org/wiki/Special_information_tone). 

  A disconnect event is when:
  + A chat, or task is disconnected.
  + A task is disconnected as a result of a flow action.
  + A task expires. The task is automatically disconnected when it completes its expiry timer. The default is 7 days and task expiry is configurable up to 90 days. 
+ PAUSED - An active task contact was paused.
+ RESUMED - A paused task contact was resumed.
+ WEBRTC\$1API - The contact used the communication widget to make an in-app voice/video call to an agent.

**Topics**
+ [

### AgentInfo
](#AgentInfo)
+ [

### AttributeCondition
](#AttributeCondition)
+ [

### Campaign
](#Campaign-ces)
+ [

### Contact event
](#ContactEvent)
+ [

### CustomerVoiceActivity
](#CustomerVoiceActivity)
+ [

### Expiry
](#Expiry)
+ [

### Expression
](#Expression)
+ [

### GlobalResiliencyMetadata
](#GlobalResiliencyMetadata)
+ [

### QueueInfo
](#QueueInfo)
+ [

### RoutingCriteria
](#RoutingCriteria)
+ [

### Steps
](#Steps)
+ [

### SystemEndpoint
](#SystemEndpoint)
+ [

### Endpoint
](#Endpoint)
+ [

### Recordings
](#Recordings)
+ [

### RecordingsInfo
](#RecordingsInfo)
+ [

### ContactDetails
](#ContactDetails)
+ [

### ContactEvaluations
](#ContactEvaluations)
+ [

### ContactEvaluation
](#ContactEvaluation)
+ [

### StateTransitions
](#StateTransitions)
+ [

### StateTransition
](#StateTransition)
+ [

### OutboundStrategy
](#OutboundStrategy)

### AgentInfo


The `AgentInfo` object includes the following properties:

**AgentArn**  
The Amazon Resource Name (ARN) for the agent account.  
Type: ARN

**AgentInitiatedHoldDuration**  
The total hold duration in seconds initiated by the agent.  
Type: Integer

**AfterContactWorkStartTimestamp**  
The date and time when the agent started doing After Contact Work for the contact, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**AfterContactWorkEndTimestamp**  
The date and time when the agent ended After Contact Work for the contact, in UTC time. In cases when agent finishes doing AfterContactWork for chat contacts and switches their activity status to offline or equivalent without clearing the contact in CCP, discrepancies may be noticed for `AfterContactWorkEndTimestamp`.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**AfterContactWorkDuration**  
The difference in time, in whole seconds, between `AfterContactWorkStartTimestamp` and `AfterContactWorkEndTimestamp`.  
Type: Integer

**AcceptedByAgentTimestamp**  
The date and time the outbound campaigns voice contact in preview dialing mode was accepted by the agent, in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**PreviewEndTimestamp**  
The date and time the agent finished previewing outbound campaigns voice contact in preview dialing mode, in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**HierarchyGroups**  
The agent hierarchy group for the agent.  
Type: ARN

### AttributeCondition


An object to specify the predefined attribute condition.

**Name**  
The name of predefined attribute.  
Type: String  
Length: 1-64

**Value**  
The value of predefined attribute.  
Type: String  
Length: 1-64

**ComparisonOperator**  
The comparison operator of the condition.  
Type: String  
Valid values: NumberGreaterOrEqualTo, Match, Range

**ProficiencyLevel**  
The proficiency level of the condition.  
Type: Float  
Valid values: 1.0, 2.0, 3.0, 4.0 and 5.0

**Range**  
An Object to define the minimum and maximum proficiency levels.  
Type: Range object

**MatchCriteria**  
An object to define AgentsCriteria.  
Type: MatchCriteria object

**AgentsCriteria**  
An Object to define agentIds.  
Type: AgentsCriteria object

**AgentIds**  
An object to specify a list of agents, by Agent ID.  
Type: Array of strings  
Length Constraints: Maximum length of 256

### Campaign


Information associated with a campaign.

Type: [Campaign](https://docs.aws.amazon.com/connect/latest/APIReference/API_Campaign.html) object

### Contact event


The `Contact` object includes the following properties:

**ContactId**  
The identifier for the contact.  
Type: String  
Length: 1-256

**InitialContactId**  
The identifier of the initial contact.  
Type: String  
Length: 1-256

**RelatedContactId**  
The contactId that is [related](https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_Item.html) to this contact.  
Type: String  
Length: Minimum of 1. Maximum of 256.

**PreviousContactId**  
The original identifier of the contact that was transferred.  
Type: String  
Length: 1-256

**Channel**  
The type of channel.  
Type: `VOICE`, `CHAT`, `TASK`, or `EMAIL`

**InstanceArn**  
Amazon Resource Name (ARN) for the Amazon Connect instance in which the agent's user account is created.  
Type: ARN

**InitiationMethod**  
Indicates how the contact was initiated.  
Valid values:  
+ INBOUND: The customer initiated voice (phone) or email contact with your contact center.
+ OUTBOUND: Represents an agent-initiated outbound voice call or email from the Contact Control Panel (CCP). 
+ TRANSFER: The contact was transferred by an agent to another agent or to a queue, using quick connects in the CCP. This results in a new contact record being created.
+ CALLBACK: The customer was contacted as part of a callback flow. For more information about the InitiationMethod in this scenario, see [Queued callbacks in real-time metrics in Amazon Connect](about-queued-callbacks.md). 
+ API: The contact was initiated with Amazon Connect by API. This could be an outbound contact you created and queued to an agent, using the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API, or it could be a live chat that was initiated by the customer with your contact center, where you called the [StartChatContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) API, or it could be a tasks initiated by the customer by calling the [StartTaskContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartTaskContact.html) API, or it could be an email initiated by the customer by calling the [StartEmailContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartEmailContact.html) API. 
+ QUEUE\$1TRANSFER: While the contact is one queue, and was then transferred into another queue using a flow block.
+ EXTERNAL\$1OUTBOUND: An agent initiated voice (phone) contact with an external participant to your contact center using either quick connect in the CCP or a flow block. 
+ MONITOR: A supervisor initiated monitor on an agent. The supervisor can silently monitor the agent and customer, or barge the conversation.
+ DISCONNECT: When a [Set disconnect flow](set-disconnect-flow.md) block is triggered, it specifies which flow to run after a disconnect event. 

  A disconnect event is when:
  + A chat, or task is disconnected.
  + A task is disconnected as a result of a flow action.
  + A task expires. The task is automatically disconnected when it completes its expiry timer. The default is 7 days and task expiry is configurable up to 90 days. 

  When the disconnect event occurs, the corresponding content flow runs. If a new contact is created while running a disconnect flow, then the initiation method for that new contact is DISCONNECT.
+ AGENT\$1REPLY: Represents an agent reply email contact corresponding to the inbound email contact accepted by an agent.
+ FLOW: Represents an automated (flow-initiated) email contact.
+ CAMPAIGN\$1PREVIEW: The contact was initiated by an outbound campaign using preview dialing mode. The agent previews customer information before the call is placed.

**DisconnectReason code**  
Indicates how the contact was terminated. This is available for the contacts of outbound campaigns in which the media connection failed.  
Valid values:  
+ OUTBOUND\$1DESTINATION\$1ENDPOINT\$1ERROR: Current configurations do not allow this destination to be dialed (for example, calling an endpoint destination from an ineligible instance).
+ OUTBOUND\$1RESOURCE\$1ERROR: Instance has insufficient permissions to make outbound calls or necessary resources were not found.
+ OUTBOUND\$1ATTEMPT\$1FAILED: There was an unknown error, invalid parameter, or insufficient permissions to call the API.
+ OUTBUND\$1PREVIEW\$1DISCARDED: No contact made; recipient removed from list; no further attempts will be made.
+ EXPIRED: Not enough agents available, or not enough telecom capacity for such calls. 
+ DISCARDED: Represents that an agent discarded an email contact.

**AnsweringMachineDetectionStatus**  
Indicates how an [outbound campaign](how-to-create-campaigns.md) call is actually disposed if the contact is connected to Amazon Connect.  
Type: String  
Valid values:  
+ `HUMAN_ANSWERED`: The number dialed was answered by a person.
+ `VOICEMAIL_BEEP`: The number dialed was answered by voicemail with a beep.
+ `VOICEMAIL_NO_BEEP`: The number dialed was answered by a voicemail with no beep.
+ `AMD_UNANSWERED`: The number dialed kept ringing, but the call was not picked up.
+ `AMD_UNRESOLVED`: The number dialed was connected but the answering machine detection could not determine whether the call was picked up by a person or voicemail.
+ `AMD_UNRESOLVED_SILENCE`: The number dialed was connected but the answering machine detection observed silence.
+ `AMD_NOT_APPLICABLE`: The call disconnected before ringing, and there was no media to detect.
+ `SIT_TONE_BUSY`: The number dialed was busy.
+ `SIT_TONE_INVALID_NUMBER`: The number dialed was not a valid number.
+ `SIT_TONE_DETECTED`: A special information tone (SIT) was detected.
+ `FAX_MACHINE_DETECTED`: A fax machine was detected.
+ `AMD_ERROR`: The number dialed was connected, but there was an error in answering machine detection.

**EventType**  
The type of event published.  
Type: String  
Valid values: INITIATED, CONNECTED\$1TO\$1SYSTEM, CONTACT\$1DATA\$1UPDATED, QUEUED, CONNECTED\$1TO\$1AGENT, DISCONNECTED, PAUSED, RESUMED, COMPLETED

**UpdatedProperties**  
The type of property updated.  
Type: String  
Valid values: ScheduledTimestamp, UserDefinedAttributes, ContactLens.ConversationalAnalytics.Configuration, Segment Attributes, Tags, GlobalResiliencyMetadata

**AgentInfo**  
The agent the contact was assigned to.  
Type: `AgentInfo` object 

**QueueInfo**  
The queue the contact was placed in.  
Type: `QueueInfo` object 

**ContactLens**  
Contact Lens information if Contact Lens is enabled on the flow.  
Type: For more information about the `ContactLens` object, see [ContactLens](ctr-data-model.md#ctr-ContactLens). 

**SegmentAttributes**  
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 \$1 characters.  
This field can be used to show channel subtype. For example, `connect:Guide` or `connect:SMS`.  
Type: SegmentAttributes   
Members: SegmentAttributeName, SegmentAttributeValue

**Tags**  
[Tags](granular-billing.md) associated with the contact. This contains both AWS generated and user-defined tags.   
Type: String to string map

**CustomerId**  
The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.  
Type: String 

**ChatMetrics**  
Information about how agent, bot and customer interact in a chat contact.     
**ChatContactMetrics**  
Information about the overall participant interactions at the contact level.  
Type: [ChatContactMetrics](#chat-contact-metrics) object  
**CustomerMetrics**  
Information about customer interactions in a contact.  
Type: [ParticipantMetrics](#participantmetrics) object  
**AgentMetrics**  
Information about agent interactions in a contact.  
Type: [ParticipantMetrics](#participantmetrics) object

**GlobalResiliencyMetadata**  
Information about the global resiliency configuration for the contact, including traffic distribution details.  
Type: [GlobalResiliencyMetadata](#GlobalResiliencyMetadata) object

### CustomerVoiceActivity


The `CustomerVoiceActivity` object includes the following properties:

**GreetingStartTimestamp**  
The date and time that measures the beginning of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**GreetingEndTimestamp**  
The date and time that measures the end of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

### Expiry


An object to specify the expiration of a routing step.

**DurationInSeconds**  
The number of seconds to wait before expiring the routing step.  
Type: Integer  
Min value: 0

**ExpiryTimestamp**  
The timestamp indicating when the routing step expires.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

### Expression


A tagged union to specify expression for a routing step.

**AndExpression**  
List of routing expressions which will be AND-ed together.  
Type: Expression  
Min value: 0

**OrExpression**  
List of routing expressions which will be OR-ed together.  
Type: Expression

**AttributeCondition**  
An object to specify the predefined attribute condition.  
Type: AttributeCondition

**NotAttributeCondition**  
An object to specify the predefined attribute condition to exclude agents with certain proficiencies.  
Type: AttributeCondition

### GlobalResiliencyMetadata


Information about the global resiliency configuration for the contact, including traffic distribution details.

**ActiveRegion**  
The current AWS region in which the contact is active. This indicates where the contact is being processed in real-time.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.

**OriginRegion**  
The AWS region where the contact was originally created and initiated. This may differ from the `ActiveRegion` if the contact has been transferred across regions.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.

**TrafficDistributionGroupId**  
The identifier of the traffic distribution group.  
Type: String  
Pattern: `^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`

### QueueInfo


The `QueueInfo` object includes the following properties:

**QueueArn**  
The Amazon Resource Name (ARN) for the queue.  
Type: String

**QueueType**  
The type of queue.  
Type: String

### RoutingCriteria


List of routing criteria. Each time the routing criteria is updated on a contact, it will be added to this list.

**ActivationTimestamp**  
The timestamp indicating when the routing criteria is set to active. A routing criteria is activated when contact is transferred to a queue.  
ActivationTimestamp will be set on routing criteria for contacts in agent queue even though Routing criteria is never activated for contacts in agent queue.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**Index**  
Information about the index of the routing criteria.  
Type: Integer  
Min value: 0

**Steps**  
List of routing steps.  
Type: List of Step objects  
Length: 1-5

### Steps


When Amazon Connect does not find an available agent meeting the requirements in a step for a given step duration, the routing criteria will move on to the next step sequentially until a join is completed with an agent. When all steps are exhausted, the contact will be offered to any agent in the queue. 

**Status**  
Represents status of the Routing step.  
Type: String  
Valid Values: EXPIRED, ACTIVE, JOINED, INACTIVE, DEACTIVATED, INTERRUPTED

**Expression**  
An object to specify the expression of a routing step..  
Type: Expression

**Expiry**  
An object to specify the expiration of a routing step.  
Type: Expiry

### SystemEndpoint


The system endpoint. For example, for INBOUND, this is the phone number that the customer dialed or the email address where the customer reached out. For OUTBOUND and EXTERNAL\$1OUTBOUND, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer or the outbound email address that is assigned to the outbound queue that is used to reach out to the customer.

**Note**  
This field is currently not populated for contacts with initiation method of CALLBACK, MONITOR, QUEUE\$1TRANSFER contacts.

**Type**  
Endpoint

### Endpoint


Information about an endpoint. In Amazon Connect, an endpoint is the destination for a contact, such as a customer phone number, or a phone number for your contact center.

**Address**  
The value for the type of endpoint. For TELEPHONE\$1NUMBER, the value is a phone number in E.164 format.  
Type: String  
Length: 1-256

**Type**  
The endpoint type. Currently, an endpoint can only be a telephone number.  
Valid Values: TELEPHONE\$1NUMBER \$1 VOIP \$1 CONTACT\$1FLOW \$1 CONNECT\$1PHONENUMBER\$1ARN \$1 EMAIL\$1ADDRESS

**DisplayName**  
Display name of the endpoint.  
Type: String  
Length: 0-256

### Recordings


If recording was enabled, this is information about the recordings.

**Type**  
Array of RecordingsInfo

### RecordingsInfo


Information about a voice recording, chat transcript, or screen recording.

**DeletionReason**  
If the recording/transcript was deleted, this is the reason entered for the deletion.  
Type: String

**FragmentStartNumber**  
The number that identifies the Kinesis Video Streams fragment where the customer audio stream started.  
Type: String

**FragmentStopNumber**  
The number that identifies the Kinesis Video Streams fragment where the customer audio stream stopped.  
Type: String

**Location**  
The location, in Amazon S3, for the recording/transcript.  
Type: String  
Length: 0-256

**MediaStreamType**  
Information about the media stream used during the conversation.  
Type: String  
Valid Values: AUDIO, VIDEO, CHAT

**ParticipantType**  
Information about the conversation participant: whether they are an agent or contact. Following are the participant types:  
+ All
+ Manager
+ Agent
+ Customer
+ Thirdparty
+ Supervisor
Type: String

**StartTimestamp**  
When the conversation of the last leg of the recording started in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**Status**  
The status of the recording/transcript.  
Valid Values: AVAILABLE \$1 DELETED \$1 NULL

**StopTimestamp**  
When the conversation of the last leg of recording stopped in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**StorageType**  
Where the recording/transcript is stored.  
Type: String  
Valid Values: Amazon S3 \$1 KINESIS\$1VIDEO\$1STREAM

### ContactDetails


Is a Map of string key, value pairs that contains user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.

**Key**  
Type: String  
Length: 1-128

**Value**  
Type: String  
Length: 0-1024

### ContactEvaluations


Information about the contact evaluations where key is the FormId - a unique identifier for the form.

**Type**  
Map of String, ContactEvaluation

### ContactEvaluation


**EvaluationArn**  
The Amazon Resource Name for the evaluation form. It is always present.  
Type: String

**Status**  
The status of the evaluation.  
Type: String  
Valid Values: COMPLETE, IN\$1PROGRESS, DELETED

**StartTimestamp**  
The date and time when the evaluation was started, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**EndTimestamp**  
The date and time when the evaluation was submitted, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**DeleteTimestamp**  
The date and time when the evaluation was deleted, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**ExportLocation**  
The path where evaluation was exported.  
Type: String  
Length: 0-256

### StateTransitions


List of StateTransition for a supervisor.

**Type**  
StateTransition

### StateTransition


Information about the state transition of a supervisor.

**StateStartTimestamp**  
The date and time when the state started in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**StateEndTimestamp**  
The date and time when the state ended in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**State**  
Valid Values: SILENT\$1MONITOR \$1 BARGE

### OutboundStrategy


Information about the outbound strategy.

Type: [OutboundStrategy](https://docs.aws.amazon.com/connect/latest/APIReference/API_OutboundStrategy.html) object

## Contact timestamps
Contact timestamps

**InitiationTimestamp**  
The date and time this contact was initiated, in UTC time. In the case that a voice contact was initiated as part of an outbound campaign, the `InitiationTimestamp` will show when the contact is initiated for the Initiated event, and will be updated to when the call is started in subsequent events.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') 

**ConnectedToSystemTimestamp**  
The date and time the customer endpoint connected to Amazon Connect, in UTC time. For INBOUND, this matches InitiationTimestamp. For OUTBOUND, CALLBACK, and API, this is when the customer endpoint answers.

**EnqueueTimestamp**  
The date and time the contact was added to the queue, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') 

**ConnectedToAgentTimestamp**  
The date and time the contact was connected to the agent, in UTC time.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') 

**DisconnectTimestamp**  
The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') 

**ScheduledTimestamp**  
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.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') 

**GreetingStartTimestamp**  
The date and time that measures the beginning of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**GreetingEndTimestamp**  
The date and time that measures the end of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

### ChatContactMetrics
ChatContactMetrics

Information about the overall participant interactions at the contact level.

**MultiParty**  
A Boolean flag indicating whether multiparty chat or supervisor barge were enabled on this contact.  
Type: Boolean

**TotalMessages**  
The number of chat messages on the contact.  
Type: Integer  
Min value: 0

**TotalBotMessages**  
The total number of bot and automated messages on a chat contact.  
Type: Integer  
Min value: 0

**TotalBotMessageLengthInChars**  
The total number of characters from bot and automated messages on a chat contact.  
Type: Integer  
Min value: 0

**ConversationCloseTimeInMillis**  
The time it took for a contact to end after the last customer message.  
Type: Long  
Min value: 0

**ConversationTurnCount**  
The number of conversation turns in a chat contact, which represents the back-and-forth exchanges between customer and other participants  
Type: Integer  
Min value: 0

**AgentFirstResponseTimestamp**  
The agent first response timestamp for a chat contact.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**AgentFirstResponseTimeInMillis**  
The time for an agent to respond after obtaining a chat contact.  
Type: Long  
Min value: 0

### ParticipantMetrics
ParticipantMetrics

Information about a participant's interactions in a contact.

**ParticipantId**  
The Participant's id.  
Type: String  
Length: 1-256

**ParticipantType**  
Information about the conversation participant. Following are the participant types: [Agent, Customer, Supervisor].  
Type: String

**ConversationAbandon**  
A Boolean flag indicating whether the chat conversation was abandoned by an Participant.  
Type: Boolean

**MessagesSent**  
Number of chat messages sent by Participant.  
Type: Integer  
Min value: 0

**NumResponses**  
Number of chat messages sent by Participant.  
Type: Integer  
Min value: 0

**MessageLengthInChars**  
Number of chat characters sent by Participant.  
Type: Integer  
Min value: 0

**TotalResponseTimeInMillis**  
Total chat response time by Participant.  
Type: Long  
Min value: 0

**MaxResponseTimeInMillis**  
Maximum chat response time by Participant.  
Type: Long  
Min value: 0

**LastMessageTimestamp**  
Timestamp of last chat message by Participant.  
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

## Subscribe to Amazon Connect contact events


Amazon Connect contact events are published using [Amazon EventBridge](https://aws.amazon.com/eventbridge/), and can be enabled in a couple of steps for your Amazon Connect instance in the Amazon EventBridge console by creating a new rule. Although events are not ordered, they have a timestamp which enables you to consume the data.

Events are emitted on a [best effort](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html) basis.

To subscribe to Amazon Connect contact events:

1. In the Amazon EventBridge console, choose **Create rule**.

1. On the **Default rule detail** page, assign a name to the rule, choose **Rule with an event pattern**, and then choose **Next**, as shown in the following image.  
![\[The define rule detail page in the EventBridge console.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/eventbridge-createrule.png)

1. On the **Build event pattern** page, under **Event source**, verify that **AWS events or EventBridge partner events** is selected.

1. Under **Sample event type**, choose **AWS events**, and then choose ** Amazon Connect Contact Event** from the dropdown box, as shown in the following image.  
![\[The sample event section, sample event type is AWS events.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/eventbridge-sampleevents.png)

1. For Creation method choose Use pattern form. In the **Event pattern** section, choose **AWS services**, **Amazon Connect**, **Amazon Connect Contact Event**, and then choose **Next**, as shown in the following image.  
![\[The Creation method and event pattern sections of the default rule detail page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/eventbridge-creationmethod.png)

1. On the Select target(s) page, you can then select a target of your choice, which includes a Lambda function, SQS queue, or SNS topic. For information about configuring targets, [Amazon EventBridge targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html).

1. Optionally configure tags. On the **Review and create** page, choose **Create rule**.

 For more information about configuring rules, see [Amazon EventBridge rules](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html) in the *Amazon EventBridge User Guide*. 

## Sample to stop streaming an event type
Sample to stop streaming an event type

The following sample shows how to stop streaming a `CONTACT_DATA_UPDATED` event from Amazon Connect to EventBridge.

```
{
  "source": [
    "aws.connect"
  ],
  "detail-type": [
    "Amazon Connect Contact Event"
  ],
  "detail": {
    "eventType": [
      {
        "anything-but": [
          "CONTACT_DATA_UPDATED"
        ]
      }
    ]
  }
}
```

## Sample contact event for when a voice call is connected to an agent
Sample contact event for when a voice call is connected to an agent

```
{
    "version": "0",
    "id": "abcabcab-abca-abca-abca-abcabcabcabc",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "111122223333",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...",
        "contactArn",
        "instanceArn"
    ],
    "detail": {
        "initiationTimestamp":"2021-08-04T17:17:53.000Z",
        "contactId":"11111111-1111-1111-1111-111111111111",
        "channel":"VOICE",
        "instanceArn":"arn:aws::connect:your-region:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "initiationMethod":"INBOUND",
        "eventType":"CONNECTED_TO_AGENT",
        "agentInfo":{
          "agentArn":"arn:aws::connect:your-region:123456789012:instance/12345678-1234-1234-1234-123456789012/agent/12345678-1234-1234-1234-123456789012",
          "connectedToAgentTimestamp":"2021-08-04T17:29:09.000Z",
          "hierarchyGroups": { 
                         "level1": {
                            "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901a",
                        },
                        "level2": {
                            "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901b",
                        },
                        "level3": {
                            "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901c",
                        },
                        "level4": {
                            "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901d",
                        },
                        "level5": {
                            "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901e",
                        }
                 } 
            }
        },   
         "queueInfo": {  
            "queueType":"type",
            "queueArn":"arn:aws::connect:your-region:123456789012:instance/12345678-1234-1234-1234-123456789012/queue/12345678-1234-1234-1234-123456789012",
            "enqueueTimestamp":"2021-08-04T17:29:04.000Z"
          },
         "tags": {
            "aws:connect:instanceId":"12345678-1234-1234-1234-123456789012",
            "aws:connect:systemEndpoint":"+11234567890"
         } 
    }
}
```

## Sample contact event for when a voice call is disconnected
Sample contact event for when a voice call is disconnected

The following sample event shows a contact that has a user-defined tag with **Dept** as the key. Note that `queueInfo` is not included in events received by EventBridge when `initiationMethod` is `OUTBOUND`.

```
{
    "version": "0",
    "id": "the event ID",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "111122223333",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...", 
        "contactArn", 
        "instanceArn"
    ],
    "detail": {
        "eventType": "DISCONNECTED",
        "contactId": "11111111-1111-1111-1111-111111111111",
        "initialContactId": "11111111-2222-3333-4444-555555555555",
        "previousContactId": "11111111-2222-3333-4444-555555555555",
        "channel": "Voice",
        "instanceArn": "arn:aws::connect:your-region:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "initiationMethod": "OUTBOUND",
        "initiationTimestamp":"2021-08-04T17:17:53.000Z",
        "connectedToSystemTimestamp":"2021-08-04T17:17:55.000Z",
        "disconnectTimestamp":"2021-08-04T17:18:37.000Z",
        "agentInfo": {
            "agentArn": "arn",
            "connectedToAgentTimestamp":"2021-08-04T17:29:09.000Z",
            "hierarchyGroups": { 
                 "level1": {
                    "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901a",
                },
                "level2": {
                    "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901b",
                },
                "level3": {
                    "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901c",
                },
                "level4": {
                    "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901d",
                },
                "level5": {
                    "arn": "arn:aws:connect:your-region:012345678901:instance/12345678-1234-1234-1234-123456789012/agent-group/abcdefgh-1234-1234-1234-12345678901e",
                }
            } 
        },
           
        "CustomerVoiceActivity": {
           "greetingStartTimestamp":"2021-08-04T17:29:20.000Z",
           "greetingEndTimestamp":"2021-08-04T17:29:22.000Z",
        },
        "tags": {
            "aws:connect:instanceId":"12345678-1234-1234-1234-123456789012",
            "aws:connect:systemEndpoint":"+11234567890",
            "Dept":"Finance"
        }
    }
}
```

## Sample event for when contact properties are updated
Sample contact data updated event

```
{
"version": "0",
    "id": "the event ID",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "the account ID",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...", 
        "contactArn", 
        "instanceArn"
    ],
"detail": {
    "eventType": "CONTACT_DATA_UPDATED",
    "contactId": "the contact ID",
    "channel": "CHAT",
    "instanceArn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID",
    "initiationMethod": "API",
    "queueInfo": {
        "queueArn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/queue/the queue ID",
        "enqueueTimestamp": "2023-10-24T02:39:15.240Z",
        "queueType": "STANDARD"
    },
    "agentInfo": {
        "agentArn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/agent/the agent ID",
        "connectedToAgentTimestamp": "1970-01-01T00:00:00.001Z",
        "hierarchyGroups": {
            "level1": {
                "arn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/agent-group/the agent group ID"
            },
            "level2": {
                "arn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/agent-group/the agent group ID"
            },
            "level3": {
                "arn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/agent-group/the agent group ID"
            },
            "level4": {
                "arn": "arn:aws:connect:us-west-2:the account ID:instance/the instance ID/agent-group/the agent group ID"
            }
        }
    },
    "updatedProperties": ["ContactLens.ConversationalAnalytics.Configuration"],
    "initiationTimestamp": "2023-10-24T02:39:15.154Z",
    "connectedToSystemTimestamp": "1970-01-01T00:00:00.001Z",
    "tags": {
        "aws:connect:instanceId": "the instance ID"
       },
    "contactLens": {
        "conversationalAnalytics": {
            "configuration": {
                "enabled": true,
                "channelConfiguration": {
                    "analyticsModes": ["PostContact"]
                },
                "languageLocale": "en-US",
                "redactionConfiguration": {
                    "behavior": "Enable",
                    "policy": "RedactedAndOriginal",
                    "entities": ["EMAIL"],
                    "maskMode": "EntityType"
                }
            }
        }
    }
}
}
```

## Sample contact event for when a voice call is connected to an agent using routing criteria
Sample contact event for when a voice call is connected to an agent

```
{
    "version": "0",
    "id": "abcabcab-abca-abca-abca-abcabcabcabc",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "111122223333",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...",
        "contactArn",
        "instanceArn"
    ],
    "detail": {
        "ContactId": "12345678-1234-1234-1234-123456789012",
        "Channel": "VOICE",
        "InstanceArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "InitiationMethod": "INBOUND",
        "EventType": "CONNECTED_TO_AGENT",
        "AgentInfo": {
            "AgentArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/agent/12345678-1234-1234-1234-123456789012",
            "ConnectedToAgentTimestamp": "2021-08-04T17:29:09.000Z"
        },
        "QueueInfo": {
            "QueueType": "type",
            "QueueArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/queue/12345678-1234-1234-1234-123456789012",
            "EnqueueTimestamp": "2021-08-04T17:29:04.000Z"
        },
        "tags": {
            "aws:connect:instanceId":"12345678-1234-1234-1234-123456789012",
            "aws:connect:systemEndpoint":"+11234567890"
        },
        "RoutingCriteria": [{
            "ActivationTimestamp": "2021-08-04T17:29:04.000Z",
            "Index": 0,
            "Steps": [{
                "Status": "JOINED",
                "Expiry": {
                    "DurationInSeconds": 60,
                },
                "Expression": {
                    "OrExpression": [{
                       "AttributeCondition": {
                           "Name": "Technology",
                           "ComparisonOperator": "NumberGreaterOrEqualTo",
                           "ProficiencyLevel": 2.0,
                           "Value": "AWS Kinesis"
                       }
                    },
                    {
                       "AttributeCondition": {
                           "Name": "Language",
                           "ComparisonOperator": "NumberGreaterOrEqualTo",
                           "ProficiencyLevel": 4.0,
                           "Value": "English"
                        }
                    }],
                    "AndExpression": [{
                        "AttributeCondition": {
                            "Name": "Language",
                            "ComparisonOperator": "NumberGreaterOrEqualTo",
                            "ProficiencyLevel": 2.0,
                            "Value": "Spanish"
                        }
                    }]
                }
            }]
        }]
    }
}
```

## Sample event for when routing step expires on a contact
Sample event for when routing step expires on a contact

```
{
    "version": "0",
    "id": "the event ID",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "the account ID",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...", 
        "contactArn", 
        "instanceArn"
    ],
    "detail": {
        "eventType":"CONTACT_DATA_UPDATED",
        "contactId":"12345678-1234-1234-1234-123456789012",
        "channel":"CHAT",
        "instanceArn":"arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "initiationMethod":"API",
        "queueInfo":{
            "queueArn":"arn:aws:connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/queue/12345678-1234-1234-1234-123456789012",
            "enqueueTimestamp":"2023-11-01T18:33:03.062Z",
            "queueType":"STANDARD"
        },
        "updatedProperties":["RoutingCriteria.Step.Status"],
        "initiationTimestamp":"2023-11-01T18:33:00.716Z",
        "connectedToSystemTimestamp":"2023-11-01T18:33:01.736Z",
        "tags":{
            "aws:connect:instanceId":"12345678-1234-1234-1234-123456789012"
        },
        "routingCriteria":{
            "steps":[{
                "expiry":{
                    "durationInSeconds":50,
                    "expiryTimestamp":"2023-11-01T18:34:54.275Z"
                },
                "expression":{
                    "attributeCondition":{
                        "name":"Location",
                        "value":"AZ",
                        "proficiencyLevel":3.0,
                        "comparisonOperator":"NumberGreaterOrEqualTo"
                    }
                },
                "status":"EXPIRED"
            },
            {
                "expiry":{
                    "durationInSeconds":10
                },
                "expression":{
                    "attributeCondition":{
                        "name":"Language",
                        "value":"Spanish",
                        "proficiencyLevel":4.0,
                        "comparisonOperator":"NumberGreaterOrEqualTo"
                    }
                },
                "status":"ACTIVE"
            },
            {
                "expression":{
                    "attributeCondition":{
                        "name":"Language",
                        "value":"Spanish",
                        "proficiencyLevel":1.0,
                        "comparisonOperator":"NumberGreaterOrEqualTo"
                    }
                },
                "status":"INACTIVE"
            }],
            "activationTimestamp":"2023-11-01T18:34:04.275Z",
            "index":1
        }
    }
}
```

## Sample contact event for when a voice call is connected to an agent provided by the customer using routing criteria
Sample contact event for when a voice call is connected to an agent provided by the customer using routing criteria

```
{
    "version": "0",
    "id": "abcabcab-abca-abca-abca-abcabcabcabc",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "111122223333",
    "time": "2021-08-04T17:43:48Z",
    "region": "your-region",
    "resources": [
        "arn:aws:...",
        "contactArn",
        "instanceArn"
    ],
    "detail": {
        "ContactId": "12345678-1234-1234-1234-123456789012",
        "Channel": "VOICE",
        "InstanceArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "InitiationMethod": "INBOUND",
        "EventType": "CONNECTED_TO_AGENT",
        "AgentInfo": {
            "AgentArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/agent/12345678-1234-1234-1234-123456789012",
            "ConnectedToAgentTimestamp": "2021-08-04T17:29:09.000Z"
        },
        "QueueInfo": {
            "QueueType": "type",
            "QueueArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012/queue/12345678-1234-1234-1234-123456789012",
            "EnqueueTimestamp": "2021-08-04T17:29:04.000Z"
        },
        "tags": {
            "aws:connect:instanceId":"12345678-1234-1234-1234-123456789012",
            "aws:connect:systemEndpoint":"+11234567890"
        },
        "RoutingCriteria": [{
            "ActivationTimestamp": "2021-08-04T17:29:04.000Z",
            "Index": 0,
            "Steps": [{
                "Status": "JOINED",
                "Expiry": {
                    "DurationInSeconds": 60,
                },
                "Expression": {
                    "AttributeCondition": {
                        "ComparisonOperator": "Match",
                        "MatchCriteria": {
                            "AgentsCriteria": {
                                "AgentIds": ["AGENT_1"]
                            }
                        }
                    }
                }
            }]
        }]
    }
}
```

# Data model for Amazon Connect contact records
Contact records data model

**Note**  
End of support notice: On May 20, 2026, AWS will end support for Amazon Connect Voice ID. After May 20, 2026, you will no longer be able to access Voice ID on the Amazon Connect console, access Voice ID features on the Amazon Connect admin website or Contact Control Panel, or access Voice ID resources. For more information, visit [Amazon Connect Voice ID end of support](https://docs.aws.amazon.com/connect/latest/adminguide/amazonconnect-voiceid-end-of-support.html). 

This article describes the data model for Amazon Connect contact records. Contact records capture the events associated with a contact in your contact center. Real-time and historical metrics are based on the data captured in the contact records.

## Important things to know
Important things to know
+ We continually release new features that result in the addition of new fields to the contact records data model. Any changes we make to the data model are backward compatible. When you develop applications, we recommend that you build them to ignore the addition of new fields in the contact records data model. This will help ensure your applications are resilient.
+ Amazon Connect delivers contact records at least once. Contact records may be delivered again for multiple reasons, such as new information arriving after initial delivery. For example, when you use the [update-contact-attributes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/connect/update-contact-attributes.html) CLI command to update a contact record, Amazon Connect delivers a new contact record. This contact record is available for 24 months from the time the associated contact was initiated.

  If you're building a system that consumes contact record export streams, be sure to include logic that checks for duplicate contact records for a contact. Use the **LastUpdateTimestamp** property to determine if a copy contains new data than previous copies. Then use the **ContactId** property for deduplication. 
+ Every action taken on a unique contact generates an event. These events appear as a field or an attribute on the contact record. If the number of actions for a contact exceeds a threshold, such as an internal storage limit, then any actions that follow will not appear on that contact record.
+ For the contact record retention period and maximum size of the attributes section of a contact record, see [Amazon Connect feature specifications](feature-limits.md).
+ For information about when a contact record is created (and thus can be exported or used for data reporting), see [Events in the contact record](about-contact-states.md#ctr-events).
+ For a list of all contact attributes, including telephony call and case attributes, see [List of available contact attributes in Amazon Connect and their JSONPath references](connect-attrib-list.md).
+ In the past we referred to *contact records* as *Contact Trace Records (CTR)*. Now we use the term *contact record* only. There is no difference between the two terms.

## Agent


Information about the agent who accepted the incoming contact.

**AcceptedByAgentTimestamp**  <a name="AcceptedByAgentTimestamp-CTR"></a>
The date and time the outbound campaigns voice contact in preview dialing mode was accepted by the agent, in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**AgentInteractionDuration**  <a name="AgentInteractionDuration-CTR"></a>
The time, in whole seconds, that an agent interacted with a customer. For outbound calls, this is the time, in whole seconds, that an agent was connected to a contact, even if the customer is not present.   
This does not include agent pause duration (which applies only to tasks).  
Type: Integer  
Min value: 0

**AgentPauseDuration**  <a name="AgentPauseDuration-CTR"></a>
The time, in whole seconds, that a task assigned to an agent was paused.  
Type: Integer  
Min value: 0

**AfterContactWorkDuration**  <a name="AfterContactWorkDuration-CTR"></a>
The difference in time, in whole seconds, between `AfterContactWorkStartTimestamp` and `AfterContactWorkEndTimestamp`.  
Type: Integer  
Min value: 0

**AfterContactWorkEndTimestamp**  
The date and time when the agent stopped doing After Contact Work for the contact, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**AfterContactWorkStartTimestamp**  
The date and time when the agent started doing After Contact Work for the contact, in UTC time.   
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**ARN**  
The Amazon Resource Name of the agent.  
Type: ARN

**Capabilities**  
Information about Agent's capabilities.  
Type: Capabilities

**ConnectedToAgentTimestamp**  
The date and time the contact was connected to the agent, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**CustomerHoldDuration**  <a name="CustomerHoldDuration-CTR"></a>
The time, in whole seconds, that the customer spent on hold while connected to the agent.  
Type: Integer  
Min value: 0

**AgentInitiatedHoldDuration**  <a name="AgentInitiatedHoldDuration-CTR"></a>
The total time, in whole seconds, that a specific agent placed a customer on hold. In multi-party scenarios, if Agent A puts a customer on hold and then drops from the call, and Agent B later takes the customer off hold, the remaining hold duration is attributed to Agent B.  
The key distinction between CustomerHoldDuration and AgentInitiatedHoldDuration is:  
+ CustomerHoldDuration tracks all hold time from a customer's perspective.
+ AgentInitiatedHoldDuration tracks hold time initiated by specific agents, making it especially valuable in multi-party call scenarios.
For non-multiparty scenarios, CustomerHoldDuration and AgentInitiatedHoldDuration will be the same.  
Type: Integer  
Min value: 0

**DeviceInfo**  
Information about agent's device.  
Type: [DeviceInfo](#ctr-deviceinfo) 

**HierarchyGroups**  
The agent hierarchy groups for the agent.  
Type: [AgentHierarchyGroups](#ctr-AgentHierarchyGroups)

**LongestHoldDuration**  
The longest time, in whole seconds, that the customer was put on hold by the agent.  
Type: Integer  
Min value: 0

**NumberOfHolds**  
The number of times the customer was put on hold while connected to the agent.  
Type: Integer  
Min value: 0

**PreviewEndTimestamp**  
The date and time the agent finishes previewing outbound campaigns voice contact in preview dialing mode, in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**RoutingProfile**  
The routing profile of the agent.  
Type: [RoutingProfile](#ctr-RoutingProfile)

**Username**  
The username of the agent.  
Type: String  
Length: 1-100

**StateTransitions**  
The state transitions of a supervisor.  
Type: Array of [StateTransitions](#ctr-StateTransitions).

## AgentHierarchyGroup


Information about an agent hierarchy group.

**ARN**  
The Amazon Resource Name (ARN) of the group.  
Type: ARN

**GroupName**  
The name of the hierarchy group.  
Type: String  
Length: 1-256

## AgentHierarchyGroups


Information about the agent hierarchy. Hierarchies can be configured with up to five levels.

**Level1**  
The group at level one of the agent hierarchy.  
Type: [AgentHierarchyGroup](#ctr-AgentHierarchyGroup)

**Level2**  
The group at level two of the agent hierarchy.  
Type: [AgentHierarchyGroup](#ctr-AgentHierarchyGroup)

**Level3**  
The group at level three of the agent hierarchy.  
Type: [AgentHierarchyGroup](#ctr-AgentHierarchyGroup)

**Level4**  
The group at level four of the agent hierarchy.  
Type: [AgentHierarchyGroup](#ctr-AgentHierarchyGroup)

**Level5**  
The group at level five of the agent hierarchy.  
Type: [AgentHierarchyGroup](#ctr-AgentHierarchyGroup)

## AttributeCondition


An object to specify the predefined attribute condition.

**Name**  
The name of predefined attribute.  
Type: String  
Length: 1-64

**Value**  
The value of predefined attribute.  
Type: String  
Length: 1-64

**ComparisonOperator**  
The comparison operator of the condition.  
Type: String  
Valid values: NumberGreaterOrEqualTo, Match, Range

**ProficiencyLevel**  
The proficiency level of the condition.  
Type: Float  
Valid values: 1.0, 2.0, 3.0, 4.0 and 5.0

**Range**  
An Object to define the minimum and maximum proficiency levels.  
Type: Range object

**MatchCriteria**  
An object to define AgentsCriteria.  
Type: MatchCriteria object

**AgentsCriteria**  
An Object to define agentIds.  
Type: AgentsCriteria object

**AgentIds**  
An object to specify a list of agents, by Agent ID.  
Type: Array of strings  
Length Constraints: Maximum length of 256

## ChatMetrics


Information about how agent, bot and customer interact in a chat contact. ChatMetrics includes the following sub-categories: [ContactMetrics](#ctr-ContactMetrics), [CustomerMetrics](#ctr-CustomerMetrics), and [AgentMetrics](#ctr-AgentMetrics). 

## ContactMetrics


Information about the overall participant interactions at the contact level, which includes the following metrics:

**MultiParty**  
A Boolean flag indicating whether multiparty chat or supervisor barge were enabled on this contact.  
Type: Boolean

**TotalMessages**  
The number of chat messages on the contact.  
Type: Integer  
Min value: 0

**TotalBotMessages**  
The total number of bot and automated messages on a chat contact.  
Type: Integer  
Min value: 0

**TotalBotMessageLengthInChars**  
The total number of characters from bot and automated messages on a chat contact.  
Type: Integer  
Min value: 0

**ConversationCloseTimeInMillis**  
The time it took for a contact to end after the last customer message.  
Type: Long  
Min value: 0

**ConversationTurnCount**  
The number of conversation turns in a chat contact.  
Type: Integer  
Min value: 0

**AgentFirstResponseTimestamp**  
The agent first response Timestamp for a chat contact.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**AgentFirstResponseTimeInMillis**  
The time for an agent to respond after obtaining a chat contact.  
Type: Long  
Min value: 0

## CustomerMetrics


Information about customer interactions in a contact, which includes the following metrics:

**Type**  
 [ParticipantMetrics](#ctr-ParticipantMetrics) Object

## AgentMetrics


Information about agent interactions in a contact, which includes the following metrics:

**Type**  
 [ParticipantMetrics](#ctr-ParticipantMetrics) Object

## ParticipantMetrics


Information about individual participant metrics in a chat contact.

**ParticipantId**  
The Participant's participant ID.  
Type: String  
Length: 1-256

**ParticipantType**  
Information about the conversation participant. The following participant types are supported: Agent, Customer, Supervisor.  
Type: String

**ConversationAbandon**  
A Boolean flag indicating whether the chat conversation was abandoned by Participant.  
Type: Boolean

**MessagesSent**  
The number of chat messages sent by Participant.  
Type: Integer  
Min value: 0

**NumResponses**  
The number of responses sent by Participant.  
Type: Integer  
Min value: 0

**MessageLengthInChars**  
The number of chat characters sent by Participant.  
Type: Integer  
Min value: 0

**TotalResponseTimeInMillis**  
The total chat response time by Participant.  
Type: Long  
Min value: 0

**MaxResponseTimeInMillis**  
The maximum chat response time by Participant.  
Type: Long  
Min value: 0

**LastMessageTimestamp**  
The Timestamp of last chat message by Participant.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

## ContactDetails


Contains user-defined attributes which are lightly typed within the contact. 

This object is used only for task contacts. For voice or chat contacts, or for tasks that have contact attributes set with the flow block, check the [ContactTraceRecord](#ctr-ContactTraceRecord) Attributes object. 

**ContactDetailsName**  
Type: String  
Length: 1-128

**ContactDetailsValue**  
Type: String  
Length: 0-1024

**ReferenceAttributeName**  
Type: String  
Length: 1-128

**ReferenceAttributesValue**  
Type: String  
Length: 0-1024

## ContactTraceRecord


Information about a contact.

To learn about all system-defined segment attributes, see [Segment attributes](connect-attrib-list.md#attribs-segment-attributes). 

**Agent**  
If this contact successfully connected to an agent, this is information about the agent.  
Type: [Agent](#ctr-Agent)

**Customer**  
Information about the person (customer) who contacts your contact center.  
Type: [Customer](#ctr-Customer)

**AgentConnectionAttempts**  
The number of times Amazon Connect attempted to connect this contact with an agent.  
Type: Integer  
Min value: 0

**Attributes**  
The contact attributes, formatted as a map of keys and values.  
Type: Attributes  
Members: `AttributeName`, `AttributeValue` 

**AWSAccountId**  
The ID of the AWS account that owns the contact.  
Type: String

**AWSContactTraceRecordFormatVersion**  
The record format version.  
Type: String

**Channel**  
How the contact reached your contact center.  
Valid values: `VOICE`, `CHAT`, `TASK`, `EMAIL`

**ConnectedToSystemTimestamp**  
The date and time the customer endpoint connected to Amazon Connect, in UTC time. For `INBOUND`, this matches InitiationTimestamp. For `OUTBOUND`, `CALLBACK`, and `API`, this is when the customer endpoint answers.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**ContactId**  
The ID of the contact.  
Type: String  
Length: 1-256

**ContactLens**  
Information about Contact Lens features applied to this contact.  
Type: [ContactLens](#ctr-ContactLens) 

**CustomerId**  
The customer's identification number. For example, the CustomerId may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the CustomerSpeakerId of the caller.  
Type: String 

**CustomerEndpoint**  
The customer or external third party participant endpoint.  
Type: [Endpoint](#ctr-endpoint), `EMAIL_ADDRESS`

**CustomerVoiceActivity**  
This field is populated for calls using answering machine detection (AMD), which is only available for Outbound Campaigns. Otherwise, this field is null.  
The `CustomerVoiceActivity` object includes the following properties:    
**GreetingStartTimestamp**  
The date and time that measures the beginning of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')  
**GreetingEndTimestamp**  
The date and time that measures the end of the customer greeting from an outbound voice call, in UTC time.   
Type: String (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

**DisconnectTimestamp**  
The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**DisconnectReason**  
Indicates how the contact was terminated. This data is available in the Amazon Connect contact record stream and **Contact details** page.  
The disconnect reason standardizes responses across different telephony providers into unified disconnect reasons. This helps you identify issues such as invalid numbers, call rejections, and spam blocking (both temporary and permanent). With these definitive telephony events, you can make data-driven decisions about how to handle call terminations.  
Type: String  
Voice contacts can have the following disconnect reasons:  
+ `TELECOM_BUSY` – The call attempt to the third party returns a network busy signal. This indicates the endpoint you are trying to call currently cannot take a call because it is currently engaged.
+ `TELECOM_NUMBER_INVALID` – The number you are attempting to call either lacks proper E164 formatting, or the number you are attempting to call does not exist or is no longer in use.
+ `TELECOM_POTENTIAL_BLOCKING` – The call attempt to the customer receives a response from multiple networks that suggest the number currently faces blocking based on network level blocks.
**Note**  
Amazon Connect helps customers flag spam blocking based on its own best practice. Because spam blocking lacks global unification, a very small number of false positives may occur in this category. Amazon Connect expects to see around 1% of calls have this effect. If blocking occurs, we recommend you review the carrier network you are calling, and you should contact the carrier you are attempting to call to determine why the call faced blocking. Due to blocking rules, AWS cannot unblock networks on your behalf.
+ `TELECOM_UNANSWERED` – Amazon Connect attempts to deliver the call via multiple routes and currently receives messages from either the network or the handset confirming that the system cannot deliver the call at this time.
+ `TELECOM_TIMEOUT` – If the call attempt occurs on multiple networks and reaches 60 seconds of ringing, the system reports that it has reached the timeout point for this call attempt.
+ `TELECOM_ORIGINATOR_CANCEL` – This occurs when the call is cancelled by the originating party before the connection is established. For inbound calls, this happens when the customer cancels the call before connecting. For outbound calls, this occurs when the agent/API user cancels the call before connecting, or when the call remains unanswered after 60 seconds.
+ `TELECOM_PROBLEM` – If we try to reach this customer via multiple networks and receive responses from the PSTN that indicate a problem exists with the destination network where we cannot reach the end network but believe the number remains valid, this reason code applies.
**Note**  
Amazon Connect attempts to make calls as part of outbound configuration with multiple providers as our coverage guide shows. If the guide indicates multi-carrier setup, the result from multiple networks shows the problem links to the third-party network. Amazon Connect expects around 2% of calls on average to have this effect. You do not need to report any telecom problem to AWS Support, and this does not represent an Amazon Connect failure.
+ `CUSTOMER_NEVER_ARRIVED` – When someone creates an inbound web calling contact, Amazon Connect automatically terminates the contact if the customer doesn't connect within a specified period of time. 
+ `THIRD_PARTY_DISCONNECT` – If a call connects with the customer and agent engaging, this flag triggers if the remote side of the call initiates the disconnect.
+ `CUSTOMER_DISCONNECT` – If a call connects with the customer and agent engaging, this flag triggers if the customer side of the call initiates the disconnect. This state cannot distinguish between poor reception and deliberate disconnection.
+ `AGENT_DISCONNECT` – If a call connects with the customer and agent engaging, this flag triggers if the agent side of the call initiates the disconnect.
+ `BARGED` – If a call connects with the customer and agent engaging but a manager disconnects the agent from the call.
+ `CONTACT_FLOW_DISCONNECT` – Indicates the contact faced termination by a disconnect/hang up block within the contact flow.
+ `OTHER` – Indicates disconnection reasons not covered by the above codes, such as disconnections that API calls initiate.
Outbound campaign voice contacts can have the following disconnect reasons:  
+ `OUTBOUND_DESTINATION_ENDPOINT_ERROR`: Current configurations do not allow this destination to be dialed (for example, calling an endpoint destination from an ineligible instance).
+ `OUTBOUND_RESOURCE_ERROR`: Instance has insufficient permissions to make outbound calls or necessary resources were not found.
+ `OUTBOUND_ATTEMPT_FAILED`: There was an unknown error, invalid parameter, or insufficient permissions to call the API.
+ `OUTBUND_PREVIEW_DISCARDED`: No contact made; recipient removed from list; no further attempts will be made.
+ `EXPIRED`: Not enough agents available, or not enough telecom capacity for such calls.
Chats can have the following disconnect reasons:  
+ `AGENT_DISCONNECT`: Agent explicitly disconnects or rejects a chat.
+ `CUSTOMER_DISCONNECT`: Customer explicitly disconnects.
+ `AGENT_NETWORK_DISCONNECT`: Agent disconnected from the chat due to network issue.
+ `CUSTOMER_CONNECTION_NOT_ESTABLISHED`: Customer starts chat but never gets connection (websocket or streaming).
+ `EXPIRED`: Chat disconnected due to expiration of configured chat duration.
+ `CONTACT_FLOW_DISCONNECT`: Chat was disconnected or completed by a flow.
+ `API`: The StopContact API was called to end the chat.
+ `BARGED`: Manager disconnected the agent from the barged-in chat.
+ `IDLE_DISCONNECT`: Disconnect due to an idle participant.
+ `THIRD_PARTY_DISCONNECT`: In chat that involves multiple participants, if Agent 1 disconnects Agent 2 while the contact is still on the chat, Agent 2's disconnect reason is `THIRD_PARTY_DISCONNECT`. 
+ `SYSTEM_ERROR`: An error in the system causing a chat session to end abnormally.
The disconnect reason will be recorded as 'null' for contacts that end for reasons outside of the list above.  
Tasks can have the following disconnect reasons:  
+ `AGENT_COMPLETED`: Agent completed the actions required for the task and disconnected the contact before allotted time expired. (Applicable for TASK contacts)
+ `AGENT_DISCONNECT`: Agent marked the task as complete.
+ `EXPIRED`: Task expired automatically because it was not assigned or completed within 7 days.
+ `CONTACT_FLOW_DISCONNECT`: Task was disconnected or completed by a flow.
+ `API`: The [StopContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StopContact.html) API was called to end the task.
+ `OTHER`: This includes any reason not explicitly covered by the previous codes.
Emails can have the following disconnect reasons:  
+ `TRANSFERRED`: The email contact was transferred to another queue or to another agent.
+ `AGENT_DISCONNECT`: An agent disconnected or closed the email contact without responding to it.
+ `EXPIRED`: The email contact expired before it could be accepted or handled by an agent. This could be due to agents not being available, or the queue capacity was not enough to handle the email before is expired.
+ `DISCARDED`: The outbound (agent replies or agent-initiated) email contact was discarded in draft state.
+ `CONTACT_FLOW_DISCONNECT`: The email contact was disconnected in a flow.
+ `API`: The [StopContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StopContact.html) API was called to end the email contact.
+ `OTHER`: This includes any reason not explicitly covered by the previous reasons.

**AnsweringMachineDetectionStatus**  
Indicates how an [outbound campaign](how-to-create-campaigns.md) call is actually disposed if the contact is connected to Amazon Connect.  
Valid values:  
+ `HUMAN_ANSWERED`: The number dialed was answered by a person.
+ `VOICEMAIL_BEEP`: The number dialed was answered by voicemail with a beep.
+ `VOICEMAIL_NO_BEEP`: The number dialed was answered by a voicemail with no beep.
+ `AMD_UNANSWERED`: The number dialed kept ringing, but the call was not picked up.
+ `AMD_UNRESOLVED`: The number dialed was connected but the answering machine detection could not determine whether the call was picked up by a person or voicemail.
+ `AMD_UNRESOLVED_SILENCE`: The number dialed was connected but the answering machine detection observed silence.
+ `AMD_NOT_APPLICABLE`: The call disconnected before ringing, and there was no media to detect.
+ `SIT_TONE_BUSY`: The number dialed was busy
+ `SIT_TONE_INVALID_NUMBER`: The number dialed was not a valid number.
+ `SIT_TONE_DETECTED`: A special information tone (SIT) was detected.
+ `FAX_MACHINE_DETECTED`: A fax machine was detected.
+ `AMD_ERROR`: The number dialed was connected, but there was an error in answering machine detection.

**InitialContactId**  
The identifier of the initial contact.  
Type: String  
Length: 1-256

**InitiationMethod**  
Indicates how the contact was initiated. For more information, see [Contact initiation methods and flow types in your Amazon Connect contact center](contact-initiation-methods.md).  
Valid values:  
+  `INBOUND`: The customer initiated voice (phone) contact with your contact center. 
+  `OUTBOUND`: An agent initiated voice (phone) contact with the customer, by using the CCP to call their number.
+  `TRANSFER`: The customer was transferred by an agent to another agent or to a queue, using quick connects in the CCP. This results in the creation of a new contact record.
+  `CALLBACK`: The customer was contacted as part of a callback flow. 

  For more information about the InitiationMethod in this scenario, see [Queued callbacks in real-time metrics in Amazon Connect](about-queued-callbacks.md). 
+  `API`: The contact was initiated with Amazon Connect by API. This could be an outbound contact you created and queued to an agent, using the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API, or it could be a live chat that was initiated by the customer with your contact center, where you called the [StartChatConnect](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) API.
+  `WEBRTC_API`: The contact used the communication widget with video call.
+  `QUEUE_TRANSFER`: While the customer was in one queue (listening to Customer queue flow), they were transferred into another queue using a flow block.
+  `EXTERNAL_OUTBOUND`: An agent initiated voice (phone) contact with an external participant to your contact center using either quick connect in the CCP or a flow block.
+  `MONITOR`: A supervisor initiated monitor on an agent. The supervisor can silently monitor the agent and customer, or barge the conversation.
+  `DISCONNECT`: When a [Set disconnect flow](set-disconnect-flow.md) block is triggered, it specifies which flow to run after a disconnect event during a contact. 

  A disconnect event is when:
  + A chat, or task is disconnected.
  + A task is disconnected as a result of a flow action.
  + A task expires. The task is automatically disconnected when it completes its expiry timer. The default is 7 days and task expiry is configurable up to 90 days. 

  If a new contact is created while running a disconnect flow, then the initiation method for that new contact is DISCONNECT.
+  `AGENT_REPLY`: An agent has replied to an inbound email contact to create an outbound email reply.
+  `FLOW`: An email intiated by the [Send message](send-message.md) block.
+  `CAMPAIGN_PREVIEW`: The contact was initiated by an outbound campaign using preview dialing mode. The agent previews customer information before the call is placed.

**InitiationTimestamp**  
The date and time this contact was initiated, in UTC time.   
+ For `INBOUND`, this is when the contact arrived.
+ For `OUTBOUND`, this is when the agent began dialing.
+ For `CALLBACK`, this is when the callback contact was created.
+ For `EXTERNAL_OUTBOUND`, this is when the agent started dialing the external participant.
+  For `MONITOR`, this is when the manager started listening to a contact. 
+ For `TRANSFER` and `QUEUE_TRANSFER`, this is when the transfer was initiated.
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)  
In the case of tasks, InitiationTimestamp signifies when the task contact was created, whereas EnqueueTimestamp signifies time when the task contact was put in a queue to match the contact with agent.   
You can configure flows so there is processing done on the task before a contact is queued. For example, this processing can take one minute or maybe several days. Many tasks, especially those used for backoffice processing aren't queued so they may have an InitiationTimestamp but not an EnqueueTimestamp.   
Scheduled tasks get initiated when a contact is created, however they only start running flows when the schedule is met.   
The 7 days expiry value is not absolute and there could be cases where tasks expire just beyond 7 days ( 7.01 days )

**InstanceARN**  
The Amazon Resource Name of the Amazon Connect instance.  
Type: ARN

**LastUpdateTimestamp**  
The date and time this contact was last updated, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**LastPausedTimestamp**  
The date and time this contact was last paused, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**LastResumedTimestamp**  
The date and time this contact was last resumed, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**MediaStreams**  
The media streams.  
Type: Array of [MediaStream](#MediaStream)

**NextContactId**  
The ID of the contact created when:  
+ An agent uses a Quick Connect or the number pad on the CCP.
—or—  
+ One of the following flow blocks is run:
  + [Transfer to flow](transfer-to-flow.md)
  + [Transfer to queue](transfer-to-queue.md)
  + [Set disconnect flow](set-disconnect-flow.md)
—or—  
+ An additional WebRTC (audio or video) participant is added.
Type: String  
Length: 1-256

**OutboundStrategy**  
Information about the outbound strategy.  
Type: [OutboundStrategy](https://docs.aws.amazon.com/connect/latest/APIReference/API_OutboundStrategy.html) object

**PreviousContactId**  
The ID of the previous contact from which the current contact is created when:  
+ An agent uses a Quick Connect or the number pad on the CCP.
—or—  
+ One of the following flow blocks is run:
  + [Transfer to flow](transfer-to-flow.md)
  + [Transfer to queue](transfer-to-queue.md)
  + [Set disconnect flow](set-disconnect-flow.md)
—or—  
+ An additional WebRTC (audio or video) participant is added.
Type: String  
Length: 1-256

**Queue**  
If this contact was queued, this is information about the queue.  
Type: [QueueInfo](#ctr-QueueInfo)

**Campaign**  
Information associated with a campaign.  
Type: [Campaign](https://docs.aws.amazon.com/connect/latest/APIReference/API_Campaign.html) object

**DisconnectDetails**  
Information about the call disconnect experience.  
Type: [DisconnectDetails](#ctr-disconnectdetails)

**QualityMetrics**  
Information about the quality of participant's media connection when the participant is talking during the call.  
Type: [QualityMetrics](#ctr-qualitymetrics)

**Recording**  
If recording was enabled, this is information about the recording.  
Type: [RecordingInfo](#ctr-RecordingInfo)

**Recordings**  
If recording was enabled, this is information about the recording.  
Type: Array of [RecordingsInfo](#ctr-RecordingsInfo)  
The first recording for a contact will appear in both the Recording and Recordings sections of the contact record.

**Connect AI agents**  
If Amazon Q was enabled on the contact, this is information about the Amazon Q session.  
Type: [WisdomInfo](#ctr-wisdominfo)

**RelatedContactId**  
If this contact is associated with another contact, this is the identifier of the related contact.  
Type: String  
Length: 1-256.

**ScheduledTimestamp**  
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.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**SegmentAttributes**  
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 \$1 characters.  
SegmentAttributes are where the email subject and SES flags are stored for email contacts.  
This field can be used to show channel subtype. For example, `connect:Guide` or `connect:SMS`.  
Type: SegmentAttributes   
Members: SegmentAttributeName, SegmentAttributeValue

**SystemEndpoint**  
The system endpoint. For `INBOUND`, this is the phone number that the customer dialed. For `OUTBOUND` and `EXTERNAL_OUTBOUND`, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For `CALLBACK`, this is the caller ID number used to dial out to customer. If a caller ID number is explicitly configured in the Transfer to Queue block, that number is used to dial out to the customer. If no caller ID is configured in the Transfer to Queue block, the outbound caller ID number configured in the queue is used to dial out to the customer. If no caller ID is configured, SystemEndpoint value will show up as anonymous.  
When [Transfer to phone number](transfer-to-phone-number.md) block is used without specifying a custom caller ID, the caller ID of the caller is passed as the caller ID. For example, if you transfer to an external number and no custom caller ID is used to specify that the call is coming from your organization, then the contact's caller ID is displayed to the external party.  
Type: [Endpoint](#ctr-endpoint), `EMAIL_ADDRESS`

**AdditionalEmailRecipients**  
The To and CC fields.  
Type: String  
Length: 1-256

**ContactAssociationId**  
A contact identifier that is common across all contacts linked by relatedContactId. This is used for email contacts in a thread.  
Type: Integer 

**TotalPauseCount**  
Total number of pauses including when the contact was not connected.  
Type: Integer 

**TotalPauseDurationInSeconds**  
Total pause duration, including before and after the agent was connected.  
Type: Integer 

**TransferCompletedTimestamp**  
TransferCompleteTimestamp is populated when the agent (who initiated the transfer) disconnects before the new agent joining (cold transfer). If the agent who initiated the transfer does not disconnect before the new agent connected (warm transfer), TransferCompleteTimestamp is not populated on the initial agent's contact.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**TransferredToEndpoint**  
If this contact was transferred out of Amazon Connect, the transfer endpoint.  
Type: [Endpoint](#ctr-endpoint)

**Tags**  
[Tags](granular-billing.md) associated with the contact. This contains both AWS generated and user-defined tags.   
Type: String to string map

**GlobalResiliencyMetadata**  
Information about the global resiliency configuration for the contact, including traffic distribution details.  
Type: [GlobalResiliencyMetadata](#ctr-GlobalResiliencyMetadata)

## ContactLens


Contact Lens information, if Contact Lens is enabled on the flow.

**ConversationalAnalytics**  
Information about the [Contact Lens conversational analytics](analyze-conversations.md) feature.   
An object that holds the conversational analytics behavior for the contact.  
Type: [ConversationalAnalytics](#ctr-ConversationalAnalytics)

## ConversationalAnalytics


Information about [Contact Lens conversational analytics](analyze-conversations.md).

**Configuration**  
Configuration for conversational analytics for the contact.  
Type: [Configuration](#ctr-Configuration)

## Configuration


Configuration for Contact Lens conversational analytics. You configure conversational analytics by using the [Set recording and analytics behavior](set-recording-behavior.md) flow block in the Amazon Connect admin website, or by using the [UpdateContactRecordingBehavior](https://docs.aws.amazon.com/connect/latest/APIReference/contact-actions-updatecontactrecordingbehavior.html) contact action in the Flow language. 

**Enabled**  
Is Contact Lens enabled for the contact?  
Type: Boolean

**ChannelConfiguration**  
Channel-specific Contact Lens conversational analytics configuration for the contact. Conversational analytics configuration is mapped to the flow block that can process contacts from different channels. While majority of configuration parameters apply to all channels, this object contains a subset that are channel-specific.  
Type: [ChannelConfiguration](#ctr-ChannelConfiguration)

**LanguageLocale**  
Language locale used by Contact Lens to analyze the contact.  
Type: String

**RedactionConfiguration**  
Redaction configuration for the contact.  
Type: [RedactionConfiguration](#ctr-RedactionConfiguration)

**SentimentConfiguration**  
Sentiment configuration for the contact.  
Type: [SentimentConfiguration](#ctr-SentimentConfiguration)

## ChannelConfiguration


Channel configuration for the contact.

**AnalyticsModes**  
List of analytics modes for the contact.  
Type: [AnalyticsModes](#ctr-AnalyticsModes)

## Customer


Information about the person (customer) who contacts your contact center.

**Capabilities**  <a name="Capabilities-CTR"></a>
Information about customer’s capabilities.  
Type: [Capabilities](#ctr-Capabilities)

## Capabilities


Information about the Video and ScreenShare capabilities.

**Video**  <a name="Video-CTR"></a>
Valid values: SEND.

**ScreenShare**  <a name="ScreenShare-CTR"></a>
Valid values: SEND.

## AnalyticsModes


List of analytics modes for the contact. 

**AnalyticsModes**  
Analytics mode for the contact.  
Type: String  
Valid values for voice: `PostContact` \$1 `RealTime`  
Valid values for chat: `ContactLens`

## RedactionConfiguration


Redaction configuration for the contact.

**Behavior**  
Indicates whether redaction is enabled for sensitive data, such as personal information, in the Contact Lens output file and audio recording. When this field is set to `Disabled` all other values in this object are ignored.  
Type: String  
Valid values: `Enable` \$1 `Disable`

**Policy**  
Indicates whether you get both the redacted and the original transcripts and audio files, just the redacted transcripts and audio files, or only transcript with unredacted content. `None` indicates no redaction is applied.  
Type: String  
Valid values: `None` \$1 `RedactedOnly` \$1 `RedactedAndOriginal`

**Entities**  
List of redaction entities for the contact. If this is present, only entities mentioned in this list are redacted.  
Type: [Entities](#ctr-Entities)

**MaskMode**  
How sensitive information in a contact record should be masked.   
+ When `PII` is selected, all redacted entities are replaced with `[PII]` string. 
+ When `EntityType` is selected, all redacted entities are replaced with the label of the entity. For example, when `EMAIL` entity is configured for redaction, emails in the transcript are replaced by `[EMAIL]` string.
Type: String  
Valid values: `PII ` \$1 `EntityType` 

## SentimentConfiguration


Sentiment configuration for the contact.

**Behavior**  
Indicates whether sentiment analysis is enabled or disabled for contacts, default value is `Enable`.   
Type: String  
Valid values: `Enable` \$1 `Disable`

## Entities


List of redaction entities for the contact.

**Entity**  
Entities that should be redacted for the contact.  
Type: String  
Min value: 0

## SummaryConfiguration


Summary configurations for the contact.

**SummaryModes**  
List of summary modes for the contact.  
Type: [SummaryModes](#ctr-SummaryModes)  
Max value: 1

## SummaryModes


List of summary modes for the contact. `PostContact` summary mode means [generative AI-powered post-contact summaries](view-generative-ai-contact-summaries.md) are enabled for the contact.

**SummaryMode**  
Summary mode for the contact.   
Type: String  
Valid values: `PostContact`

## DeviceInfo


Information about participant's device. 

**PlatformName**  
Name of the platform that the participant used for the call.   
Type: String  
Length: 1-128

**PlatformVersion**  
Version of the platform that the participant used for the call.   
Type: String  
Length: 1-128

**OperatingSystem**  
Operating system that the participant used for the call.  
Type: String  
Length: 1-128

## DisconnectDetails


Information about the call disconnect experience. For information about how to use this data to troubleshoot call disconnects, see [Troubleshoot call disconnects by using DisconnectDetails in the contact record](troubleshoot-call-disconnects.md). 

**PotentialDisconnectIssue**  
Indicates the potential disconnection issues for a call. This field is not populated if the service does not detect potential issues.  
Type: String  
Length: 0-128  
Valid values:   
+ `AGENT_CONNECTIVITY_ISSUE`: Indicates potential issues with agent network connectivity.
+ `AGENT_DEVICE_ISSUE`: Indicates problems with the customer hearing the agent due to potential issues with the agent's device such as their workstation, headset, or microphone. 
+ `CUSTOMER_CONNECTIVITY_ISSUE`: Indicates potential issues with customer network connectivity.
+ `CUSTOMER_DEVICE_ISSUE`: Indicates problems with the customer hearing the agent due to potential issues with the customer's device such as their device speaker or microphone.

## Endpoint


Information about an endpoint. In Amazon Connect, an endpoint is the destination for a contact, such as a customer phone number, or a phone number for your contact center.

**Address**  
The value for the type of endpoint. For `TELEPHONE_NUMBER`, the value is a phone number in E.164 format.  
Type: String  
Length: 1-256

**Type**  
The endpoint type. Currently, an endpoint can only be a telephone number.  
Valid values: `TELEPHONE_NUMBER` 

## Expiry


An object to specify the expiration of a routing step.

**DurationInSeconds**  
The number of seconds to wait before expiring the routing step.  
Type: Integer  
Min value: 0

**ExpiryTimestamp**  
The Timestamp indicating when the routing step expires.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

## Expression


A tagged union to specify expression for a routing step.

**AndExpression**  
List of routing expressions which will be AND-ed together.  
Type: Expression  
Min value: 0

**OrExpression**  
List of routing expressions which will be OR-ed together.  
Type: Expression

**AttributeCondition**  
An object to specify the predefined attribute condition.  
Type: AttributeCondition

**NotAttributeCondition**  
An object to specify the predefined attribute condition to exclude agents with certain proficiencies.  
Type: AttributeCondition

## ExternalThirdParty


Information about the External Third Party participant.

**ExternalThirdPartyInteractionDuration**  
The time, in whole seconds, that the external participant interacted with the customer.  
Type: Integer  
Min value: 0

## GlobalResiliencyMetadata


Information about the global resiliency configuration for the contact, including traffic distribution details.

**ActiveRegion**  
The current AWS region in which the contact is active. This indicates where the contact is being processed in real-time.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.

**OriginRegion**  
The AWS region where the contact was originally created and initiated. This may differ from the `ActiveRegion` if the contact has been transferred across regions.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.

**TrafficDistributionGroupId**  
The identifier of the traffic distribution group.  
Type: String  
Pattern: `^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`

## ContactEvaluations


Information about the contact evaluation.

**FormId**  
A unique identifier for the form. It is always present.  
Type: String

**EvaluationArn**  
The Amazon Resource Name for the evaluation form. It is always present.  
Type: String

**Status**  
The status of the evaluation.   
Type: String  
Valid values: `COMPLETE`, `IN_PROGRESS`, `DELETED`

**StartTimestamp**  
The date and time when the evaluation was started, in UTC time.   
Type: String (*yyyy-mm-dd*T*hh:mm:ss*Z)

**EndTimestamp**  
The date and time when the evaluation was submitted, in UTC time.   
Type: String (*yyyy-mm-dd*T*hh:mm:ss*Z)

**DeleteTimestamp**  
The date and time when the evaluation was deleted, in UTC time.   
Type: String (*yyyy-mm-dd*T*hh:mm:ss*Z)

**ExportLocation**  
The path where evaluation was exported.   
Type: String  
Length: 0-256

## MediaStream


Information about the media stream used during the contact.

**Type**  
Type: MediaStreamType  
Valid values: `AUDIO`, `CHAT`, `AUTOMATED_INTERACTION` 

## QualityMetrics


Information about the quality of participant's media connection when the participant is talking during the call.

**Agent**  
Information about the quality of agent media connection. This is a measure of how the agent sounded to the customer.  
Type: [AgentQualityMetrics](#ctr-agentqualitymetrics)

**Customer**  
Information about the quality of customer media connection. This is a measure of how the customer sounded to the agent.  
Type: [CustomerQualityMetrics](#ctr-customerqualitymetrics)

## AgentQualityMetrics


Information about the quality of the agent's media connection. This is a measure of how the agent sounded to the customer.

**Note**  
AgentQualityMetrics is available for voice calls only. 

**Audio**  
Information about the audio quality of the agent.  
Type: [AudioQualityMetricsInfo](#ctr-audioqualitymetrics)

## CustomerQualityMetrics


Information about the quality of the customer's media connection. This is a measure of how the customer sounded to the agent.

**Note**  
CustomerQualityMetrics is available for in-app and web voice calls only. For information about in-app and web calling, see [Set up in-app, web, video calling, and screen sharing capabilities](inapp-calling.md).

**Audio**  
Information about the audio quality of the Agent.  
Type: [AudioQualityMetricsInfo](#ctr-audioqualitymetrics)

## AudioQualityMetricsInfo


Information for quality score and potential quality issues for audio,

**QualityScore**  
Number representing the estimated quality of the media connection.  
Type: Number  
Min value: 1.00  
Max val: 5.00

** PotentialQualityIssues**  
List of potential issues causing degradation of quality on a media connection. If the service did not detect any potential quality issues the list is empty.  
Type: StringArray  
Valid values: Empty array or array with any of the following values: `HighPacketLoss`, `HighRoundTripTime`, `HighJitterBuffer`.

## QueueInfo


Information about a queue.

**ARN**  
The Amazon Resource Name of the queue.  
Type: ARN

**DequeueTimestamp**  <a name="DequeueTimestamp-CTR"></a>
The date and time the contact was removed from the queue, in UTC time. Either the customer disconnected or the agent started interacting with the customer.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**Duration**  <a name="Duration-CTR"></a>
The difference in time, in whole seconds, between `EnqueueTimestamp` and `DequeueTimestamp`.  
Type: Integer  
Min value: 0

**EnqueueTimestamp**  <a name="EnqueueTimestamp-CTR"></a>
The date and time the contact was added to the queue, in UTC time.  
Type: String (*yyyy*-*mm*-*dd*T*hh*:*mm*:*ss*Z)

**Name**  
The name of the queue.  
Type: String  
Length: 1-256

## RecordingInfo


Information about a voice recording.

**DeletionReason**  
If the recording was deleted, this is the reason entered for the deletion.  
Type: String

**Location**  
The location, in Amazon S3, for the recording.  
Type: String  
Length: 0-256

**Status**  
The recording status.  
Valid values: `AVAILABLE` \$1 `DELETED` \$1 `NULL` 

**Type**  
The recording type.  
Valid values: `AUDIO` 

## RecordingsInfo


Information about a voice recording, chat transcript, or screen recording.

**DeletionReason**  
If the recording/transcript was deleted, this is the reason entered for the deletion.  
Type: String

**FragmentStartNumber**  
The number that identifies the Kinesis Video Streams fragment where the customer audio stream started.  
Type: String

**FragmentStopNumber**  
The number that identifies the Kinesis Video Streams fragment where the customer audio stream stopped.  
Type: String

**Location**  
The location, in Amazon S3, for the recording/transcript.  
Type: String  
Length: 0-256

**MediaStreamType**  
Information about the media stream used during the conversation.   
Type: String  
Valid values: `AUDIO`, `VIDEO`, `CHAT`

**ParticipantType**  
Information about the conversation participant: whether they are an agent or contact. Following are the participant types:   
+ All
+ Manager
+ Agent
+ Customer
+ Thirdparty
+ Supervisor
+ IVR
Type: String

**StartTimestamp**  
When the conversation of the last leg of the recording started.  
Type: String *(yyyy-mm-ddThh:mm:ssZ)*

**Status**  
The status of the recording/transcript.  
Valid values: `AVAILABLE` \$1 `DELETED` \$1 `NULL` 

**StopTimestamp**  
When the conversation of the last leg of recording stopped.  
Type: String *(yyyy-mm-ddThh:mm:ssZ)*

**StorageType**  
Where the recording/transcript is stored.  
Type: String  
Valid values: Amazon S3 \$1 `KINESIS_VIDEO_STREAM` 

## References


Contains links to other documents that are related to a contact.

**Reference Info**  
Name  
Type: `URL` \$1 `ATTACHMENT` \$1 `NUMBER` \$1 `STRING` \$1 `DATE` \$1 `EMAIL`  
+ When Type = `ATTACHMENT`, the record also has a Status field. 

  Status valid values: `APPROVED` \$1 `REJECTED` 
Value

## RoutingCriteria


List of routing criteria. Each time the routing criteria is updated on a contact, it is added to this list.

**ActivationTimestamp**  
The Timestamp indicating when the routing criteria is set to active. A routing criteria is activated when the contact is transferred to a queue.  
ActivationTimestamp is set on routing criteria for contacts in agent queue even though Routing criteria is never activated for contacts in agent queue.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**Index**  
Information about the index of the routing criteria.  
When you have updated the routing criteria more than 3 times on an enqueued contact, then only the last 3 updates appear on the contact record. However, you can use the index to identify how many times the routing criteria were updated on the contact record.  
For example, if the routing criteria was updated 5 times, then you would see 3 routing criteria on the contact record with indices 2, 3, and 4. This is because at most only 3 routing criteria are stored on the contact record. The first two routing criteria updates that would have had indices 0 and 1 do not appear on the contact record.   
Type: Integer  
Min value: 0

**Steps**  
List of routing steps.  
Type: List of Step objects  
Length: 1-5

## RoutingProfile


Information about a routing profile.

**ARN**  
The Amazon Resource Name of the routing profile.  
Type: ARN

**Name**  
The name of the routing profile.  
Type: String  
Length: 1-100

## StateTransitions


Information about the state transitions of a supervisor.

**stateStartTimestamp**  
The date and time when the state started in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**stateEndTimestamp**  
The date and time when the state ended in UTC time.  
Type: String (yyyy-mm-ddThh:mm:ssZ)

**state**  
Valid values: `SILENT_MONITOR | BARGE`.

## Steps


When Amazon Connect doesn't find an available agent who meet the requirements in a step for a given step duration, the routing criteria moves onto the next step sequentially until a join is completed with an agent. When all steps are exhausted, Amazon Connect offers the contact to any agent in the queue. 

**Status**  
Represents status of the Routing step.  
Type: String  
Valid Values: EXPIRED, ACTIVE, JOINED, INACTIVE, DEACTIVATED, INTERRUPTED

**Expression**  
An object to specify the expression of a routing step..  
Type: Expression

**Expiry**  
An object to specify the expiration of a routing step.  
Type: Expiry

## VoiceIdResult


The latest Voice ID status.

**Authentication**  
The voice authentication information for the call.  
Type: Authentication

**FraudDetection**  
The fraud detection information for the call.  
Type: FraudDetection

**GeneratedSpeakerId**  
The speaker identifier generated by Voice ID.  
Type: String  
Length: 25 characters

**SpeakerEnrolled**  
Was the customer enrolled during this contact?  
Type: Boolean

**SpeakerOptedOut**  
Did the customer opt out during this contact?  
Type: Boolean

## WisdomInfo


Information about an Connect AI agents session.

**SessionArn**  
The Amazon Resource Name (ARN) of the Connect AI agents session for the contact.  
Type: ARN

## Authentication


Information about Voice ID authentication for a call.

**ScoreThreshold**  
The minimum authentication score required for a user to be authenticated.  
Type: Integer  
Min value: 0  
Max value: 100

**MinimumSpeechInSeconds**  
The number of seconds of speech used to authenticate the user.  
Type: Integer  
Min value: 5  
Max value: 10

**Score**  
The output of Voice ID authentication evaluation.  
Type: Integer  
Min value: 0  
Max value: 100

**Result**  
The string output of Voice ID authentication evaluation.  
Type: String  
Length: 1-32  
Valid values: `Authenticated` \$1 `Not Authenticated`\$1 `Not Enrolled` \$1 `Opted Out` \$1 `Inconclusive` \$1 `Error`

## FraudDetection


Information about Voice ID fraud detection for a call.

**ScoreThreshold**  
The threshold for detection of fraudsters in a watchlist that was set in the flow for the contact.  
Type: Integer  
Min value: 0  
Max value: 100

**Result**  
The string output of detection of fraudsters in a watchlist.  
Type: String  
Valid values: `High Risk` \$1 `Low Risk` \$1 `Inconclusive` \$1 `Error`

**Reasons**  
Contains fraud types: Known Fraudster and Voice Spoofing.  
Type: List of String  
Length: 1-128

**RiskScoreKnownFraudster**  
The detection of fraudsters in a watchlist score for Known Fraudster category.  
Type: Integer  
Min value: 0  
Max value: 100

**RiskScoreVoiceSpoofing**  
The fraud risk score based on Voice Spoofing, such as playback of audio from Text-to-Speech systems recorded audio.  
Type: Integer  
Length: 3

**RiskScoreSyntheticSpeech (unused)**  
This field is unused. This score is presented as a combined risk score for Voice Spoofing.   
Type: Integer  
Length: 3

**GeneratedFraudsterID**  
The fraudster ID if the fraud type is Known Fraudster.  
Type: String  
Length: 25 characters

**WatchlistID**  
The fraudster watchlist that was set in the flow for the contact. Use for Known Fraudster Detection.  
Type: String  
Length: 22 characters

## How to identify abandoned contacts


An abandoned contact refers to a contact that was disconnected by the customer while in queue. This means that they weren't connected to an agent. 

The contact record for an abandoned contact has a **Queue**, and an **Enqueue Timestamp** because it was enqueued. It won't have a **ConnectedToAgentTimestamp**, or any of the other fields that populate only after the contact has been connected to an agent.

# Use contact segment attributes
Use contact segment attributes

For scenarios where information for a contact varies between transfers or conferences, such as business unit names that may change as a contact moves between departments, you need to use *contact segment attributes*. 

Contact segment attributes keep the values that remain specific to individual contact segments. (For a discussion about the difference between contact attributes and contact segment attributes, see [Contacts, contact chains, and contact attributes](contacts-contact-chains-attributes.md).)

To implement contact segment attributes, you first create predefined attributes, and then use the [Set contact attributes](set-contact-attributes.md) block to attach them to the contact as contact segment attributes. There are two ways you can do this:
+ Use the Amazon Connect admin website, as described in this topic.
+ Use the [CreatePredefinedAttribute](https://docs.aws.amazon.com/connect/latest/APIReference/API_CreatePredefinedAttribute.html) to create the predefined attributes programmatically, and use the [UpdateContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContact.html) API to attach a predefined attribute as a contact segment attribute.

**Topics**
+ [

## Step 1: Create a predefined attribute
](#create-predefined-attribute)
+ [

## Step 2: Attach a predefined attribute to the contact segment
](#attach-predefined-attribute)

## Step 1: Create a predefined attribute


1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Routing** - **Predefined attributes** - **Create** permission. 

1. In Amazon Connect, on the left navigation menu, choose **Routing**, **Predefined attributes**. 

1. On the **Attribute management** page, choose **Add attribute**, as shown in the following image.  
![\[The Attribute management page, the Add attribute option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/attribute-management-1.png)

1. On the **Add predefined attributes** page, add the name in the **Predefined attribute** box and the value in the **Value** box. The following example image shows a predefined attribute named **Business Unit**, and three values: Sales, Marketing, and Accounts.  
![\[The Add predefined attribute page, a predefined attribute named "Business Unit," and three sample values.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/attribute-management-2.png)

1. Choose **Add value** to add more values to the predefined attribute.

1. To use this attribute and its values to filter contact search results, select **Use as Contact search filter**.

1. To enforce value validations when attaching the attribute and value to a contact segment, select **Enforce valid values**.

1. To use this attribute and its values for filtering contact related metrics, select **Use in analytics for granular insights**.

   1. This feature is only available for instances that have unlimited AI capabilities enabled.

## Step 2: Attach a predefined attribute to the contact segment


The following image shows the properties panel of the [Set contact attributes](set-contact-attributes.md) block. 

![\[The Set contact attributes block properties.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/attribute-management-3.png)


When **Namespace ** = **Segment attributes**, the **Key** dropdown menu lists the predefined attributes. 

Under the **Set manually** option, you can set a **Value** based on established values for the selected predefined attribute.

For information about filtering contacts by contact segment attributes, see [Search by custom contact attributes or contact segment attributes](search-custom-attributes.md).

For information on how to use predefined attributes for analytics reporting, see [Use predefined attributes in dashboards](use-predefined-attributes-dashboards.md).

# Use predefined attributes in dashboards
Use predefined attributes in dashboards

Predefined attributes are available to use on dashboards for grouping and filtering different real-time and historical contact-related metrics. Some system defined attributes have been enabled by default for grouping and filtering. Filtering by user defined attributes is only available for historical contact metrics in instances that are enabled for Amazon Connect with unlimited AI capabilities. To set up analytics for filtering with user defined predefined attributes, see [Use contact segment attributes](use-contact-segment-attributes.md).

Historical contact metrics can be found in the [Metric definitions](metrics-definitions.md) page by looking for metrics that have a category of **Contact record-driven metric** and are available on the dashboard page.

Real time contact metrics include: [Contacts in queue](https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#contacts-in-queue), [Contacts scheduled](https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#scheduled), [Oldest contact age](https://docs.aws.amazon.com/connect/latest/adminguide/metrics-definitions.html#oldest-real-time), etc.

**Topics**
+ [

## Group by predefined attributes
](#group-by-predefined-attributes)
+ [

## Filter by predefined attributes
](#filter-by-predefined-attribute)

## Group by predefined attributes


There are two system defined attributes that can be used for grouping:
+ Subtype (connect:Subtype)
+ Contact source (connect:ValidationTestType)

1. To group by one of the above attributes, navigate to **Dashboards and reports page** and select an existing template/report or create a custom one. 

1. In a widget that has only real-time or historical contact metrics, select the **Actions** icon and then choose **Edit**.

1. Click on a groupings dropdown and select **Subtype** or **Contact source**.

   1. For real-time widgets, these grouping options will show up in the second grouping dropdown if the first grouping has been selected to be **Queue**.  
![\[The Analytics dashboards page, the grouping dropdown.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/predefined-attributes-groupings.png)

1. Click **Save** to apply your changes to the widget.

## Filter by predefined attributes


There are system defined attributes such as Subtype (connect:Subtype) or Contact source (connect:ValidationTestType) that can be used for filtering, along with any user defined attribute that has been enabled to be used for analytics. 

1. To group by one of the above attributes, navigate to **Dashboards and reports page** and select an existing template/report or create a custom one. 

1. In a widget that has only real-time or historical contact metrics, select the **Add filter** button. If enabled, user defined attributes will be displayed in the dropdown for historical widgets, either within the dropdown or under the business purpose associated with it.

   1. In the below example, **Department** and **Disposition** are both user defined attributes. **Department** was not associated with a business purpose and is displayed within the dropdown. **Disposition** shows up under **Proficiency**, because this is the business purpose associated with it.  
![\[The Analytics dashboards page, the Add filter dropdown.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/predefined-attributes-filters-1.png)

1. Once a filter has been selected, select one or more values to be filter by.  
![\[The Analytics dashboards page, the filter values dropdown.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/predefined-attributes-filters-2.png)

1. Click **Apply** to apply your changes to the widget.

# Apply hierarchy-based access control to dashboards and reports in Amazon Connect
Apply hierarchy-based access control

You can leverage agent hierarchies to control who has access to view specific agents and their performance related metrics in dashboards and reports.

Hierarchy-based access control enables you to configure granular access to users based on the [agent hierarchy](agent-hierarchy.md) that is assigned to a user. You can [configure](hierarchy-based-access-control.md) hierarchy-based access controls by using the API/SDK or the Amazon Connect admin website.

The only resource that supports hierarchy-based access control is agents. This authorization model works with [tag-based access control](tag-based-access-control.md), so you can restrict access to users, allowing them to see only other agents who belong to the same hierarchy group and who have specific tags associated to them.

**Topics**
+ [

## How to enable hierarchy-based access control for reports and dashboards
](#dashboard-ac-enable)
+ [

## Assign security profiles permissions to access dashboards, reports, and resources
](#dashboard-ac-permissions)
+ [

## Limitations
](#dashboard-ac-limitations)

## How to enable hierarchy-based access control for reports and dashboards
How to enable hierarchy-based access control

To enable granular access control for a given user based on the hierarchy they belong to, you configure the user as an access controlled resource. To do this, you have the following two options:
+ **Enforce hierarchy-based access control based on the user's hierarchy**

  This option ensures that the user being given access can only manage agents that belong to this hierarchy. For example, enabling this configuration for a given user enables them to manage other agents that either belong to their hierarchy group or a child hierarchy group.
+ **Enforce hierarchy-based access control based on a specific/custom user hierarchy**

  This option ensures that the user being given access can only manage agents that belong to the hierarchy defined in the security profile. For example, enabling this configuration for a given user enables them to manage other users that either belong to the hierarchy group specified in the security profile or a child hierarchy group.

![\[The Hierarchy-based access control option, the Targeting dropdown list.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-hbac-enable.png)


## Assign security profiles permissions to access dashboards, reports, and resources
Assign security profiles permissions

The user will need one of the following permissions to view the reports and dashboards:
+ **Analytics and Optimization - Access metrics - Access**: If you choose this option, access is granted to Real-time metrics, Historical metrics reports, Dashboards, and Agent activity audit.

OR
+ **Analytics and Optimization - Real-time metrics - Access**

OR
+ **Analytics and Optimization - Historical metrics - Access**

OR
+ **Analytics and Optimization - Dashboards - Access**

OR
+ **Analytics and Optimization - Agent Activity Audit - Access**

![\[Tabs on the Dashboards and reports page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-hbac-permissions.png)


Additionally, the user will need permissions to access resources. The following image shows an example of security profile permissions that grant users the ability to view routing profiles, queues, and Amazon Connect user accounts. **Routing profiles - View**, **Queues - View**, and **Users - View** are selected.

![\["View" permissions for routing profiles, queues, and users.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-hbac-resource-permissions.png)


## Limitations
Limitations

The following limitations apply when you use hierarchy-based access controls in reports and dashboards:
+ Access to view **Agent Queues** is disabled.
+ There are additional things to consider if tag-based access control is being applied simultaneously with hierarchy-based access control:
  + If tag-based access control is enabled along with hierarchy-based access control, the [limitations](rtm-tag-based-access-control.md#rtm-tag-based-access-control-limitations) imposed by tag-based access will still be there.
  + When both tag-based and hierarchy-based access controls are in place, the system enforces each control method independently. This means that users must meet the requirements of both control types to gain access to resources.
  + When one security profile has tag-based access control and the other has hierarchy-based access control, we will restrict access on both tag and hierarchy as though tag-based access control and hierarchy-based access control are on a single security profile.
  + If two security profiles have hierarchy-based access control and one of the profiles has tag-based access control, the applicable tags will be enforced for resources in both hierarchies.
  + If two security profiles have tag-based access control and one of the profiles has hierarchy-based access control, then the hierarchy filter will be applied to resources with either tags.
  + If both security profiles have unique configurations for tag-based and hierarchy-based access control, we cannot enforce hierarchy-based access control effectively. This could allow users to access more data than intended in certain scenarios. In such cases, we recommend not granting access to Real-time and Historical reports for users with this type of access control setup, or just leverage hierarchy-based or tag-based controls to restrict users access.
  + If you have hierarchy-based access controls enabled in your Security Profile, the **Agent performance summary** widget on the dashboards will display a summary of metrics for the agent hierarchy you have access to.

# Apply tag-based access controls to dashboards and reports in Amazon Connect
Apply tag-based access control

You can use resource tags and access control tags to apply granular access to users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases on analytics user interfaces.

Tag-based access controls enable you to configure granular access to specific resources based on assigned resource tags. You can configure tag-based access controls by using the API or the Amazon Connect admin website for supported resources. You must configure resource tags and access control tags before tag-based access control is applied to users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases on analytics pages. For more information, see [Add tags to resources in Amazon Connect](tagging.md) and [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).

**Topics**
+ [

## How to enable tag-based access control for dashboards and reports
](#dashboard-tbac-enable)
+ [

## Important things to know when using tag-based access controls
](#dashboard-tbac-limitations)
+ [

## How to transition to tag-based access control
](#dashboard-tbac-transition)

## How to enable tag-based access control for dashboards and reports


To apply tags to control access to users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases metrics in dashboards and reports:
+ Apply tags to the resources that you're going to use in the dashboards and reports, such as users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases. For more information, see [Add tags to resources in Amazon Connect](tagging.md).
+ You need to be assigned to a security profile that specifically grants you access to the resources that have been tagged. On the Security profiles page, choose **Show advanced** options to assign these permissions.
+ You will need one of the following permissions to view the reports and dashboards in the same security profile that has tag based access controls enabled:
  + **Analytics and Optimization - Access metrics - Access**: If you choose this option, access is granted to Real-time metrics, Historical metrics reports, Dashboards, and Agent activity audit.

  OR
  + **Analytics and Optimization - Real-time metrics - Access**

  OR
  + **Analytics and Optimization - Historical metrics - Access**

  OR
  + **Analytics and Optimization - Dashboards - Access**

  OR
  + **Analytics and Optimization - Agent Activity Audit - Access**

Additionally, you will need one or more relevant permissions to view specific resource data on dashboards and reports: **Routing profiles - View**, **Queues - View**, **Users - View**, **Test Cases - View**, **Evaluation forms - manage form definitions - View**, **Flows - View**, **Flow modules - View**, and **Bot - View**. The following image shows an example of security profile permissions that grant users the ability to view routing profiles, queues, and Amazon Connect user accounts.

![\[Security profile permissions showing View permissions for routing profiles, queues, users, test cases, evaluation forms, flows, flow modules, and bots.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-tbac-permissions.png)


## Important things to know when using tag-based access controls

+ The Dashboards support access controls on users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases.
+ Real-time metrics and Historical metrics support access controls on users, queues, and routing profiles.
+ The Agent Activity Audit report supports access controls on users only.
+ The tag-based access control experience on the **Real-time metrics**, **Historical metrics** and **Agent Activity Audit** page remains unchanged after this launch for users that had tag based access controls enabled in their security profile before January 15, 2026. It will continue to work the same way. However, if you would like the enhanced tag based access controls experience on your historical metrics, real-time metrics, and Agent Activity Audit report, please contact the Amazon Connect service team to assist with the migration. When you migrate to the new tag based access controls experience, please note that starting January 15, 2026, the historical metrics, and Agent Activity Audit report will display 2 months of historical data. The retention period will increase by 1 day each day.
+ Access to view **Agent Queues** is disabled.
+ The Login/Logout report is not supported.
+ Scheduled reports are not supported.
+ Changes to resource tags are eventually consistent. After a data update, a brief delay may occur before the system reflects the latest value.
+ When you apply resource filters with tag-based access controls, you can view data only for resources in your security profile. For example, if you filter a widget by Queues Q1, Q2, and Q3, but your security profile grants access only to Q1 and Q2, the widget displays data for Q1 and Q2 only.
+ Dashboards and reports automatically apply tag-based access controls, displaying only data for resources that match the tags in your security profile.
+ When you filter metrics by resource tags you don't have access to, the dashboards and reports will display access restriction error.
+ Starting January 15, 2026, Dashboards with tag-based access controls will display 2 months of historical data. The retention period will increase by 1 day each day until reaching 3 months on February 15, 2026.
+ When you filter metrics by tags and select **All accessible tags**, the system restricts data to permitted tags for the selected resource types.
+ If you have tag-based access controls enabled in your security profile, and you want to share a report with another user with a different security profile, use the Tag filter to select the resource(s) and select **All accessible tags** before saving the report, see example on the image below. This ensures that the user opening the saved report with a different security profile will only view metrics on the same report based on the resource tags configured in their security profile.  
![\[The Tag filter with All accessible tags option selected.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/dashboard-tbac-all-accessible-tags.png)
+ Dashboard widgets that do not have a default groupings are filtered by a default resource tag filter. The following table shows the resource type applied as a default filter for each widget:    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/dashboard-tag-based-access-control.html)

## How to transition to tag-based access control


If you open a saved report that you don't have permission to access anymore due to tag-based access control, or if groupings or filters that you don't have permissions to access anymore are applied to widgets or tables, you won't see data in those widgets or tables.

To view the data, perform one of the following steps:
+ If your widget or report does not have any groupings configured, add relevant authorized groupings such as users, queues, routing profiles, flows, flow modules, evaluation forms, and test cases.
+ To view metrics on Summary widgets on the Dashboard, use the Tag filter to select the resource and tags you have access to by selecting the first filter value **All accessible tags**. This gives you access to metrics based on all the resource tags configured in your security profile.
+ Create a new report that includes the resources you have access to.

# Identify conferences and transfers by using Amazon Connect contact records
Identify conferences and transfers

Contact records capture the events associated with a contact in your contact center. For every new contact, Amazon Connect creates a contact record and assigns a unique Contact ID to the contact. 

Each time an agent consults with another agent (internal to Amazon Connect or external, by using a toll free or direct inward dial number), Amazon Connect creates a consult leg contact record and issues a new Contact ID for this leg. 

The main contact record and any subsequent consult leg contact record can be linked together by several Contact ID fields, for example, Initial Contact ID, Next Contact ID and Previous Contact ID. 

This topic explains how you can use these fields to differentiate conferences and transfers in contact records. It also provides a logic to establish the type of consultative operation: Consult call, Conference, or Transfer.

**Topics**
+ [Terminology](#consultative-terms)
+ [Contact records for consultative calls](#ctr-structure-consultative-calls)
+ [How to identify consultative calls](#logic-consultative-calls)
+ [Code snippets](#codesnippets-consultative-calls)

## Terminology
Terminology

The following terminology is used in this topic:

**Consultative call**  
A call involving three participants:  

1. The initiator, for example, a customer

1. The recipient, for example, an agent

1. A consulted participant, for example, a supervisor or an external third-party translator
A consultative call can end up being a consult call, a transfer call, or a conference call.

**Consult call**  
A call in which the recipient agent consults with another participant (for example, an agent in the same Amazon Connect instance or an external entity), while the initiator is placed on hold.   
After a call is disconnected, Amazon Connect places the agent in an After Call Work (ACW) state. The contact record is updated with the timestamp when this state was entered. In the case of consult calls, the consulted participant disconnects earlier than the customer.   
The contact record records the timestamp when the agent was placed in ACW state under `AfterContactWorkStartTimestamp`. 

**Transfer call**  
The recipient transfers the initiator to the consulted participant. In this case, the recipient agent enters ACW earlier than the consulted agent. 

**Conferenced call**  
The recipient conferences the initiator to the consulted participant (three-way call).   
Amazon Connect allows more than three participants to be conferenced together. For internal calls, the consulted participant enters ACW earlier than the recipient in both Consult and Conference situations. The difference, however, is that in a conference situation, the consulted participant also gets to speak with the customer, while in a consult case, the customer is placed on hold by the recipient. 

The following sections explain how you can identify each of these types of calls in a contact record.

## Contact records for consultative calls
Contact records for consultative calls

Let's say customer calls Agent1. The agent doesn't transfer or consult with others. When call is disconnected, the contact record looks like the following sample (only the relevant fields are shown):

```
{
    "AWSAccountId": "account-id",
    "Agent": {
        "ARN": "agent-arn",
        "AfterContactWorkStartTimestamp": "2024-08-02T17:50:53Z",
        .
        .
        "Username": "Agent1"
    },
    "ContactId": "497f04ca-6de1-408f-9b8a-ec57bcc99b31",
    .
    .
    "InitialContactId": null,
    "NextContactId": null,
    "PreviousContactId": null,
    .
    .
}
```

If Agent1 were to initiate a consultative call with another agent (Agent2), it be a Consult, a Transfer, or a Conference. 

 The following sample contact record shows how this would look for the initiating agent (Agent1) and the recipient agent (Agent2):
+ Initiating agent (Agent1)

  ```
  {
      "Agent": {
          "ARN": "agent-arn"
          "AfterContactWorkStartTimestamp": "2024-08-02T17:50:53Z",
          .
          .
          "Username": "Agent1"
      },
      "ContactId": "497f04ca-6de1-408f-9b8a-ec57bcc99b31",
      "InitialContactId": null,
      "NextContactId": "6aa058d3-e771-4544-8e93-f5ce9c9003b3",
      .
      .
  }
  ```
+ Recipient agent (Agent2)

  ```
  {
      "Agent": {
          "ARN": "agent-arn",
          "AfterContactWorkStartTimestamp": "2024-08-02T17:51:07Z",
          .
          .
          "Username": "Agent2"
      },
      "ContactId": "6aa058d3-e771-4544-8e93-f5ce9c9003b3",
      "InitialContactId": "497f04ca-6de1-408f-9b8a-ec57bcc99b31",
      "NextContactId": null,
      "PreviousContactId": "497f04ca-6de1-408f-9b8a-ec57bcc99b31",
      .
      .
  }
  ```

  The relationship between the two parts of the contact record is shown in the following diagram:  
![\[The relationship between Agent 1 and Agent 2 during a consultative call.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/consultative-call.png)

  Where Agent1 (A1) and Agent2 (A2) are linked by:
  + N = Next Contact ID. This field appears in the contact record for the initial leg. This is the Contact ID of the last agent that this agent consulted with (in this case, the last agent is A2).
  + P = Previous Contact ID. This field appears in the contact record for the consult leg. This is the Contact ID of the leg that called this leg. In this case, that is A1.

  Not shown in the diagram are:
  + Initial Contact ID: This is the Contact ID of the first interaction between the Agent1 (A1) and the customer (C).
  + Contact ID: This is the unique identifier of a given interaction. 

  Contact ID, Initial Contact ID, and Previous Contact ID are system attributes. For descriptions of each one, see [System attributes](connect-attrib-list.md#attribs-system-table).

This model can be extended to a consult call that involves multiple agents. Following are example use cases for how it can be extended.
+ **Use case 1**: Agent1 invites Agent2, Agent2 invites Agent3, and Agent3 invites Agent4. The Previous Contact ID is always the previous agent. The following diagram illustrates this use case.  
![\[A1 invites A2, A2 invites A3, A3 invites A4, the Previous Contact ID is always the previous agent.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/consultative-call-example1.png)
+ **Use case 2**: Agent1 invites Agent2, Agent1 invites Agent3, and Agent1 invites Agent4. The Previous Contact ID is always Agent1. The following diagram illustrates this use case.  
![\[A1 invites Agent2, A1 invites A3 and A1 invites A4, the Previous Contact ID is always A1.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/consultative-call-example2.png)
+ **Use case 3**: Agent1 invites Agent2, Agent2 invites Agent4 and Agent5, Agent1 invites Agent3. The Previous Contact ID for Agents2 and 3 is Agent1. For Agents4 and 5 the Previous Contact ID is Agent2. The following diagram illustrates this use case.  
![\[A1 invites A2, A2 invites A4 and A5, A1 invites A3.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/consultative-call-example3.png)

## How to identify consultative calls
How to identify consultative calls

1. [Step 1: Group all the legs associated with the main contact](#step1-consultative-calls)

1. [Step 2: Identify relation between each pair by using their Contact ID fields](#step2-consultative-calls) (Previous Contact ID, Next Contact ID, Initial Contact ID and Contact ID). Examine additional fields in the contact record to identify the type of consultative operation: Consult / Transfer or Conference.

### Step 1: Group all the legs associated with the main contact
Step 1: Group all the legs associated with the main contact

This step helps you group all the calls that were initiated by a given initiator / caller. The fields of interest are Contact ID, Previous Contact ID, Next Contact ID, Initial Contact ID, and Contact ID. This also helps you understand the number of legs it took to resolve the call. The workflow for this is as follows:

1. Establish the initiator: This is the contact record where the `InitialContactId` field is `NULL`. Additionally, `PreviousContactId` is also `NULL` for this record.

1. Every contact record where the `InitialContactId` field equals the `ContactId` of the initiator contact record is related to this contact record.

### Step 2: Identify relation between each pair by using their Contact ID fields
Step 2: Identify relation between each pair by using their Contact ID fields

You can use following logic to identify consults versus transfers versus conferences. The logic uses timestamp fields noted in the contact record. All relevant fields have been marked as `code`.

#### Consult calls
Consult calls

Initiator consults with another party - within the same Amazon Connect instance (Internal) or external to that instance (External), using a DID or toll-free number. 
+ Internal consults characteristics:
  + The consulted agent enters ACW before the initiator agent
  + The consulted agent never speaks with the customer, this is because the customer has been placed on hold by the initiator. Therefore the field `AgentInteractionDuration` for the consulted agent is ZERO.
+ External consult characteristic:
  + The initiator's Customer Hold Duration is higher than the external party's Interaction Duration (`ExternalThirdPartyInteractionDuration`).

#### Conference calls
Conference calls

Initiator conferences with another participant within the same Amazon Connect instance (Internal) or external to that instance (External), using a DID or toll-free number. 
+ Internal consults characteristics:
  + The consulted agent enters ACW before the initiator agent.
  + The consulted agent speaks with the customer: `AgentInteractionDuration` is non ZERO.
+ External consult characteristics:
  + The initiator's Customer Hold Duration is lesser than the external party's Interaction Duration (`ExternalThirdPartyInteractionDuration`) . This means the customer was briefly placed on hold, and then all participants were engaged in the call.

#### Transfer calls
Transfer calls

Initiator consults with another party - within the same Amazon Connect instance (Internal) or external to that instance (External), using a DID or toll-free number. 
+ Internal consults characteristics: 
  + The consulted agent enters ACW after the initiator agent.
  + The field `TransferCompletedTimestamp` is non ZERO for the initiator agent.
+ External consult characteristics:
  + The initiator enters ACW (`AfterContactWorkStartTimestamp`) before the external leg is disconnected (`DisconnectTimestamp`).
  + The field `TransferCompletedTimestamp` is non ZERO for the initiator agent.

## Code snippets
Code snippets

 The following example code snippets—in SQL, Java script, and Python—demonstrate how to identify conference, transfer and consultative calls by leveraging the logic described in the previous section. These snippets are provided as an example, and not intended for production. 

### SQL code
SQL code

```
-- Conference transfer query DO NOT EDIT --
SELECT current_cr.contact_id,
    current_cr.initial_contact_id,
    current_cr.previous_contact_id,
    current_cr.next_contact_id,
    previous_cr.agent_username as initiator_agent_username,
    COALESCE (
        current_cr.agent_username,
        current_cr.customer_endpoint_address
    ) as recipient_agent_username,
    current_cr.agent_connected_to_agent_timestamp,
    current_cr.agent_after_contact_work_start_timestamp,
    current_cr.transfer_completed_timestamp,
    CASE
        WHEN previous_cr.agent_after_contact_work_start_timestamp < current_cr.agent_after_contact_work_start_timestamp
            AND previous_cr.transfer_completed_timestamp IS NOT NULL THEN 'TRANSFER'
        WHEN previous_cr.agent_after_contact_work_start_timestamp > current_cr.agent_after_contact_work_start_timestamp
            AND current_cr.agent_interaction_duration_ms <= 2000 THEN 'CONSULT'
        WHEN previous_cr.agent_after_contact_work_start_timestamp > current_cr.agent_after_contact_work_start_timestamp
            AND current_cr.agent_interaction_duration_ms > 2000 THEN 'CONFERENCE'
        WHEN current_cr.agent_username is NULL
            AND current_cr.initiation_method = 'EXTERNAL_OUTBOUND'
            AND previous_cr.agent_after_contact_work_start_timestamp > current_cr.disconnect_timestamp 
            AND previous_cr.agent_customer_hold_duration_ms > current_cr.external_third_party_interaction_duration_ms THEN 'EXTERNAL_CONSULT'
        WHEN current_cr.agent_username is NULL
            AND current_cr.initiation_method = 'EXTERNAL_OUTBOUND'
            AND previous_cr.agent_after_contact_work_start_timestamp > current_cr.disconnect_timestamp 
            AND previous_cr.agent_customer_hold_duration_ms < current_cr.external_third_party_interaction_duration_ms THEN 'EXTERNAL_CONFERENCE'
        WHEN current_cr.agent_username is NULL
            AND current_cr.initiation_method = 'EXTERNAL_OUTBOUND'
            AND current_cr.disconnect_timestamp > previous_cr.transfer_completed_timestamp THEN 'EXTERNAL_TRANSFER' ELSE 'START'
    END AS TYPE
FROM contact_record_link current_cr
    LEFT JOIN contact_record_link previous_cr ON previous_cr.contact_id = current_cr.previous_contact_id
WHERE (
        -- INPUT CONTACT ID --
        current_cr.initial_contact_id = 'A CONTACT ID'
        or current_cr.contact_id = 'SAME CONTACT ID AS ABOVE'
    )
order by current_cr.agent_connected_to_agent_timestamp asc
```

### Python code
Python code

```
"""Module Compare CTR's and establish relation"""
###############################################################################
# Usage python ctr_processor.py [Initial Contact ID]
# Example: python CTR_Processor.py 497f04ca-6de1-408f-9b8a-ec57bcc99b31
#
# Have your CTR record JSON files in the same directory as this Python module
# and execute the module as noted above. The input parameter is the
# Initial Contact ID / the Contact ID of the first leg of the call.
#
####################################################################z###########

import json
import re
import os
import sys
from dateutil import parser

PATH_OF_FILES   = './'
JSON            = '.json'
ENCODING        = 'UTF-8'
INTERACTION_DURN_THRESHOLD = 2
TYPE_INITIAL        = 'STAND ALONE'
TYPE_CONSULT        = 'CONSULT'
TYPE_EXT_CONSULT    = 'EXT_CONSULT'
TYPE_EXT_CONF       = 'EXT_CONFERENCE'
TYPE_CONFERENCE     = 'CONFERENCE'
TYPE_TRANSFER       = 'TRANSFER'
TYPE_UNKNOWN        = 'UNKNOWN'
CONTACT_STATE_INT   = 'INTERMEDIATE'
CONTACT_STATE_FINAL = 'FINAL'
CONTACT_STATE_START = 'START'
PRINT_INDENT        = 4

def process_ctr_records(ctr_array):
    """ Function to process CTR Records"""
    relation = {}
    output_list = []
    if ctr_array is None : return None
    for i, a_record in enumerate(ctr_array):
        if (prev_cid := a_record.get('PreviousContactId', None)) is not None:
            if (parent_ctr := get_parent_node(ctr_array, a_record['ContactId'], prev_cid)) is not None:
                relation = establish_relation(parent_ctr, a_record)
        else:
            relation = establish_parent(a_record)
        if relation is not None:
            output_list.append(relation)
    return output_list
           
def establish_parent(a_ctr):
    """ Establish the first record - the one that doesn't have a Previous Contact ID"""
    if a_ctr.get('Agent', None) is not None:
        return {
                'Agent': a_ctr['Agent']['Username']
                ,'ConnectedToAgentTimestamp': a_ctr['Agent']['ConnectedToAgentTimestamp']
                ,'Root Contact ID': a_ctr['ContactId']
                ,'Type': TYPE_INITIAL
                ,'Contact State': CONTACT_STATE_START
            }
   
def establish_relation(parent, child):
    """ Establish Conf / Transfer / Consult relation between two Agents"""
    if is_external_call(child):
        return establish_external_relation(parent, child)
    else:
        return establish_internal_relation(parent, child)

def establish_external_relation(parent, child):
    """ Establish Conf / Transfer / Consult relation between two Agents - External call"""
    ret = {
        'Parties': parent['Agent']['Username'] + ' <-> External:' + child['CustomerEndpoint']['Address']
        ,'Contact State': parent.get('Contact State', CONTACT_STATE_INT)
        ,'ConnectedToAgentTimestamp': child['ConnectedToSystemTimestamp']
    }

    parent_acw_start_ts = parser.parse(parent['Agent']['AfterContactWorkStartTimestamp'])
    child_disconnect_ts  = parser.parse(child['DisconnectTimestamp'])
    if (parent_acw_start_ts - child_disconnect_ts).total_seconds() > 0: # Parent ended after child: Consult or conference
        ret['Type'] = TYPE_EXT_CONSULT if (parent['Agent']['CustomerHoldDuration'] - child['ExternalThirdParty']['ExternalThirdPartyInteractionDuration']) > INTERACTION_DURN_THRESHOLD else TYPE_EXT_CONF
    elif ((transfer_completed_ts := parser.parse(parent.get('TransferCompletedTimestamp', None))) is not None) and \
         ((child_disconnect_ts - transfer_completed_ts).total_seconds() > 0): # ACW started after transfer was completed
        ret['Type'] = TYPE_TRANSFER
    return ret
    
def establish_internal_relation(parent, child):
    """ Establish Conf / Transfer / Consult relation between two Agents - Internal call"""        
    ret = {
        'Parties': parent['Agent']['Username'] + ' <-> ' + child['Agent']['Username']
        ,'Contact State': parent.get('Contact State', CONTACT_STATE_INT)
        ,'Child Contact ID': child.get('ContactId', 'NOTHING')
        ,'ConnectedToAgentTimestamp': child['Agent']['ConnectedToAgentTimestamp']
    }

    parent_acw_start_ts = parser.parse(parent['Agent']['AfterContactWorkStartTimestamp'])
    child_acw_start_ts  = parser.parse(child['Agent']['AfterContactWorkStartTimestamp'])
 
    if (parent_acw_start_ts - child_acw_start_ts).total_seconds() > 0: # Parent ended after child: Consult or conference
        ret['Type'] = TYPE_CONSULT if child['Agent']['AgentInteractionDuration'] < INTERACTION_DURN_THRESHOLD else TYPE_CONFERENCE
    elif ((transfer_completed_ts := parser.parse(parent.get('TransferCompletedTimestamp', None))) is not None) and \
         ((child_acw_start_ts - transfer_completed_ts).total_seconds() > 0): # ACW started after transfer was completed
        ret['Type'] = TYPE_TRANSFER
    return ret

def is_external_call(a_record):
    """Is this an external call """
    if (a_record.get('Agent', None) is None and
        a_record.get('InitiationMethod', None) == 'EXTERNAL_OUTBOUND'):
        return True
    return False

def get_parent_node(ctr_array, child_cid, child_prev_cid):
    """ Get the parent node when we have a Previous Contact ID"""    
    for i, a_record in enumerate(ctr_array):
        if (parent_cid := a_record.get('ContactId', None)) is not None:
            if compare_strings(parent_cid, child_prev_cid):
                if (parent_next_cid := a_record.get('NextContactId', None)) is not None:
                    if compare_strings(parent_next_cid, child_cid):
                        return a_record |  {'Contact State': CONTACT_STATE_FINAL}
                    else:
                        return a_record
                else:
                    return a_record |  {'Contact State': CONTACT_STATE_INT}

def compare_strings(s1, s2):
    """ Compare two Contact IDs"""    
    if s1 is None or s2 is None : return False 
    return re.search(re.compile(s2), s1)

def read_all_ctr_records(a_cid):
    """ Read all the CTR records for a given Initial Contact ID. Modify for S3 read"""
    ctr_array = []
    for file_name in [file for file in os.listdir(PATH_OF_FILES) if file.endswith(JSON)]:
        with open(PATH_OF_FILES + file_name, encoding=ENCODING) as json_file:
            try:
                a_ctr = json.load(json_file)
            except ValueError:
                print('Error in parsing JSON. File name:[', file_name, ']')
            
            if a_ctr is not None:
                c_id = a_ctr['ContactId']
                init_cid = a_ctr.get('InitialContactId', None)
                if compare_strings(a_cid, c_id):
                    ctr_array.append(a_ctr)
                elif compare_strings(a_cid, init_cid):
                    ctr_array.append(a_ctr)
            
    return ctr_array

def main():
    """ Entry point"""
    if len(sys.argv) < 2:
        print('Incorrect number of arguments (', len(sys.argv), ') --> python ctr_processor.py [Initial Contact ID]')
        return
    else:
        output_list = process_ctr_records(read_all_ctr_records(sys.argv[1]))
        if output_list is not None and len(output_list) > 0:
            output_list.sort(key=lambda x: x['ConnectedToAgentTimestamp'])
            for i, an_entry in enumerate(output_list):
                print(json.dumps(an_entry, indent=PRINT_INDENT))
        else:
            print('Unable to find Contact ID:[', sys.argv[1], '] in the input CTR Records. Please check the files and try again.')

if __name__ == "__main__":
    main()
```

### JS code
JS code

```
// Has a dependency on the following Node.js modules: - date-fns, fs, path
//sample input: node index.js 497f04ca-6de1-408f-9b8a-ec57bcc99b31

const fs = require('fs');
const path = require('path');
const { parseISO } = require('date-fns');

const PATH_OF_FILES = './';
const JSON_EXT = '.json';
const ENCODING = 'UTF-8';
const INTERACTION_DURATION_THRESHOLD = 2;
const CONTACT_TYPES = {
    INITIAL: 'STAND ALONE',
    CONSULT: 'CONSULT',
    EXTERNAL_CONSULT: 'EXT_CONSULT',
    EXTERNAL_CONFERENCE: 'EXT_CONFERENCE',
    CONFERENCE: 'CONFERENCE',
    TRANSFER: 'TRANSFER',
    EXTERNAL_TRANSFER: 'EXT_TRANSFER',
};
const CONTACT_STATES = {
    INTERMEDIATE: 'INTERMEDIATE',
    FINAL: 'FINAL',
    START: 'START',
};
const PRINT_INDENT = 4;

function processCtrRecords(ctrArray) {
    if (!ctrArray) return null;
    const outputList = [];

    ctrArray.forEach(record => {
        let relation = null;
        const prevCid = record.PreviousContactId;
        if (prevCid) {
            const parentRecord = findParentRecord(ctrArray, record.ContactId, prevCid);
            if (parentRecord) {
                relation = establishRelation(parentRecord, record);
            }
        } else {
            relation = establishInitialRecord(record);
        }
        if (relation) {
            outputList.push(relation);
        }
    });

    return outputList;
}

function establishInitialRecord(record) {
    if (record.Agent) {
        return {
            'Agent': record.Agent.Username,
            'ConnectedToAgentTimestamp': record.Agent.ConnectedToAgentTimestamp,
            'Root Contact ID': record.ContactId,
            'Type': CONTACT_TYPES.INITIAL,
            'Contact State': CONTACT_STATES.START,
        };
    }
}

function establishRelation(parent, child) {
    return isExternalCall(child)
        ? establishExternalRelation(parent, child)
        : establishInternalRelation(parent, child);
}

function establishExternalRelation(parent, child) {
    const parentAcwStartTs = parent.Agent?.AfterContactWorkStartTimestamp
        ? parseISO(parent.Agent.AfterContactWorkStartTimestamp)
        : null;
    const childDisconnectTs = child.DisconnectTimestamp
        ? parseISO(child.DisconnectTimestamp)
        : null;

    const relation = {
        'Parties': `${parent.Agent.Username} <-> External:${child.CustomerEndpoint.Address}`,
        'Contact State': parent['Contact State'] || CONTACT_STATES.INTERMEDIATE,
        'ConnectedToAgentTimestamp': child.ConnectedToSystemTimestamp,
    };

    if (parentAcwStartTs && childDisconnectTs && (parentAcwStartTs - childDisconnectTs) > 0) {
        if (parent.Agent.CustomerHoldDuration - child.ExternalThirdParty.ExternalThirdPartyInteractionDuration > INTERACTION_DURATION_THRESHOLD) {
            relation['Type'] = CONTACT_TYPES.EXTERNAL_CONSULT;
        } else {
            relation['Type'] = CONTACT_TYPES.EXTERNAL_CONFERENCE;
        }
    } else if (parent.TransferCompletedTimestamp) {
        const transferCompletedTs = parseISO(parent.TransferCompletedTimestamp);
        if (transferCompletedTs && childDisconnectTs && (childDisconnectTs - transferCompletedTs) > 0) {
            relation['Type'] = CONTACT_TYPES.EXTERNAL_TRANSFER;
        }
    }

    return relation;
}

function establishInternalRelation(parent, child) {
    const parentAcwStartTs = parent.Agent?.AfterContactWorkStartTimestamp
        ? parseISO(parent.Agent.AfterContactWorkStartTimestamp)
        : null;
    const childAcwStartTs = child.Agent?.AfterContactWorkStartTimestamp
        ? parseISO(child.Agent.AfterContactWorkStartTimestamp)
        : null;

    const relation = {
        'Parties': `${parent.Agent.Username} <-> ${child.Agent.Username}`,
        'Contact State': parent['Contact State'] || CONTACT_STATES.INTERMEDIATE,
        'Child Contact ID': child.ContactId || 'NOTHING',
        'ConnectedToAgentTimestamp': child.Agent.ConnectedToAgentTimestamp,
    };

    if (parentAcwStartTs && childAcwStartTs && (parentAcwStartTs - childAcwStartTs) > 0) {
        relation['Type'] = child.Agent.AgentInteractionDuration < INTERACTION_DURATION_THRESHOLD
            ? CONTACT_TYPES.CONSULT
            : CONTACT_TYPES.CONFERENCE;
    } else if (parent.TransferCompletedTimestamp) {
        const transferCompletedTs = parseISO(parent.TransferCompletedTimestamp);
        if (transferCompletedTs && childAcwStartTs && (childAcwStartTs - transferCompletedTs) > 0) {
            relation['Type'] = CONTACT_TYPES.TRANSFER;
        }
    }

    return relation;
}

function isExternalCall(record) {
    return !record.Agent && record.InitiationMethod === 'EXTERNAL_OUTBOUND';
}

function findParentRecord(ctrArray, childCid, childPrevCid) {
    for (const record of ctrArray) {
        const parentCid = record.ContactId;
        if (compareStrings(parentCid, childPrevCid)) {
            const parentNextCid = record.NextContactId;
            if (parentNextCid && compareStrings(parentNextCid, childCid)) {
                return { ...record, 'Contact State': CONTACT_STATES.FINAL };
            } else {
                return { ...record, 'Contact State': CONTACT_STATES.INTERMEDIATE };
            }
        }
    }
    return null;
}

function compareStrings(s1, s2) {
    return s1 && s2 && s1.includes(s2);
}

function readAllCtrRecords(contactId) {
    return fs.readdirSync(PATH_OF_FILES)
        .filter(file => file.endsWith(JSON_EXT))
        .map(fileName => JSON.parse(fs.readFileSync(path.join(PATH_OF_FILES, fileName), ENCODING)))
        .filter(record => compareStrings(contactId, record.ContactId) || compareStrings(contactId, record.InitialContactId));
}

function main() {
    const [initialContactId] = process.argv.slice(2);
    if (!initialContactId) {
        console.log('Usage: node index.js [Initial Contact ID]');
        return;
    }

    const outputList = processCtrRecords(readAllCtrRecords(initialContactId));
    if (outputList.length) {
        outputList.sort((a, b) => new Date(a.ConnectedToAgentTimestamp) - new Date(b.ConnectedToAgentTimestamp));
        outputList.forEach(entry => console.log(JSON.stringify(entry, null, PRINT_INDENT)));
    } else {
        console.log(`Unable to find Contact ID: [${initialContactId}]. Please check and try again.`);
    }
}

if (require.main === module) {
    main();
}
```

# View a contact record in the Amazon Connect admin website


1. Do a [contact search](contact-search.md). A list of contact IDs will be returned.

1. Choose an ID to view the contact record for the contact.

The following image shows part of a contact record in the UI, for a chat conversation. Note the following:
+ For chats, the initiation method is always **API**.
+ The chat transcript is visible in the UI.

![\[The Contact Record page, a chat transcript.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/sample-ctr.png)


# Agent status in the Contact Control Panel (CCP)


Agents have a status. It's manually set in the Contact Control Panel (CCP). 
+ When they're ready to handle contacts, they set their status in the CCP to **Available**. This means inbound contacts can be routed to them.
+ When agents want to stop taking inbound contacts, they set their status to a custom status that you create, such as **Break** or **Training**. They can also change their status to **Offline**.

**Tip**  
Managers can manually [change the agent's status in the real-time metrics report](rtm-change-agent-activity-state.md). 
Only the agent statuses that are enabled for the CCP will appear here. 
**Available** is the only status that will allow them to take inbound calls; custom statuses can be added to track how offline time is spent.
Users with access to the Amazon Connect admin website agent status configuration page can change the sequence of statuses.

The following diagram illustrates how the agent's status in the CCP stays constant while they are handling contacts, but in the real-time metrics report, the **Agent activity state** and the **Contact state** change. 

![\[A mapping of contact states, agent activity states, and agent status.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tutorial1-acw-contactstate.png)


For example, when the **Agent activity state** = **Incoming**, the **Contact state** = **Incoming contact**.

## About custom agent statuses


It's possible for agents to make outbound calls when their status in the CCP is set to a custom status. Technically, agents can make an outbound call when their CCP is set to **Offline**. 

For example, an agent wants to make an outbound call to a contact. Because they don't want contacts to be routed to them during this time, they set their status to a custom status. So when you look at your real-time metrics report, you'll see the agent is simultaneously on **NPT** (the metric that indicates a custom status) and **On contact**, for example.

## About ACW (After contact work)


After a conversation between an agent and customer ends, the contact is moved into the ACW state.

When the agent finishes doing ACW for the contact, they click **Clear** to clear that slot so another contact can be routed to them.

To identify how long an agent spent on ACW for a contact:
+ In the historical metrics report, **After contact work time** captures the amount of time each contact spent in ACW.
+ In the agent event stream, you have to do some calculations. For more information, see [Determine the contact center agent's ACW (After Contact Work) time](determine-acw-time.md).

## How do you know when an agent can handle another contact?


The **Availability** metric tells you when agents are finished with a contact and ready to have another one routed to them.

## What appears in the real-time metrics report?


To find out what the agent status is in the real-time metrics report, look at the **Agent Activity** metric.

## What appears in the agent event stream?


In the agent event stream you'll see the **AgentStatus**, for example: 

```
{
 "AWSAccountId": "012345678901",
 "AgentARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent/agent-ARN",
  "CurrentAgentSnapshot": {
      "AgentStatus": {   //Here's the agent's status that they set in the CCP.  
          "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/agent-state/agent-state-ARN",
          "Name": "Available",  //When an agent sets their status to "Available" it means they are ready for
                                                      // inbound contacts to be routed to them, and not say, at Lunch.  
          "StartTimestamp": "2019-05-25T18:43:59.049Z"
      },
```

## "We couldn't find this agent. Use the agent's user name to identify them."
"We couldn't find this agent. Use the agent's user name to identify them."

On occasion, in the **Contact summary** the **Agent** field may say **"We couldn't find this agent. Use the agent's user name to identify them." This message is shown in the following image of the **Contact summary**.**

![\[The contact summary page, the error message in the Agent field.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-status-not-found.png)


This is a generic message for contacts that did not get connected to an agent at the time. It usually means that the inbound call was not answered by the agent and the customer disconnected the call. 

To confirm that the caller was never connected to an agent:
+ **Disconnect reason** = **Customer disconnect**.
+ No recording of the call is found for that contact ID.

To verify this behavior, call your contact center and disconnect after a period of time without an agent accepting the call.

# About contact states in Amazon Connect
About contact states

Contact states are events that appear in the lifecycle of a contact. You can locate them in two places: the real-time metrics reports and the agent event stream.

## Contact states in the agent event stream


There are different events that can appear in the lifecycle of a contact. Each of these events appear in the agent event stream as a **State**. A contact can have the following states that appear in the agent event stream:
+ INCOMING - This is specific to queued callbacks. The agent is presented with a callback.
+ PENDING - This is specific to queued callbacks.
+ CONNECTING - An inbound contact is being offered to the agent (it's ringing). The agent has not yet taken any action to accept or reject the contact, and they haven't missed it.
+ CONNECTED - The agent has accepted the contact. Now the customer is in a conversation with the agent.
+ CONNECTED\$1ONHOLD - They are in a conversation with the agent, and the agent has put the customer on hold.
+ PAUSED - The contact was paused. This is only applicable to task contacts. 
+ MISSED - The contact was missed by the agent.
+ ERROR - This appears when, for example, the customer abandons the call during outbound whisper. 
+ ENDED - The conversation has ended, and the agent has started doing ACW for that contact.
+ REJECTED - The contact was rejected by the agent, or the customer abandoned the contact when it was connecting to the agent. 

Here's what the contact state looks like in the agent event stream:

```
 "Contacts": [
  {
    "Channel": "VOICE",  //This shows the agent and contact were talking on the phone. 
    "ConnectedToAgentTimestamp": "2019-05-25T18:55:21.011Z",
    "ContactId": "ContactId-1",  //This shows the agent was working with a contact identified as "ContactId-1".
    "InitialContactId": null,
    "InitiationMethod": "OUTBOUND", //This shows the agent reached the customer by making an outbound call.
    "Queue": {
         "ARN": "arn:aws:connect:us-east-1:012345678901:instance/aaaaaaaa-bbbb-cccc-dddd-111111111111/queue/queue-ARN-for-BasicQueue",
     },
    "QueueTimestamp": null,
    "State": "CONNECTED",  //Here's the contact state. In this case, it shows the contact was CONNECTED to the agent,
      instead of say, MISSED. 
    "StateStartTimestamp": "2019-05-25T18:55:21.011Z"  //This shows when the contact was connected to the agent.
   }
  ]
```

## Events in the contact record


A contact record captures events associated with the contact in your contact center. For example, how long the contact lasted, when it started and stopped. For a list of all data that's captured in the contact record, see [Data model for Amazon Connect contact records](ctr-data-model.md). 

A contact record is opened for a customer when they are connected to your contact center. The contact record is completed when the interaction with the flow or agent ends (that is, the agent has completed the ACW and cleared the contact). This means it's possible for a customer to have multiple contact records.

The following diagram shows when a contact record is created for a contact. It shows three contact records for a contact: 
+ The first record is created when the contact is connected to Agent 1.
+ The second record is created when the contact is transferred to Agent 2.
+ The third record is created when the contact is connected to Agent 3 during a callback.

![\[Three boxes, one for each contact record that is created.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ctr-diagram.png)


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: original, next, previous, and [`RelatedContactId`](tasks.md#linked-tasks). 

**Tip**  
A contact is considered connected when a contact record is created. It's possible a contact record can be created before a call is finished ringing for the caller, due to network conditions and PSTN event propagation.

**Important**  
Every email message is an email contact that has it's own unique contact ID. For example, when an inbound message is sent to your contact center, added to the flow, routed to a queue and then an agent, it gets a unique contact ID. When the agent replies to the email, it is a new outbound email contact that goes through the outbound flow, and it has it's own unique contact ID. 

# Queued callbacks in real-time metrics in Amazon Connect
About queued callbacks

This topic explains how queued callbacks appear in your real-time metrics reports and the contact record.

**Tip**  
To see only the number of customers who are waiting for a call back, you need to create a queue that only takes callback contacts. To learn how to do this, see [Set up routing in Amazon Connect](connect-queues.md). Currently there isn't a way to see the phone numbers of the contacts waiting for callbacks.

1. Callbacks are initiated when the [Transfer to queue](transfer-to-queue.md) block is triggered to create the callback in a callback queue. The following image of a flow shows the **Transfer to queue** block at the end of the flow.  
![\[A flow with the Transfer to queue block at the end.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/queued-callback-flow-callback-initiation.png)

1. After any initial delay is applied, the callback is put into the queue. It remains there until an agent is available and can be offered the contact. The following image shows the contact in the **In queue** column on the **Real-time metrics** page.  
![\[A contact listed in the In queue column on the real-metrics page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-callback-in-queue.png)

1. When the callback is connected to the agent, a new contact record is created for the contact. The following diagram shows three contact records. The third record is for the callback, connected to Agent 3.  
![\[Three blocks, one for each contact record.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ctr-diagram.png)

1. The **Initiation Timestamp** in the callback contact record corresponds to when the callback is initiated in the flow, shown in step 1. The following image shows the **Initiation Timestamp** field on the **Contact Record** page.  
![\[The contact record page, the Initiation Timestamp field.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ctr-callback-initiation-timestamp.png)

## How properties in the Transfer to Queue block affect this flow


The [Transfer to queue](transfer-to-queue.md) block has the following properties, which affect how Amazon Connect handles the callback:
+ **Initial delay**: This property affects when a callback is put in queue. Specify how much time has to pass between a callback contact being initiated in the flow, and the customer being put in queue for the next available agent. For more information, see [How Initial delay affects Scheduled and In queue metrics in Amazon Connect](scheduled-vs-inqueue.md). 
+ **Maximum number of retries**: If this is set to 2, then Amazon Connect tries to call the customer at most three times: the initial callback, and two retries. 
+ **Minimum time between attempts**: If the customer doesn't answer the phone, this is how long to wait before trying again. 

## Callback metrics


Use the following metrics to monitor the number of callbacks in your business:
+ [Callback contacts](metrics-definitions.md#callback-contacts): This metric represents the count of contacts that were initiated from a queued callback. That is, how many customers opted for queued callback.
+ [Callback contacts handled](metrics-definitions.md#callback-contacts-handled): This metric counts the contacts that were initiated from a queued callback and handled by an agent. That is, how many of the callbacks were answered.
+ [Callback attempts](metrics-definitions.md#callback-attempts): This metric represents the number of contacts where a callback was attempted, but the customer did not pick up.

# How Initial delay affects Scheduled and In queue metrics in Amazon Connect
Scheduled vs In queue

In the [Transfer to queue](transfer-to-queue.md) block, the **Initial delay** property affects when a callback is put in queue. For example, assume **Initial delay** is set to 30 seconds. Here's what appears in your real-time metrics report:

1. After 20 seconds, the callback has already been created, but it is not yet in queue because of the **Initial delay** setting. In the following image of the **Real-time metrics** page, **In queue** = 0 and **Scheduled** = 1.  
![\[A contact that is scheduled but is not in queue.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-callback-scheduled.png)

1. After 35 seconds, the callback contact has been placed in queue. In the following image, the callback is now **In queue**. It is no longer scheduled.  
![\[The In queue column has a 1, the Scheduled column has a 0.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-callback-in-queue2.png)

1. Assume that after 40 seconds, an agent accepts the callback. The **In queue** column = 0, the **Scheduled** column = 0.  
![\[The In queue column has a 1, the Scheduled column has a 0.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/rtm-callback-accepted-by-agent.png)

# Failed callback attempts in Amazon Connect
Failed callback attempts

If an agent doesn't accept an offered callback, it doesn't count as an failed callback attempt. Rather, the routing engine offers the callback to the next available agent, until an agent accepts. 

A failed callback attempt would be along the lines of: an agent accepts a callback but then something goes wrong between then and the agent being joined to the customer.

The contact is considered to be in the callback queue until an agent accepts the offered callback contact.

Amazon Connect removes the callback from the queue when it's connected to the agent. At that time, Amazon Connect starts dialing the customer. 

The following image shows what this looks like in a contact record: 
+ Dequeued At: The timestamp of when the callback was connected to the agent. It's also when Amazon Connect starts dialing the customer.

![\[A contact record that contains a dequeued at time.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/ctr-enqueue-and-dequeue.png)


The enqueued time on the contact record for a particular callback leg corresponds to the amount of time that the contact was in queue before that particular callback attempt was made. This is not the total enqueued time across all contact records. 

For example, an inbound call could be in queue for 5 minutes before a callback is scheduled. Then, after an initial delay of 10 seconds, the callback contact could be in a callback queue for 10 seconds before an agent accepts it. In this case, you would see two contact records:

1. The first contact record, with InitiationMethod=INBOUND, would have an enqueued time of 5 minutes.

1. The second contact record, with InitiationMethod=CALLBACK, would have an enqueued time of 10 seconds.

# Amazon Connect real-time metrics example for a queued callback flow
Example: Metrics for a queued callback

This topic shows an example queued callback flow and reviews how the contact records and times are set for it. 

Assume we have set up the following flows:
+ **Inbound flow** -- Runs when the customer calls the customer service number.
+ **Customer queue flow** – Runs when the customer is waiting in queue. In this example, we build a flow that offers a callback to the customer. If the customer selects yes, this flow executes the **Transfer to queue** block to transfer the contact to the callback queue named CallbackQueue, with an initial delay of 99 seconds, and then hangs up.
+ **Outbound whisper flow** -- When a queued callback is placed, the customer hears this after they pick up and before they connect to the agent. For example, "Hello, this is your scheduled callback..."
+ **Agent whisper flow** -- The agent hears this right after they accept the contact, before they are joined to the customer. For example, "You are about to be connected to Customer John, who requested a refund for..."

In this example, John calls customer service. Here's what happens:

1. Inbound flow creates contact record-1:

   1. John calls customer service at 11:35. The Inbound flow runs and puts him in queue at 11:35. 

   1. The Customer queue flow runs. At 11:37, John chooses to schedule a callback, so Amazon Connect initiates a callback contact at 11:37, before the inbound contact is disconnected. 

1. Callback flow creates contact record-2:

   1. The callback contact was initiated at 11:37.

   1. Because the initial delay is 99 seconds, the callback contact is placed into CallbackQueue at 11:38:39, after the 99 seconds pass. Now the callback contact is offered to an available agent. 

   1. After 21 seconds, an agent available at 11:39:00 and accepts the contact. The 10-second agent whisper flow is played to the agent. 

   1. After the agent whisper flow is complete, Amazon Connect calls John at 11:39:10. John picks up, and listens to the 15-second outbound whisper flow. 

   1. When the outbound whisper flow is complete, John is connected to the agent at 11:39:25. They talk until 11:45, and then John hangs up. 

This scenario results in two contact records, which include the following metadata.


| Contact record-1 | Data | Notes | 
| --- | --- | --- | 
|  Initiation Method  | Inbound  |   | 
|  Initiation Timestamp  | 11:35  | The inbound contact is initiated in Amazon Connect.  | 
|  ConnectedToSystem Timestamp  | 11:35  | Because this is an inbound contact, InitiationTimestamp = ConnectedToSystemTimestamp.  | 
|  Next Contact Id   | points to contact record-2  |   | 
|  Queue  | InboundQueue  |   | 
|  Enqueued Timestamp  | 11:35  | The inbound contact is put in queue.  | 
|  Dequeued Timestamp  | 11:37  | Because no agent picked up, this is the same as DisconnectedTimestamp.  | 
|  ConnectedToAgent Timestamp  | N/A  | John scheduled a callback before any agent could pick up.  | 
|  Disconnected Timestamp  | 11:37:00  | John was disconnected by flow.  | 


| contact record-2 | Data | Notes | 
| --- | --- | --- | 
|  PreviousContactId  | points to contact record-1  |   | 
|  Initiation Timestamp  | 11:37  | The callback contact is created in Amazon Connect.  | 
|  Queue  | CallbackQueue  |   | 
|  Enqueued Timestamp  | 11:38:39  | The contact was put into the CallbackQueue, after the 99-second initial delay completes.  | 
|  Dequeued Timestamp  | 11:39:00  | After 21 seconds, an agent accepts the contact.  | 
|  Queue Duration  | 120 seconds  | This is the initial delay (99 seconds), plus any additional time sitting in queue waiting for an agent to become available (21 seconds).  | 
|  ConnectedToSystem Timestamp  | 11:39:10  | John is called after the 10 second agent whisper flow completes.  | 
|  ConnectedToAgent Timestamp  | 11:39:25  | John and the agent are connected, after the 15 second outbound whisper flow completes.  | 
|  Disconnected Timestamp  | 11:45  | John hangs up.  | 

# Save custom reports in Amazon Connect
Save custom reports

You can create custom real-time, historical, and login/logout reports that include only the metrics you're interested in. For instructions, see [Create a real-time metrics report for your contact center](create-real-time-report.md) and [Create a custom historical metrics report in Amazon Connect](create-historical-metrics-report.md).

After you create a report, you can: 
+ [Save](#how-to-save-reports) the custom report and return to it later.
+ [Share](share-reports.md) a link to the custom report so only people in your organization who have the link AND who have the [appropriate permissions](view-a-shared-report.md) in their security profile can access the report.
+ [Publish](publish-reports.md) the report so everyone in your organization who has the [appropriate permissions](publish-reports.md#view-published-reports) in their security profile can view the report.

## Personal saved reports count towards quota


Personal saved reports count towards your service quota of reports per instance. For example, if you save a report every day, it will count towards your organization's number of saved reports for the instance. 

For more information about quotas, see [Amazon Connect service quotas](amazon-connect-service-limits.md).

## Create a naming convention


All saved reports in your Amazon Connect instance must have a unique name. We recommend creating a naming convention that indicates who the owner of the report is. For example, use the team name or owner alias as the report suffix: Agent Performance - *team name*. That way, if the report is published, others will know who owns it.

If your organization needs to delete reports because you've reached the service quota for reports for your instance, a naming convention that includes the team or owner alias will help you track down the report owners to find out if the report is still needed. 

## How to save reports


1. Customize a real-time, historical, or login/logout report to include the metrics you want.

1. Choose **Save**. If you don't have permissions in your security profile to create reports, this button will be inactive.

1. Assign a unique name to the report.
**Tip**  
We recommend establishing a naming convention for reports in your organization, especially published reports. This will help everyone identify who the owner is. For example, use the team name or owner alias as the report suffix: Agent Performance - *team name*.

1. To view to the saved report at a later time, on the navigation menu, choose **Analytics and optimization**, **Dashboards and reports**.

1. Choose **All reports** to search for and view your saved report, or choose the tab for the type of report you saved. For example, you can choose **Real-time metrics** to view your saved real-time metrics reports, as shown in the following image.   
![\[A saved real-time metrics report on the Real-time metrics report page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/saved-reports.png)

## How to delete saved reports


1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an Admin account or an account that has **Saved reports - Delete** permissions in its security profile.

1. On the navigation menu, choose **Analytics and optimization**, **Dashboards and reports**.

1. Choose the **Historical metrics** tab. 

1. Go to the row that has the report you want to delete, and choose the **Delete** icon, as shown in the following image. If you don't have permissions in your security profile to delete reports, this option won't be available.  
![\[The Delete icon next to a report.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-delete-saved-report.png)

# Share saved reports in Amazon Connect
Share saved reports

You can only share reports that you create and save. To share reports, you need the **Saved reports - Publish** permission on your security profile. 

**To share reports**

1. On the page of the report you want to share, choose the **Actions** dropdown menu and then choose **Share report**. The following image shows an example report named **Historical metrics: Test**, and the location of the **Share report** option in the **Actions** dropdown menu.  
![\[A saved report, the Actions dropdown menu, the Share report option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/drop-down-share-report.png)

   Or, from your list of saved reports, choose the **Share report** icon, as shown in the following image.   
![\[The View reports page, the Share report icon next to a report.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/share-report-icon.png)

1. Choose **Copy link address** and choose **Save**, as shown in the following image. This saves the link to your clipboard. Paste this link into an email or other location to share the report.  
![\[The Share report dialog box, the Copy link address link.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/copy-link-address.png)

   You don't need to publish the report to your organization in order to share the link with specific people.
**Important**  
Anyone who has the link and the appropriate permissions can access the report. For a list of required permissions, see [View a shared report in Amazon Connect](view-a-shared-report.md).

# View a shared report in Amazon Connect
View a shared report

To view a report that someone has shared with you, you need the following: 
+ A link to the report. 
+ Permissions in your security profile: 
  +  **Access metrics**, if the report is a real-time or historical metrics report
  +  **View** Login/Logout report, if the report is a login/logout report
  +  **View** Saved reports

  These permissions are shown in the following image of the **Analytics and Optimization** section of the security profiles page.  
![\[The Analytics and optimization section of the security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/permissions-view-saved-metrics-reports.png)

## Tips for viewing a shared report

+ Every time you want to view the shared report, you need to access it through the link that was shared with you.
+ If you get a 505 error when you choose the link that was shared with you, it means you don't have permissions to view the report.
+ There's no way to save the exact same report to your list of Saved reports. You can give the report a new name and save it to your list, but then it's a different report from the one that was shared with you. If the owner of original report makes changes, you won't see them in your renamed report.

# Make a report in Amazon Connect read-only
Make a report read-only

To prevent others from saving changes to your report, you can make the report read-only before sharing it.

Making your report read-only means the report can be read but changes cannot be saved. If a user tries to make changes to a read-only report, they can only save their changes by using the **Save as** option, which makes a new copy of the report.

When a user who is not the report owner views the **Share report** dialog box, the **Read-Only** toggle is disabled.

**To make a report read-only**

1. After you create and save a Dashboard, Real-time metrics, Historical metrics, or Login/logout report, choose **Actions**, **Share report**.

1. In the **Share report** dialog box, set the **Read-only** toggle to **On**, and then choose **Save**. This toggle is shown in the following image of the **Share report** dialog box.  
![\[The toggle to make a report Read-only.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/reports-readyonly.png)

    When this toggle is **On**, no user—*including the report owner*—can save changes to the report settings: Interval & Time range, Groupings, Filters, and Metrics.

**To allow changes to a report**

1. Set the **Read-only** toggle to **Off**.

1. Anyone who already has a shared link to the report will now be able to make changes to it. You don't need to send them a new link to the report. 

## What users see when they view a read-only report


Users can still make changes to the report settings but they won't be able to save them to the report. The **Save** button on the report page is disabled. A message is displayed, **This Report is read-only and cannot be modified**, as shown in the following image. 

![\[A reports page with the Save button disabled, and a message that the report is Read-only.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/reports-readonly-message.png)


When a user who is not the report owner views the **Share report** dialog box, the **Read-Only** toggle is disabled, as shown in the following image.

![\[The Read-only toggle in the disabled state, in the Share report dialog box.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/reports-readonly-disabled.png)


# Publish reports in Amazon Connect
Publish reports

After you create and save a custom report with the metrics you're interested in, you can publish it so everyone in your organization with the [appropriate permissions](#view-published-reports) can access the report.

After a report is published, people will be able to see the report in their list of Saved reports.

**Tip**  
We recommend establishing a naming convention for reports in your organization. When reports are published, this will help everyone identify who the owner is. For example, use the team name or owner alias as the report suffix: Agent Performance - *team name*.

Only people who have permissions in their security profile to **Create** and/or **Edit** saved reports will be able to change the published report and save their changes to the published version.

**To publish a report**

1. On the Real-time metrics, Historical metrics, Login/logout report, or Saved reports page, choose **Share report**.

1. In the **Share report** dialog box, toggle **Publish report** to **On**, and then choose **Save**. This toggle is shown in the following image of the dialog box.  
![\[The share report dialog box, the Publish report to organization toggle.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/publish-a-report.png)

   The report appears in the list of Saved reports for everyone who has appropriate permissions in their security profile.

1. To unpublish the report, move the toggle to **Off**. 

   The report is removed from everyone's list of Saved reports.

## View published reports


To view published reports, at minimum you need the following permissions in your security profile:
+  **Access metrics**, if the report is a real-time or historical metrics report
+  **View** Login/Logout report, if the report is a login/logout report
+  **View** Saved reports

These permissions are shown in the following image of the **Analytics and Optimization** section of the security profiles page.

![\[The Analytics and optimization section of the security profiles page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/permissions-view-saved-metrics-reports.png)


**To view published reports**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an account that has the appropriate permissions.

1. On the navigation menu, choose **Analytics and optimization**, **Dashboards and reports**. 

   Published reports appear in your list automatically.

# Manage saved reports as an admin in Amazon Connect
Manage saved reports (admin)

You can view and delete all saved reports in your instance, including reports that were not created by you or that are not currently published. 

To do this, you need the **Analytics and Optimization** - **Saved reports (admin)** permission in your security profile. 

## View and delete reports
View and delete reports

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an account that has **Save reports (admin) - All** in it's the security profile.

1. On the navigation menu, choose **Analytics and Optimization**, **Dashboards and reports**. 

1. On the **View Reports** page, choose **All reports**.

1. Use the filters to search by report name, report type, published status, and user.

1. To delete reports, select the reports by using the boxes on the left and then choose **Remove**, as shown in the following image.

![\[The View reports page, the Remove button. page.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/hmr-queue-dashboard-saved-reports.png)


# Monitoring your Amazon Connect instance using CloudWatch
Monitor CloudWatch metrics

Amazon Connect sends data about your instance to CloudWatch metrics so that you can collect, view, and analyze CloudWatch metrics for your Amazon Connect virtual contact center. You can use this data to monitor key operational metrics and set up alarms. Data about your contact center is sent to CloudWatch every 1 minute.

When you view the CloudWatch metrics dashboard, you can specify the refresh interval for the data displayed. The values displayed in the dashboard reflect the values for the refresh interval you define. For example, if you set the refresh interval to 1 minute, the values displayed are for a minute period. You can select a refresh interval of 10 seconds, but Amazon Connect does not send data more often than every 1 minute. Metrics that are sent to CloudWatch are available for two weeks, and then discarded. To learn more about metrics in CloudWatch, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

**Note**  
If your Amazon Connect instance was created on or before October 2018, you need to provide Amazon Connect with permission to begin publishing chat metrics to your CloudWatch account. To do so, create an IAM policy with the following permission and attach it to the Amazon Connect service role. You can find the Amazon Connect service role on the **Account overview** page for your Amazon Connect instance.  

```
{
  "Effect": "Allow",
  "Action": "cloudwatch:PutMetricData",
  "Resource": "*",
  "Condition": {
    "StringEquals": {
      "cloudwatch:namespace": "AWS/Connect"
    }
  }
}
```

## Amazon Connect metrics sent to CloudWatch


The `AWS/Connect` namespace includes the following metrics.


| Metric | Description | 
| --- | --- | 
| CallsBreachingConcurrencyQuota |  The total number of voice calls that exceeded the concurrent calls quota for the instance. For the total number of calls that breach the quota, take a look at the Sum statistic. For example, assume your contact center experiences the following volumes, and your service quota is 100 concurrent calls: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) CallsBreachingConcurrencyQuota = 110: the total number of voice calls that exceeded the quota between 0:00 and 0:10. Unit: Count Dimension: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| CallBackNotDialableNumber |  The number of times a queued callback to a customer could not be dialed because the customer's number is in a country for which outbound calls are not allowed for the instance. The countries allowed for an instance are defined by the service quotas. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| CallRecordingUploadError |  The number of call recordings that failed to upload to the Amazon S3 bucket configured for your instance. This is the bucket specified in **Data Storage** > **Call Recordings** settings for the instance. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| CallsPerInterval |  The number of voice calls, both inbound and outbound, received or placed per second in the instance. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ChatsBreachingActiveChatQuota |  The total number of valid requests made to start a chat that exceeded the concurrent active chats quota for the instance. For the total number of chats requests that breach the quota, take a look at the Sum statistic. For example, assume your contact center experiences the following volumes, and your service quota is 2500 concurrent active chats: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) ChatsBreachingActiveChatsQuota = 110: the total number of chats that exceeded the quota between 0:00 and 0:10. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentActiveChats |  The number of [concurrent active chats](amazon-connect-service-limits.md) in the instance at the time the data is displayed in the dashboard. The value displayed for this metric is the number of concurrent active chats at the time the dashboard is displayed, and not a sum for the entire interval of the refresh interval set. All active chats are included, not only active chats that are connected to agents. While all statistics are available in CloudWatch for concurrent active chats, you might be most interested in looking at the Maximum/Average statistic. The Sum statistic isn't as useful here.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentActiveChatsPercentage |  The percentage of the concurrent active chats service quota used in the instance. This is calculated by: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) Where ConfiguredConcurrentActiveChatsLimit is the Concurrent active chats per instance configured for your instance. Unit: Percent (Output displays as an integer. For example, 1% of chats is shown as 1, not as 0.01.) Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentCalls |  The number of concurrent active voice calls in the instance at the time the data is displayed in the dashboard. The value displayed for this metric is the number of concurrent active calls at the time the dashboard is displayed, and not a sum for the entire interval of the refresh interval set. All active voice calls are included, not only active calls that are connected to agents. While all statistics are available in CloudWatch for concurrent voice calls you might be most interested in looking at the Maximum/Average statistic. The Sum statistic isn't as useful here.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentCallsPercentage |  The percentage of the concurrent active voice calls service quota used in the instance. This is calculated by: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) Unit: Percent (output displays as a decimal) Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentEmails |  This is the total of all email contacts in an Amazon Connect instance in an active state. An email contact in an active state includes: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) Example: 200 emails in queue \$1 10 emails assigned to 10 agents \$1 5 outbound emails being sent by an agent (either a reply or agent-initiated) = 215 Concurrent active emails in the instance  Data for ConcurrentEmails is sent to CloudWatch every 5 minutes.  The number of concurrent active emails in the instance at the time the data is displayed in the dashboard. The value displayed for this metric is the number of concurrent active emails at the time the dashboard is displayed, and not a sum for the entire interval of the refresh interval set. All active email are included, not only active emails that are connected to agents. While all statistics are available in CloudWatch for concurrent emails you might be most interested in looking at the Maximum/Average statistic. The Sum statistic isn't as useful here. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentEmailsPercentage |  The percentage of concurrent active emails service quota used in the instance. This is calculated by: ConcurrentEmails / ConfiguredConcurrentEmailsLimit Where ConfiguredConcurrentEmailsLimit is the [Concurrent active emails per instance](amazon-connect-service-limits.md#connect-quotas) configured for your instance. We recommend following the Amazon Connect [ongoing operations management](plan-ahead-quotas.md#production-environment-go-live-quotas) approach of configuring alerts at 80% of quota limits to notify you when to [request a quota increase](https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html).  Data for ConcurrentEmailsPercentage is sent to CloudWatch every 5 minutes.  While all statistics are available in CloudWatch for concurrent emails you might be most interested in looking at the Maximum/Average statistic. The Sum statistic isn't as useful here. Unit: Percentage Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentTasks |   Data for ConcurrentTasks is sent to CloudWatch every 5 minutes.  The number of concurrent active tasks in the instance at the time the data is displayed in the dashboard. The value displayed for this metric is the number of concurrent active tasks at the time the dashboard is displayed, and not a sum for the entire interval of the refresh interval set. All active tasks are included, not only active tasks that are connected to agents. While all statistics are available in CloudWatch for concurrent tasks you might be most interested in looking at the Maximum/Average statistic. The Sum statistic isn't as useful here.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ConcurrentTasksPercentage |   Data for ConcurrentTasksPercentage is sent to CloudWatch every 5 minutes.  The percentage of the concurrent active tasks service quota used in the instance. This is calculated by:  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html) Where ConfiguredConcurrentTasksLimit is the [Concurrent tasks per instance](amazon-connect-service-limits.md) configured for your instance.  Unit: Percentage Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ContactFlowErrors |  The number of times the error branch for a flow was run. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ContactFlowFatalErrors |  The number of times a flow failed to execute due to a system error. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| LongestQueueWaitTime |  The longest amount of time, in seconds, that a contact waited in a queue. This is the length of time a contact waited in a queue during the refresh interval selected in the CloudWatch dashboard, such as 1 minute or 5 minutes. Unit: Seconds Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| MissedCalls |  The number of voice calls that were missed by agents during the refresh interval selected, such as 1 minute or 5 minutes. A missed call is one that is not answered by an agent within 20 seconds. To monitor the total missed calls in a given time period, take a look at the Sum statistic in CloudWatch. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| MisconfiguredPhoneNumbers |  The number of calls that failed because the phone number is not associated with a flow. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| PublicSigningKeyUsage |  The number of times a flow security key (public signing key) was used to encrypt customer input in a flow. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| QueueCapacityExceededError |  The number of calls that were rejected because the queue was full. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| QueueSize |  The number of contacts in the queue. The value reflects the number of contacts in the queue at the time the dashboard is accessed, not for the duration of the reporting interval. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| SuccessfulChatsPerInterval |  The number of chats successfully started in the instance for the defined interval. Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| TasksBreachingConcurrencyQuota |  The total number of tasks that exceeded the concurrent tasks quota for the instance. For the total number of tasks that breach the quota, take a look at the Sum statistic.  For example, assume your contact center experiences the following volumes, and your service quota is 2500 concurrent tasks:  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  TasksBreachingConcurrencyQuota = 110: the total number of tasks that exceeded the quota between 0:00 and 0:10.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| TasksExpired |   Tasks which have expired after being active for 7 days.  To monitor the total number of tasks that have expired in a given time period, take a look at the Sum statistic in CloudWatch.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| TasksExpiryWarningReached |  Tasks that have been active for 6 days 22 hours and reached expiry warning limit.  To monitor the total number of tasks that have reached expiry warning limit in a given time period, take a look at the Sum statistic in CloudWatch.  Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ThrottledCalls |  The number of voice calls that were rejected because the rate of calls per second exceeded the maximum supported quota. To increase the supported rate of calls, request an increase in the service quota for concurrent active calls per instance. To monitor the total throttled calls in a given time period, take a look at the Sum statistic in CloudWatch. Unit: Seconds Unit: Count Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 
| ToInstancePacketLossRate |  The ratio of packet loss for calls in the instance, reported every 10 seconds. Each data point is between 0 and 100. The ratio of packet loss for calls in the instance appears as a percent between 0 and 1. Unit: Percent Dimensions: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/connect/latest/adminguide/monitoring-cloudwatch.html)  | 

## Amazon Connect CloudWatch metrics dimensions


In CloudWatch, a dimension is a name/value pair that uniquely identifies a metric. In the dashboard, metrics are grouped by dimension. When you view metrics in the dashboard, only metrics with data are displayed. If there is no activity during the refresh interval for which there is a metric, then no data from your instance is displayed in the dashboard.

The following dimensions are used in the CloudWatch dashboard for Amazon Connect metrics. 

### Flow metrics dimension


**Note**  
Flow names must contain only the following characters in order for the names to be displayed in CloudWatch: alphanumeric characters (0-9A-Za-z) . , - \$1 / \$1 : \$1 @ \$1 & \$1 \$1 \$1 ? % and the space character.

Filters metric data by flow. Includes the following metrics:
+ ContactFlowErrors
+ ContactFlowFatalErrors
+ PublicSigningKeyUsage

### Contact metrics dimension


Filters metric data by contacts. Includes the following metrics:
+ TasksExpiryWarningReached
+ TasksExpired

### Instance metrics dimension


Filters meta data by instance. Includes the following metrics:
+ CallsBreachingConcurrencyQuota
+ CallsPerInterval
+ CallRecordingUploadError
+ ChatsBreachingActiveChatQuota
+ ConcurrentActiveChats
+ ConcurrentActiveChatsPercentage
+ ConcurrentCalls
+ ConcurrentCallsPercentage
+ ConcurrentEmails
+ ConcurrentEmailsPercentage
+ ConcurrentTasks
+ ConcurrentTasksPercentage
+ MisconfiguredPhoneNumbers
+ MissedCalls
+ SuccessfulChatsPerInterval
+ TasksBreachingConcurrencyQuota
+ ThrottledCalls

### Instance ID, Participant, Stream Type, Type of Connection


Filters metric data by connection. Includes the following metrics:
+ ToInstancePacketLossRate

### Queue metrics dimension


**Note**  
 Queue names must contain only the following characters in order for the names to be displayed in CloudWatch: alphanumeric characters (0-9A-Za-z) . , - \$1 / \$1 : \$1 @ \$1 & \$1 \$1 \$1 ? % and the space character.

Filters metric data by queue. Includes the following metrics:
+ CallBackNotDialableNumber
+ LongestQueueWaitTime
+ QueueCapacityExceededError
+ QueueSize

## Amazon Connect Voice ID metrics sent to CloudWatch


The `VoiceID` namespace includes the following metrics.

**RequestLatency**  
The elapsed time for the request.  
Frequency: 1 minute  
Unit: Milliseconds  
Dimension: API

**UserErrors**  
The number of Error counts due to bad requests from user.  
Frequency: 1 minute  
Unit: Count  
Dimension: API

**SystemErrors**  
The number of Error counts due to internal service error.  
Frequency: 1 minute  
Unit: Count  
Dimension: API

**Throttles**  
The number of requests that are rejected due to exceeding the max rate allowed for sending requests.  
Frequency: 1 minute  
Unit: Count  
Dimension: API

**ActiveSessions**  
The number of active sessions in the domain. Active sessions are sessions that are in pending or ongoing status.  
Frequency: 1 minute  
Unit: Count  
Dimension: Domain

**ActiveSpeakerEnrollmentJobs**  
The number of active Batch Enrollment Jobs in the domain. Active Jobs are those which are in Pending or InProgress status.  
Frequency: 15 minutes  
Unit: Count  
Dimension: Domain

**ActiveFraudsterRegistrationJobs**  
The number of active Batch Registration Jobs in the domain. Active Jobs are those which are in Pending or InProgress status.   
Frequency: 15 minutes  
Unit: Count  
Dimension: Domain

**Speakers**  
The number of Speakers in the domain.  
Frequency: 15 minutes  
Unit: Count  
Dimension: Domain

**Fraudsters**  
The number of Fraudsters in the domain.  
Frequency: 15 minutes  
Unit: Count  
Dimension: Domain

## Amazon Connect Voice ID metrics dimensions


The following dimensions are used in the CloudWatch dashboard for Amazon Connect Voice ID metrics. When you view metrics in the dashboard, only metrics with data are displayed. If there is no activity during the refresh interval for which there is a metric, then no data from your instance is displayed in the dashboard.

### API metrics dimension


This dimension limits the data to one of the following Voice ID operations:
+ DeleteFraudster
+ EvaluateSession
+ ListSpeakers
+ DeleteSpeaker
+ OptOutSpeaker

### Domain metrics dimension


The Voice ID domain where the enrollment, authentication or registration is conducted. 

## Amazon AppIntegrations metrics sent to CloudWatch


The `AWS/AppIntegrations` namespace includes the following metrics.

**RecordsDownloaded**  
The number of records that were successfully downloaded as part of an AppFlow flow execution for a data integration.  
Frequency: 1 minute  
Unit: Count  
Valid Statistics: Maximum, Sum, Minimum, Average

**RecordsFailed**  
The number of records that failed to download as part of an AppFlow flow execution for a data integration.  
Frequency: 1 minute  
Unit: Count  
Valid Statistics: Maximum, Sum, Minimum, Average

**DataDownloaded**  
The number of bytes that were successfully downloaded as part of an AppFlow flow execution for a data integration.  
Frequency: 1 minute  
Unit: Bytes  
Valid Statistics: Maximum, Sum, Minimum, Average

**DataProcessingDuration**  
The time it took to process and download data as part of a single AppFlow flow execution for a data integration.  
Frequency: 1 minute  
Unit: Milliseconds  
Valid Statistics: Maximum, Sum, Minimum, Average

**EventsReceived**  
The number of events that were successfully emitted from your third-party source application (Salesforce, Zendesk) and received on your event bus.  
Frequency: 1 minute  
Unit: Count  
Valid Statistics: Maximum, Sum, Minimum, Average

**EventsProcessed**  
The number of events that were successfully processed and forwarded to be evaluated against the rules you configured on an event integration.  
Frequency: 1 minute  
Unit: Count  
Valid Statistics: Maximum, Sum, Minimum, Average

**EventsThrottled**  
The number of events that were throttled because the rate of emitting events exceeded the maximum supported quota.   
Frequency: 1 minute  
Unit: Bytes  
Valid Statistics: Maximum, Sum, Minimum, Average

**EventsFailed**  
The number of events that failed to process due to malformed or unsupported third-party events, and other processing errors .  
Frequency: 1 minute  
Unit: Bytes  
Valid Statistics: Maximum, Sum, Minimum, Average

**EventProcessingDuration**  
The time it took to successfully process and forward an event to be evaluated against the rules you configured on an event integration.  
Frequency: 1 minute  
Unit: Milliseconds  
Valid Statistics: Maximum, Sum, Minimum, Average

## Amazon AppIntegrations metric dimensions


You can use the following dimensions to refine AppIntegrations [metrics](#appintegrations-metrics-cloudwatch).


| Dimension | Description | 
| --- | --- | 
| AccountId |  AWS account ID  | 
| ClientId |  Service principal of the client  | 
| IntegrationARN |  ARN of the event or data integration  | 
| IntegrationType |  DataIntegration or EventIntegration  | 
| Region |  Region of the data or event integration  | 

## Amazon Connect Customer Profiles metrics


The `AWS/CustomerProfiles` namespace includes the following metrics.

**Real-time export metrics sent to CloudWatch**

The two following metrics will be published to CloudWatch for every export task. These metrics will provide information on your export stream tasks and will allow you to configure your Kinesis streams based on your use case. In the case of being throttled, these metrics will enable you to provision your Kinesis stream to ensure delivery to your destination.

**EventsProcessed**  
Number of records successfully streamed into a Kinesis Stream.  
Unit: Count

**EventsThrottled**  
Number of PutRecord attempts that encountered throttling exception.  
Unit: Count

## Amazon Connect Customer Profiles metric dimensions


You can use the following dimensions to refine Customer Profiles [metrics](#customer-profiles-metrics-cloudwatch).


| Dimension | Description | 
| --- | --- | 
| DomainName |  Customer Profiles domain name  | 
| DestinationType |  Type of destination. Available value is: Kinesis  | 
| DestinationName |  Name of destination. Kinesis Data Streaming name for DestinationType: Kinesis.  | 

## Use CloudWatch metrics to calculate concurrent call quota


**Important**  
The **ConcurrentCallsPercentage** calculation information is not the same as **ConcurrentTasksPercentage** and **ConcurrentChatPercentage**.  
The metrics emitted for **ConcurrentCallsPercentage** are in decimal and not multiplied by 100. The metric represents a percentage of your total quota.
For **ConcurrentTasksPercentage** and **ConcurrentChatPercentage** the value is multiplied by 100. That gives you your total quota.
The metrics emitted are correct and there is no discrepancy in data. 

Here's how to calculate your quota usage for concurrent calls.

With calls active in the system, look at **ConcurrentCalls** and **ConcurrentCallsPercentage**. Calculate how much of your quota has been used:
+ (ConcurrentCalls / ConcurrentCallsPercentage)

For example, if **ConcurrentCalls** is 20 and **ConcurrentCallsPercentage** is 50, your quota usage is calculated as (20/0.5) = 40. Your total quota is 40 calls.

## Use CloudWatch metrics to calculate concurrent active chats quota


Here's how to calculate your quota for concurrent active chats. 

With chats active in the system, look at **ConcurrentActiveChats** and **ConcurrentChatsPercentage**. Calculate the quota: 
+ (ConcurrentActiveChats / ConcurrentActiveChatsPercentage) \$1 100

For example, if **ConcurrentActiveChats** is 1000 and **ConcurrentActiveChatsPercentage** is 50, your quota is calculated as (1000/50)\$1100 = 2000. Your total quota is 2000 chats. 

## Use CloudWatch metrics to calculate concurrent task quota


Here's how to calculate your quota for concurrent tasks. 

With tasks active in the system, look at **ConcurrentTasks** and **ConcurrentTasksPercentage**. Calculate the quota: 
+ (ConcurrentTasks / ConcurrentTasksPercentage)\$1100

For example, if **ConcurrentTasks** is 20 and **ConcurrentTasksPercentage** is 50, your total quota is calculated as (20/50)\$1100= 40. Your total quota is 40 tasks.

## Use CloudWatch metrics to calculate concurrent email quota


Here's how to calculate your quota for concurrent email. 

With email active in the system, look at **ConcurrentEmails** and **ConcurrentEmailsPercentage**. Calculate the quota: 
+ (ConcurrentEmails / ConcurrentEmailsPercentage)\$1100

For example, if **ConcurrentEmails** is 20 and **ConcurrentEmailsPercentage** is 50, your total quota is calculated as (20/50)\$1100= 40. Your total quota is 40 emails.

# Log Amazon Connect API calls with AWS CloudTrail
Logging service API calls

Amazon Connect is integrated with AWS CloudTrail, a service that provides a record of the Amazon Connect API calls that a user, role, or AWS service makes. CloudTrail captures Amazon Connect API calls as events. All public Amazon Connect APIs support CloudTrail. 

**Note**  
For access to the updated Amazon Connect admin website and CloudTrail support, you must use service-linked roles. For more information, see [Use service-linked roles and role permissions for Amazon Connect](connect-slr.md).

Using the information that CloudTrail collects, you can identify a specific request to an Amazon Connect API, the IP address of the requester, the requester's identity, the date and time of the request, and so on. If you configure a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket. If you don't configure a trail, you can view the most recent events in **Event History** in the CloudTrail console.

For more information about CloudTrail, including how to configure and enable it, see [Creating a Trail For Your AWS Account](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) and [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html).

## Amazon Connect information in CloudTrail


CloudTrail is enabled on your AWS account when you create the account. When supported event activity occurs in Amazon Connect, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**. You can view, search, and download recent events in your AWS account. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html). 

For an ongoing record of events in your AWS account, including events for Amazon Connect, create a trail. A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all AWS Regions and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following: 
+ [Creating a trail for your AWS account](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail supported services and integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html)
+ [Configuring Amazon SNS notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [Receiving CloudTrail log files from multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)
+ [Receiving CloudTrail log files from multiple accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

Every event or log entry contains information about who generated the request. The identity information helps you determine the following: 
+ Whether the request was made with root or AWS Identity and Access Management (IAM) credentials.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

For more information, see the [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html).

## Example: Amazon Connect log file entries


 A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order.

The following example shows a CloudTrail log entry that demonstrates the `GetContactAttributes` action.

```
{
        "eventVersion": "1.05",
        "userIdentity": {
         "type": "AssumedRole",
         "principalId": "AAAAAAA1111111EXAMPLE",
         "arn": "arn:aws:sts::123456789012:assumed-role/John",
         "accountId": "123456789012",
         "accessKeyId": "AAAAAAA1111111EXAMPLE",          
         "sessionContext": {
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2019-08-15T06:40:14Z"
            },
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AAAAAAA1111111EXAMPLE",
                "arn": "arn:aws:iam::123456789012:role/John",
                "accountId": "123456789012",
                "userName": "John"
            }
        }
    },
    "eventTime": "2019-08-15T06:40:55Z",
    "eventSource": "connect.amazonaws.com",
    "eventName": "GetContactAttributes",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "205.251.233.179",
    "userAgent": "aws-sdk-java/1.11.590 Mac_OS_X/10.14.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.202-b08 java/1.8.0_202 vendor/Oracle_Corporation",
    "requestParameters": {
        "InitialContactId": "00fbeee1-123e-111e-93e3-11111bfbfcc1",
        "InstanceId": "00fbeee1-123e-111e-93e3-11111bfbfcc1"
    },
    "responseElements": null,
    "requestID": "be1bee1d-1111-11e1-1eD1-0dc1111f1ac1c",
    "eventID": "00fbeee1-123e-111e-93e3-11111bfbfcc1",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "recipientAccountId": "123456789012"
}
```

## Example: Amazon Connect Voice ID log file entries


Just like Amazon Connect, Voice ID is integrated with CloudTrail. When enabled, the service emits events for the Voice ID API calls made by a user, role, or an AWS service. You can reuse the same CloudTrail resources created for Amazon Connect, including the trail and the S3 bucket, to receive CloudTrail logs for Voice ID as well. 

For security reasons, the sensitive fields which might contain PII information in the API requests and responses are redacted in the events.

The following example shows a CloudTrail log entry that demonstrates the ` CreateDomain` action.

```
{
  "eventVersion": "1.08",
  "userIdentity": {
    "type": "AssumedRole",
    "principalId": "AROA5STZEFPSWCM4YHJB2:SampleUser",
    "arn": "arn:aws:sts::111122223333:assumed-role/SampleRole/SampleUser",
    "accountId": "111122223333",
    "accessKeyId": "AAAAAAA1111111EXAMPLE",  
    "sessionContext": {
      "sessionIssuer": {
        "type": "Role",
        "principalId": "EXAMPLEZEFPSWCM4YHJB2",
        "arn": "arn:aws:iam::111122223333:role/SampleRole",
        "accountId": "111122223333",
        "userName": "SampleRole"
      },
      "webIdFederationData": {},
      "attributes": {
        "mfaAuthenticated": "false",
        "creationDate": "2021-08-17T01:55:39Z"
      }
    }
  },
  "eventTime": "2021-08-17T01:55:41Z",
  "eventSource": "voiceid.amazonaws.com",
  "eventName": "CreateDomain",
  "awsRegion": "us-west-2",
  "sourceIPAddress": "205.251.233.179",
  "userAgent": "aws-sdk-java/1.11.590 Mac_OS_X/10.14.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.202-b08 java/1.8.0_202 vendor/Oracle_Corporation",
  "requestParameters": {
    "description": "HIDDEN_DUE_TO_SECURITY_REASONS",
    "name": "HIDDEN_DUE_TO_SECURITY_REASONS",
    "serverSideEncryptionConfiguration": {
      "kmsKeyId": "alias/sample-customer-managed-key"
    }
  },
  "responseElements": {
    "domain": {
      "arn": "arn:aws:voiceid:us-west-2:111122223333:domain/ExampleOsAjzg9xoByUatN",
      "createdAt": "Aug 17, 2021, 1:55:40 AM",
      "description": "HIDDEN_DUE_TO_SECURITY_REASONS",
      "domainId": "UcUuCPFOsAjzg9xoByUatN",
      "domainStatus": "ACTIVE",
      "name": "HIDDEN_DUE_TO_SECURITY_REASONS",
      "serverSideEncryptionConfiguration": {
        "kmsKeyId": "arn:aws:kms:us-west-2:111122223333:key/1111111-7741-44b1-a5fe-7c6208589bf3"
      },
      "updatedAt": "Aug 17, 2021, 1:55:40 AM"
    }
  },
  "requestID": "11111111-b358-4637-906e-67437274fe4e",
  "eventID": "1111111-a4d1-445e-ab62-8626af3c458d",
  "readOnly": false,
  "eventType": "AwsApiCall",
  "managementEvent": true,
  "eventCategory": "Management",
  "recipientAccountId": "111122223333"
}
```

# EventBridge events emitted by Amazon Connect
EventBridge events emitted by Amazon Connect

Amazon Connect emits a variety of events related to the contact center, including but not limited to the following types of events:
+  [Contact events](contact-events.md) - contact (voice calls, chat, and task) events.
+ [Rule events](contact-lens-rules-eventbridge-event.md) - create rules that generate EventBridge events.
+ [Performance evaluation events](performance-evaluation-events.md) - monitor failures for automated evaluations and S3 exports of evaluations.
+ [Screen recording events](track-screen-recording-status.md) - events for tracking agent screen recording status.
+ [Voice ID events](voiceid-event-schema.md) - events for every transaction: enrollment, authentication, or detection of fraudsters in a watchlist. Events are sent to the EventBridge default event bus. 