Skip to content

A Lambda to check if Amazon Connect agents with a particular proficiency are staffed or not?

0

I have five Amazon Connect proficiencies/predefined-attributes for the contact center. The supervisors plan to update agent-proficiencies daily.

The "Check Staffing" block only looks at queues though, not proficiencies. Therefore, it would also be necessary for the supervisors to have to reassign the agent to a particular routing profile. However - in order to capture all the possible combinations of agent-proficiency assignments to 1:1 match the queue/routing-profile assignments, I would probably have to configure 20+ routing profiles or more (e.g. proficiency 1 only; proficiencies 1 + 2; proficiencies 1, 2, 5; etc.), and then the supervisors have to match the correcting routing profile. This is not ideal.

I suppose from a high-level, one could use these API calls to accomplish this? -----hmm it might not actually be possible currently anyway... I only see x4 API calls related to proficiencies:

  1. ListUserProficiencies
  2. UpdateUserProficiencies
  3. DisassociateUserProficiencies
  4. AssociateUserProficiencies

Possible high-level design:

  1. Function input parameter = Predefined-attribute name/arn (Except that it appears that predefined attributes don't have an ARN....)
  2. Grab the users that currently have that proficiency/attribute
  3. Input those users as an argument to compare against who is currently online (Create/compare a static list of agents (with that proficiency) against who is online currently. If at least one agent with that proficiency matches one of the agents online, then return True.)

I'm not currently much of a developer/programmer, so I don't know how to combine all of these into a lambda that could determine if any agents with that proficiency are currently online or not. Perhaps someone else has already configured something like this in the past?

*I will also submit this as a feature request for an addition to the "Check Staffing" block.

asked 2 years ago822 views

2 Answers
1

While the "Check Staffing" block in Amazon Connect is limited to checking queue status, it's possible to create a custom solution using AWS Lambda and Amazon Connect APIs to check if agents with specific proficiencies are staffed. However, based on the current available APIs, this task is more complex than it might initially seem.

You're correct that there are only four API calls related to proficiencies: ListUserProficiencies, UpdateUserProficiencies, DisassociateUserProficiencies, and AssociateUserProficiencies. These APIs allow you to manage user proficiencies, but they don't directly provide information about an agent's current status.

To create a Lambda function that checks if agents with a particular proficiency are staffed, you would need to combine multiple API calls. Here's a high-level approach:

  1. Use the ListUserProficiencies API to get all users with the specified proficiency.
  2. For each user with the proficiency, use the newly introduced SearchAgentStatuses API to check their current status.
  3. Determine if any of the agents with the required proficiency are in an "available" or "staffed" state.

The SearchAgentStatuses API allows you to search for agent statuses by various criteria, including agent ID. This could be used to check the current status of each agent with the required proficiency.

However, there are some limitations to this approach:

  1. The SearchAgentStatuses API is relatively new and may not be available in all regions.
  2. This method would require multiple API calls, which could become slow and inefficient if you have a large number of agents.
  3. The Lambda function would need to be triggered regularly to provide up-to-date information, as agent statuses can change frequently.

Your suggestion to submit a feature request for an addition to the "Check Staffing" block is a good idea. Having native support for checking staffing based on proficiencies would be more efficient and easier to implement than the current workaround.

In the meantime, while it's possible to create a Lambda function to check agent staffing by proficiency, it would be a complex solution that might not perform well in large-scale environments. It might be more practical to continue using routing profiles, even if it requires creating multiple combinations, until a more efficient solution becomes available.
Sources
Amazon Connect launches search API for agent status - AWS
Flow block: Check staffing - Amazon Connect

answered 2 years ago

0

I suggest you to work this out with a Connect SA, as there is a feature now to assign proficiencies to agent directly not using Routing Profile. This gives another level of routing strategy that you do not need to create unique Routing Profiles against Queues with different priority/delay settings.

https://docs.aws.amazon.com/connect/latest/adminguide/proficiency-routing.html

Once this is setup, if you route a call to SALES, and the need of the customer is product1 instead of productB. And you want to route this call to agent that is proficient in product1 with a proficiency level of 5.

But during the day, you want to know if you queue a call to SALES that requires product1 proficiency level of 3 or higher. How many agents do I have right now? You will need to use GetCurrentMetricData. https://docs.aws.amazon.com/connect/latest/APIReference/API_GetCurrentMetricData.html#API_GetCurrentMetricData_Examples

Look at the example: "Sample GetCurrentMetricData Request Using RoutingStepExpression" The example shows: "RoutingStepExpressions": [ "{"attributeCondition": "proficiencyLevel":1.0,"comparisonOperator":"NumberGreaterOrEqualTo","name":"Location","value":"Earth"}}" ]

With this filter, and if you return AGENTS_ONLINE, AGENTS_AVAILABLE, you will know if agents are staffed at a certain proficiency level right now. And can make other routing decision or change the Routing Steps differently before you put a call into queue. Like lowering the proficiency requirements, etc.

AWS

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.