Dialogue Cloud

Example configure Microsoft Power Automate for last agent routing

If you want customers to experience that they have a single point of contact, without actually having a single point of contact, you can configure Last Agent Routing in Anywhere365.

Last Agent Routing makes it possible to route customers to an Agent to which they have spoken before.

The Microsoft Power Automate will do the following:

  1. Triggers when a new item is added to the CallSummary list

  2. If customer already in routing list

    1. Update routing list

  3. If new customer

    1. Create a UCC A Unified Contact Center, or UCC, is a queue of interactions (voice, email, IM, etc.) that are handled by Agents. Each UCC has its own settings, IVR menus and Agents. Agents can belong to one or several UCCs and can have multiple skills (competencies). An UCC can be visualized as a contact center “micro service”. Customers can utilize one UCC (e.g. a global helpdesk), a few UCC’s (e.g. for each department or regional office) or hundreds of UCC’s (e.g. for each bed at a hospital). They are interconnected and can all be managed from one central location. routing item pointing the customer to a question and skill for the last agent


Step 1: Prepare the UCC for LastAgent Routing

The following steps are required to use Last Agent Routing within a UCC.


Step 1.1: Activate WriteSummaryToSharePoint

  1. 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”.

  2. From now on every call that is managed by the UCC will write a summary of this call to the list“CallSummary”.

 

 

Step 1: Prepare the UCC for LastAgent Routing

The following steps are required to use Last Agent Routing within a UCC.


Step 1.1: Activate WriteSummaryToSharePoint

  1. 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”.

  2. 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

  1. 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

  1. Create an IVR Interactive Voice Response, or 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 sip:<SIP The Session Initiation Protocol, or SIP, is a protocol for multimedia communication (audio, video and data communication). SIP is also used for Voice over IP (VoIP). SIP has interactions with other Internet protocols such as HTTP and SMTP. address” and Skill<specific agent skill (as generated in previous step).

    Note: The “WelcomeMessage” has the fallback skill of the individual Agent Skills.

  2. 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 Power Automate Flow

  1. From your Office Portal, go to your Power Automate App:

  2. Click "My Flows":

  3. Click "New" and "Create from Blank":

  4. Select connector "SharePoint, When an item is created":

  5. When call is ended and entry is written in CallSummary list

  6. Get all parent questions that match ‘Question <sipaddress agent>’

    Copy
    Expression
    concat('Title eq ''Question ',triggerBody()?['wsp_ucc_InitialAgent'],'''')
  7. Compose a variable to count the number of matching IVR Questions

    Copy
    Expression
    length(body('Get_ParentQuestion')?['value'])
  8. If a total of 1 IVR Question is found continue

  9. 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:+31123456789@domain.com

    sip:customer@domain.com => sip:customer@domain.com

    Copy
    Expression
    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)),'@domain.com'''),concat('wsp_ucc_routing_match_from eq ''',triggerBody()?['wsp_ucc_Customer'],''''))
  10. Compose a variable to count the number of matching Routing Items

    Copy
    Expression
    length(body('Get_RoutingItems')?['value'])
  11. If number of Routings found is 0 continue

  12. For each IVR Question found (which is limited to 1 by the first condition in this flow)

  13. Create a Routing Item

    Title:

    Copy
    Expression
    concat('Customer ', triggerBody()?['wsp_ucc_Customer'])

    Match From:

    Copy
    Expression
    if(equals(substring(triggerBody()?['wsp_ucc_Customer'],0,3),'tel'),concat('sip:',substring(triggerBody()?['wsp_ucc_Customer'],4,sub(length(triggerBody()?['wsp_ucc_Customer']),4)),'@domain.com'),triggerBody()?['wsp_ucc_Customer'])

    Action Value: Question

    Active: Yes

    ExactMatch: Yes

    PartenQuestion Id: items('Apply_to_each')['ID']

    MatchEndpoint: ALL

    Order: 1

    Content type Id: UCCRouting

  14. (Optional) Finally, remove the call summary item that triggered the flow

 

Result

If all steps are followed, you will have the following flow: