Example configure MS Flow for last agent routing
This example shows you how you can use Microsoft Flows for Last Agent Routing.
Step 1: Prepare the UCC for LastAgent Routing
The following steps are required to use Last Agent Routing within a UCCUCC stands for Unified Contact Center and consists of a queue that can be handled by Agents Each Contact Center has its own settings, interactive voice response questions and Agent with specific skills. Agents can be member of, or sign up to, one or more Contact Centers..
Step 1.1: Activate WriteSummaryToSharePoint
- In the UCC that should have Last Agent Routing enabled, go to the list “Settings”. Add a new item (or edit the existing item) with title “WriteSummaryToSharePoint” and set the value to “true”.
- From now on every call that is managed by the UCC will write a summary of this call to the list “CallSummary”.
Step 1.2: Create Skills
- Create a Skill for every single Agent and link this Skill to the specific Agent. It is advised to use an Availability- ,CountDown- or a CountDownAvailability Skill, so an escape is possible if the Agent is not able to answer the call.
Step 1.3: Create IVR Questions
- Create an IVRInteractive Voice Response (IVR) is a telephone application to take orders via telephone keypad or voice through a computer. By choosing menu options the caller receives information, without the intervention of a human operator, or will be forwarded to the appropriate Agent. Question for every single Agent with Title “Question sipThe Session Initiation Protocol (SIP) is a protocol to make multimedia communication (audio, video and other data communication) possible and it is also used for Voice over IP (VoIP). SIP has similarities with other Internet protocols such as HTTP and SMTP.:<SIP address” and Skill<specific agent skill (as generated in previous step).
Note that the “WelcomeMessage” has the fallback skill of the individual Agent Skills.
- So if a customer calls for the first time one of the three Agents of this UCC will answer the call. If a customer calls for the second time, the call will be forwarded to the IVRQuestion of a specific Agent; if the agent is not able to answer the call itwill be offered to another Agent (using the escape).
Step 2: Create a Microsoft Flow
From your Office Portal, go to your Flow App:
Click "My Flows":
Click "New" and "Create from Blank":
Select connector "SharePoint, When an item is created":
When call is ended and entry is written in CallSummary list
Get all parent questions that match ‘Question <sipaddress agent>’
concat('Title eq ''Question ',triggerBody()?['wsp_ucc_InitialAgent'],'''')
Compose a variable to count the number of matching IVR Questions
If a total of 1 IVR Question is found continue
Get routing items that match customer
If customer called using phone convert phone number into sip address; otherwise use customer sip address
tel:+31123456789 => sip:+email@example.com
sip:firstname.lastname@example.org => sip:email@example.com
if(equals(substring(triggerBody()?['wsp_ucc_Customer'],0,3),'tel'),concat('wsp_ucc_routing_match_from eq ''','sip:',substring(triggerBody()?['wsp_ucc_Customer'],4,sub(length(triggerBody()?['wsp_ucc_Customer']),4)),'@vfanywhere.nl'''),concat('wsp_ucc_routing_match_from eq ''',triggerBody()?['wsp_ucc_Customer'],''''))
Compose a variable to count the number of matching Routing Items
If number of Routings found is 0 continue
For each IVR Question found (which is limited to 1 by the first condition in this flow)
Create a Routing Item
concat('Customer ', triggerBody()?['wsp_ucc_Customer'])
Action Value: Question
PartenQuestion Id: items('Apply_to_each')['ID']
Content type Id: UCCRouting
Finally, remove the call summary item that triggered the flow
If all steps are followed, you will have the following flow: