AWS Contact Center

Scale and optimize staffing based on performance objectives in Amazon Connect (part 3)

Contact centers have performance objectives (service levels, agent occupancy, average speed to answer) to ensure a high-quality of customer service. The methods used to route incoming contacts have a direct influence on these performance metrics. Amazon Connect makes it possible to route contacts based on objectives that are important to the business. Part 1 of this multi-part series focused on customer-facing metrics like service level. Part 2 focused on internal resource management metrics like agent occupancy (utilization). This third part focuses on the automated balancing actions to scale the number of agents eligible to handle contacts from queues that require help in meeting their performance metrics.

Contacts in Amazon Connect are routed to one or more queues. Each agent is assigned one routing profile that contains the list of queues that this agent is eligible to handle. Priorities and delays for each queue determine the order in which agents can handle contacts from these queues. Unplanned external events (outages) can result in incoming volume fluctuations for certain queues. Similarly, unplanned internal events (absence from sickness) can result in staffing fluctuations. Contact center managers often grapple on how to allocate existing resources to maximize the performance metrics under varying conditions during the day.

This blog post demonstrates how to programmatically balance the staffing for queues to optimize for the target performance metrics. Using service level as the target metric, this solution monitors and identifies queues that are not meeting their service levels, and updates the queue prioritization in routing profiles to bring back these queues within target service levels. Using this solution, contact center managers can avoid making manual updates to routing configurations, minimize configuration errors through manual changes, and optimize the performance metrics across queues. This solution can be useful in situations where contact center managers need to make adjustments manually throughout the day.

Solution Overview 

This blog post deploys an application with event-driven processes that monitor the contact center, identify target queues that need help, and take programmatic actions to prioritize these queues. There is application-level configuration for the target performance metric (service level objective). Each queue has a configuration for the upper and lower threshold of the service level. The solution brings in additional help when the current service levels reach the lower threshold. The solution throttles help when the current service levels reach the upper threshold, and open up this capacity for other queues in need.

Solution Flow


High-level solution description:

The solution monitors the performance metrics (service level) across all queues periodically during the day. When the service level is above or below the configured threshold, the solution decreases or increases the queue priority in all the routing profiles that this queue is a part of. The upper and lower threshold values are set so that queue priority is updated only when really needed. The solution uses local data stores to cache information for faster retrieval, and limit API throttling.

The two sections in the preceding diagram show the flows that dynamically manage queue priority in the routing profile.

Section A: This runs every day to create a reverse mapping of each queue to all the routing profiles that contain this queue. This mapping is stored in a local data store for faster lookup during the day.

  1. Amazon EventBridge rule initiates a Queue Routing Profile Map Lambda function once a day.
  2. The Queue Routing Profile Map Lambda function queries Amazon Connect for queues and routing profiles. It then creates a queue to routing profile map.
  3. Queue to routing profile map is stored in the Queue to Routing Profile table, and used to look up a queue, and associated routing profiles.

Section B: This runs every 15 minutes to check the target performance metric (service level) for each queue. Depending on the service-level metric value, it adjusts the priority of the queue in all routing profiles containing that queue.

  1. Amazon EventBridge rule initiates a GetMetrics Lambda function every 15 minutes. This rule is triggered Monday to Friday from 8AM to 8PM. The rule schedule can be adjusted to your contact center’s business hours.
  2. The GetMetrics Lambda function retrieves a list of queues configured in the ConfigMetrics table.
  3. Service level value is queried from Amazon Connect using queues.
  4. Current service level value is stored in the ConfigMetrics table.
  5. The ConfigMetrics table initiates an event on update using Amazon DynamoDB Streams.
  6. Amazon DynamoDB Streams invokes UpdateRoutingProfile Lambda function.
  7. The UpdateRoutingProfile Lambda function determines if the Priority for the queue must be adjusted. It updates all Amazon Connect routing profiles containing the queue that needs adjustment.
  8. The UpdateRoutingProfile Lambda function updates Queue to Routing Profile table with the adjusted priority value.

Prerequisites

