Use Case - Set Preferred Agent from CRM

Set preferred agents from a 3rd party system (e.g. CRM) for a calling customer in Nimbus.

This Use Case provides step-by-step instructions on how to set preferred Agents from a 3rd party system like a CRM into Nimbus for a calling customer.

PRECONDITIONS

License Management: 

  • Contact Center A Contact Center license is required for your Nimbus service. This allows the use of Distribution Policies and the definition of preferred Users.
  • Note that preferred Users also need to have the Contact Center license applied in order to be selectable. However, they do not need to be assigned "Agents" of your service. 
  • If Users get their license removed, they remain on the preferred list for any ongoing session. However they can not be selected as "preferred" for future sessions.

Roles and other requirements:

 

Configure your Service

  1. First check that "Preferred User Routing" is enabled for the Distribution Policy assigned to your Contact Center service.
  2. You can enable the waiting time as well. During this time the call gets distributed only to the list of preferred Users before the system sends it into the normal queue. 
  3. OPTIONAL Announcement: We can use a parameter to store and announce the preferred User chosen.
    1. Create a Parameters to announce on:
      • Name = PreferredAgent
      • Value = EMPTY
    2. Create an example workflow as shown below. 💡 Of course you can incorporate these steps into your already existing workflow. In this example we kept it simple to check just if the preferred User routing was successful. 
  4. Finally, save and close your workflow. Don't forget to assign it to your Contact Center service via the Modality Service Settings
    💡 The next part is the MS Power Automate flow that defines your preferred Users.

Create the Power Automate Flow

✅ With your workflow done, it's now time to build the MS Power Automate flow that defines your preferred Users.

 

Flow Overview

This flow consists of the following steps: 

Start Flow

  1. Go to the Flow landing page.
  2. Go to "My Flows".
  3. Click "+ New Flow" and create a blank "Automated Cloud Flow".
  4. Give your new flow a meaningful name, e.g. "Set Preferred Agent".
  5. In the text box underneath, search for “Nimbus” and choose the Trigger Event “When a task changes state”.
  6. Click the Create button. 
  7. Select the “When a task changes state” trigger.
  8. In the “Services Item” dropdown, select the Nimbus service's UPN. 
    💡 You can also get the data of multiple services at this point, but for the sake of simplicity we keep it to one service in this example.
  9.  In the “Task Events” dropdown select “System Accepted”.
  10. In the “Advanced parameters” dropdown enable “Modalities” and "Directions".
  11. In the “Modalities Item” dropdown select “Audio”.
  12. In the “Directions Item” dropdown select “Inbound”.

Look up the preferred Agent from an Excel list

💡In this example our customers are kept in a simple Excel list stored in SharePoint, which has three columns, “phoneNumber”, “preferredAgentUPN” and “preferredAgentName”

While the “phoneNumber” column contains the customer's phone numbers, the "preferredAgentUPN" column contains the UPN of the preferred Agent for the customers and the “preferredAgentName” column contains the name of the preferred Agent

💡 Note that Excel is an example. You can adapt the flow to get the preferred Agents from your CRM into Nimbus.

 
  1. In the editing area click to add a new action.
  2. Search for "Excel get a row" and select “Get a row” under the “Excel Online (Business)” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Location From the dropdown list select the SharePoint site, which stores the Excel list.
Document Library Within the above SharePoint site, select the document library storing the Excel list. 
File Under the document library select the Excel List.
Table Select the table from within the Excel list.
Key Column Select the column containing the phone numbers
Key Value 🌟Microsoft Caller Id

Check if a preferred Agent was found

  1. In the editing area click to add a new action.
  2. Search for "Condition" and select “Condition” under the “Control” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Expression Enter the expression you see in the screenshot. With this expression we will check if there are any preferred Agents configured for the customer calling (in case of no records found, the status code would be 404).
Run after On the Settings page of the Condition make sure to enable the Has failed checkbox to make sure the flow does not stop with the Get a row action in case no records were found.

Set preferred Agent in Nimbus

In case a preferred Agent was found in the Excel list for the customer, we set the preferred Agent in Nimbus. In addition we also set the PreferredAgent parameter in order our workflow can announce the name of the preferred Agent.

  1. In the editing area under the “True” branch of the condition click to add a new action.
  2. Search for "Nimbus" Flow Actions and select “Update task” under the “Luware Nimbus” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Task ID 🌟 Task ID
Preferred Users

Click on to and add

 

[
                                 {
                                  "upn": @{body('Get_a_row')?['preferredAgentUPN']},
                                  "priority": 1
                                 }
                                ]

 

The expression will add the User from the Excel list as a preferred Agent in Nimbus

Custom Context Parameter

Click on to and add

 

[
                                 {
                                  "name": "PreferredAgent",
                                  "value": @{concat('The preferred Agent is ',body('Get_a_row')?['preferredAgentName'])}
                                 }
                                ]

 

The expression will set the PreferredAgent parameter, which is used in the Workflow for announcing the preferred Agent. If no preferred Agent was found, we store “No preferred Agent was found” in the parameter

Set the PreferredAgent parameter

In case no preferred Agent was found, we set No preferred Agent was found for the PreferredAgent parameter, which is used by our workflow in the announcement.

  1. In the editing area under the “False” branch of the condition click to add a new action.
  2. Search for "Nimbus" and select “Update task” under the “Luware Nimbus” section.
  3. Configure the action as follows:
Field Value to fill in / 🌟 = Nimbus dynamic content 
Task ID 🌟 Task ID
Custom Context Parameter

Click on to and add

 

[
                                 {
                                  "name": "PreferredAgent",
                                  "value": "No preferred Agent was found"
                                 }
                                ]

Test Your Flow

To test the distribution to your preferred Agents. You need to have at least 3 Agents available in the service. Test at least the following scenarios:

Scenario Example Expected result
Customer and preferred Agent association was found Preferred Agent is available The call rings at the preferred Agent, then the group.
Preferred Agent is not available The call rings the group after the desired waiting time.
Customer and preferred Agent association was not found A preferred Agent is not set by the flow, the announcement in the workflow play No preferred Agent was found. The call rings the group, according to the settings of the Distribution Policy.

Table of Contents