If you are using AWS connect as a contact center solution one problem that happens often is when TOLL free number would receive a high amount of call volume that your currently staffed agents would not be able to handle it.
There are ways to handle it by setting Queue limits which can overflow to other queues or branch the call flow in other directions.
The solution I propose is to slow the calls into the queue using the tools available in connect and not depending on external services or Lambda.
The aim of this solution is to control the call flow into the agent queue based on two metrics
Agent staffedandAgents availableThe below is the contact flow structure and I am going to explain how each of them work
The first block
Set working queuesets the Queue where the calls should be going to.The second block
Get queue metricsretrieves the real-time queue metricsThe third block
Check contact attributesis where I am checking the number ofAgents StaffedThis is how the block looks on the inside
I am retrieving the
Queue metricsto get the number ofAgents StaffedNow lets assume there are more than 100 agents staffed, which means there are more than 100 agents logged in and could be any status on their client.
The
Check contact attributeswould follow the first branch and go the secondCheck contact attributesblockThis is how the second
Check contact attributeslooks on the inside.Here also I am retrieving the
Queue metricsto get the number ofAgents available.In this section I am checking how many agents are in
Availablestatus to answer the call.If the number of
Availableagents are less than or equal to 20 the call flows back to theGet queue metricsblock to follow the logic again.Here it is important to use a
Play promptto play a audio for 5 seconds before looping it back. If I do not insert this delay / prompt the calls will move too fast for the contact flow to handle and it stops working for any call hitting the flow.Now if the number of
Availableagents are greater than 20 the call flows into theTransfer to queueblock after theCheck staffingblock.This same logic applies to the other blocks based the number of agents staffed are in different sections as seen the picture above.
With this solution I do not have to worry about how many agents are actually working at any time in the day. The contact flow will branch the calls based on
Agents staffedand only send in the calls if there are X amount agentsAvailableto answer the call.Hope this solution helps for any one looking for a simple solution