For this solution, you should have the following:

  • An AWS account with administrator access
  • An Amazon Connect instance
  • Amazon Connect agent login credentials to log in to the Contact Control Panel (CCP)
  • A contact flow with a queue configured (BasicQueue), telephone number to dial in to Amazon Connect, and route the call to an agent. You can also use the native chat widget to send in a chat contact to an agent to generate the service level metrics
  • Familiarity with the Amazon Connect Administrator Guide 

In addition, you should have knowledge and understanding of the following services and features:

Deployment walkthrough

Step 1: Get Amazon Connect instance Id

  1. Sign in to the AWS Management Console, and navigate to the Amazon Connect service.
  2. Click on the Amazon Connect instance alias name, and note down the instance Id. Amazon Connect instance Id is the last 36 characters of the Instance ARN. E.g.:
     arn:aws:connect:<REGION>:<ACCOUNT>:instance/616e89fe-bbd3-1234-6789-7b017e2dd2e3

Step 2: Launch CloudFormation template

    1. Choose to launch the AWS CloudFormation template.
    2. On the Create stack page, accept the default values and choose the Next button.
    3. On the Specify stack details page, use the default stack name or change the stack name. Enter the Amazon Connect instance Id noted earlier, and choose the Next button.
    4. On Configure stack options page, scroll down and choose the Next button.
    5. On the Review stack page, scroll down to the bottom of the page.
    6. Acknowledge IAM resources creation, and choose the Submit button.

The stack creation will take 2–3 minutes to provision resources. AWS CloudFormation template creates the following resources for this solution:

  • Three AWS Lambda functions, createQueueProfileMap, updateRoutingProfileQueue, and getMetrics.
  • Two Amazon DynamoDB tables, queueConfigMetrics, and queueRoutingProfile.
  • One Amazon DynamoDB stream, and a trigger to invoke the AWS Lambda function.
  • Three AWS IAM policies and AWS IAM roles for three AWS Lambda functions.
  • Two Amazon EventBridge rules, createQueueProfileMap and getMetrics to invoke two AWS Lambda functions.

Step 3: Testing

