contact_metrics
Creates, updates, deletes, gets or lists a contact_metrics resource.
Overview
| Name | contact_metrics |
| Type | Resource |
| Id | aws.connect.contact_metrics |
Fields
The following fields are returned by SELECT queries:
- get_contact_metrics
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the contact for which metrics were retrieved. |
id | string | The unique identifier of the contact for which metrics were retrieved. This matches the ContactId provided in the request. |
metric_results | array | A list of metric results containing the calculated values for each requested metric. Each result includes the metric name and its corresponding value. For example, POSITION_IN_QUEUE returns a numeric value representing the contact's position in queue, and ESTIMATED_WAIT_TIME returns the predicted wait time in seconds. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_contact_metrics | select | region | Retrieves contact metric data for a specified contact. Use cases Following are common use cases for position in queue and estimated wait time: Customer-Facing Wait Time Announcements - Display or announce the estimated wait time and position in queue to customers before or during their queue experience. Callback Offerings - Offer customers a callback option when the estimated wait time or position in queue exceeds a defined threshold. Queue Routing Decisions - Route incoming contacts to less congested queues by comparing estimated wait time and position in queue across multiple queues. Self-Service Deflection - Redirect customers to self-service options like chatbots or FAQs when estimated wait time is high or position in queue is unfavorable. Important things to know Metrics are only available while the contact is actively in queue. For more information, see the Position in queue metric in the Connect Customer Administrator Guide. Endpoints: See Connect Customer endpoints and quotas. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_contact_metrics
Retrieves contact metric data for a specified contact. Use cases Following are common use cases for position in queue and estimated wait time: Customer-Facing Wait Time Announcements - Display or announce the estimated wait time and position in queue to customers before or during their queue experience. Callback Offerings - Offer customers a callback option when the estimated wait time or position in queue exceeds a defined threshold. Queue Routing Decisions - Route incoming contacts to less congested queues by comparing estimated wait time and position in queue across multiple queues. Self-Service Deflection - Redirect customers to self-service options like chatbots or FAQs when estimated wait time is high or position in queue is unfavorable. Important things to know Metrics are only available while the contact is actively in queue. For more information, see the Position in queue metric in the Connect Customer Administrator Guide. Endpoints: See Connect Customer endpoints and quotas.
SELECT
arn,
id,
metric_results
FROM aws.connect.contact_metrics
WHERE region = '{{ region }}' -- required
;