Amazon Connect service level metrics are generated when there are contacts handled by agents. Service level metric is updated as contacts are handled and completed by the agents.

  1. Create an initial Queue to Routing Profile map
    1. From your AWS Management Console, navigate to AWS Lambda service.
    2. Search createQueueProfileMap AWS Lambda function, and select to open.
    3. Under Code tab, choose Test.
    4. Provide Event name, and choose Save to save a default event.
    5. Click on the Test again to invoke the AWS Lambda function. The function retrieves all Amazon Connect queues, and populates it in the Amazon DynamoDB table.
  2. Configure queue, service level objective, and threshold attributes.
    1. From your AWS Management Console, navigate to the Amazon Connect service.
    2. Click on the Amazon Connect instance alias name, and log in to the Amazon Connect dashboard.
    3. From the left panel, select Routing and then Queues.
    4. Choose the queue for which you will handle contacts and test service levels (e.g. BasicQueue).
    5. Under Edit page, choose Show additional queue information
    6. Note down the queue Id. Queue Id is the last 36-characters of Queue ARN. E.g.
      arn:aws:connect:<REGION>:<ACCOUNT>:instance/<INSTANCEID>/queue/eb046094-e92a-4e02-9dbd-dae2b9123456
    7. Navigate to Amazon DynamoDB service, and create the following entry in the queueConfigMetrics table. Replace QUEUEID with the queue Id that you retrieved from the preceding step. Leave CurrentServiceLevel to 100, and adjust other attribute as per your test requirements.
      {
      "QueueId": "QUEUEID",
      "CurrentServiceLevel": 100,
      "ServiceLevelLowerRange": 5,
      "ServiceLevelObjective":70,
      "ServiceLevelThreshold": 30,
      "ServiceLevelUpperRange": 5
      }
  3. Place test calls to generate service level metrics for your queue.
    1. On your web browser, navigate to CCP login URL (https://<your-instance-alias>.my.connect.aws/ccp-v2).
    2. Enter Amazon Connect agent credentials to log in to CCP.
    3. On the CCP, change the state from “Offline” to “Available”.
    4. Place a test call or a chat contact to your Amazon Connect instance and route it to a logged in agent.
    5. On the CCP, accept the incoming contact.
    6. Stay connected for a couple of minutes, and disconnect.
    7. Leave agent in after-contact-work for a minute or so, and then end the after-contact-work to go available.
    8. Repeat steps 4 to 7 above a few times, while going on a break and leaving contact in the queue for a minute or two, before going available to answer the contact.
    9. Check the service level metrics in Amazon Connect dashboard for interval Daily and metric ‘Service level 30 seconds’ to see the current value.
  4. Amazon EventBridge rule triggers every 15 minutes to retrieve the service level metrics using getMetrics AWS Lambda function. Notice updates to your queue’s routing profile as following:
    1. Before routing profile configuration:
    2. It will increase the queue priority in the routing profile (decrease the priority number by one), if service-level objective is less than current service-level. E.g. Service level of 70% within 30 secs is currently 45.45%. So Basic Queue priority is lowered in the routing profile. Navigate to your routing profile in Amazon Connect console.
    3. It will decrease the queue priority in routing profile (increase the priority number by one), if service-level objective is higher than current service-level. E.g. Service level of 70% within 30 secs is currently 80%. So Basic Queue priority is increased in the routing profile.Navigate to your routing profile in Amazon Connect console.

You’ve successfully configured and tested queue priority adjustments based on its service level metrics. This allows your contact center to operate at an optimum level without any manual intervention of moving agents or queues in and out of routing profile.

Clean up

Navigate to AWS CloudFormation service, select the stack that you created, and, choose the Delete button. Delete the stack resources by choosing Delete stack button on confirmation screen.

Considerations

This post provides the framework to dynamically adjust queue priorities in routing profiles.

  • The post uses one target service-level threshold value (30 seconds) for all the queues. You can extend it to have different threshold value per queue.For centers with a high number of queues, consider API throttling, performance testing the solution before deployment.
  • You can use another target metric in place of service levels… You can also extend it to optimize multiple performance metrics. E.g. You can use Average queue abandon time, Average queue answer time, or Contacts abandoned in X seconds metrics to adjust the queue priority up or down.
  • Some businesses may need to start the day with a certain combination of priorities across the routing profiles. This solution can be extended to store that snapshot and start each day with that snapshot instead of how the prior day ended.

Conclusion

This blog post demonstrates how to programmatically balance the staffing for queues to optimize for the target performance metrics.

  • Deployed CloudFormation stack that included AWS Lambda functions, Amazon DynamoDB tables and stream, and Amazon EventBridge Rules.
  • Amazon Connect service level metric was used to adjust queue priority in routing profiles. Priority was adjusted when current service level reaches the pre-configured upper or lower limit threshold.
  • Tested the solution by logging in an agent and placing calls to Amazon Connect.
  • You can enhance the solution based on your organization’s requirements.

Using service level as the target metric, this solution monitors and identifies queues that are not meeting their service levels, and updates the queue prioritization in routing profiles to bring back these queues within target service levels. Using this solution, contact center managers can avoid making manual updates to routing configurations, minimize configuration errors through manual changes, and optimize the performance metrics across queues.

With Amazon Connect, you pay for what you use. There are no upfront payments, long-term commitments, or minimum monthly fees. The price metrics are detailed on Amazon Connect pricing.

Should you need help with setting this up, you can get assistance from AWS Professional Services. You can also seek assistance from Amazon Connect partners available worldwide.

Ready to transform your customer service experience with Amazon Connect? Contact us.

Meet the Authors

Parind Poi is a Senior Practice Leader at AWS Professional Services. He leads a specialized practice with deep expertise in customer experience (CX) on AWS. Parind is passionate about helping customers modernize their customer engagement workloads on cloud.
Prashant Desai is a Principal Consultant at AWS Professional Services, experienced in designing and migrating large contact centers to the cloud. With over 25 years in contact centers, legacy and cloud. Prashant constantly seeks innovative ways to modernize customer workloads and simplify customer experience.
Mehul Patel is a Senior Consultant at AWS Professional Services. Mehul has more than 20+ years of experience in Contact Center and telecommunications field with traditional and cloud-based contact centers, working as a solution architect supporting large enterprise customers.