Use Case - Transferring Calls to an On-Call Agent from a SharePoint List

Set up a simple logic in your service workflow to assign the correct on-call agent outside of regular office hours.

In this use case, we want to set up a simple logic in our service workflow to assign the correct on-call agent outside of regular office hours.

PRECONDITIONS

  • You require service owner rights to to create and update and share an excel list on Teams. 
  • A Nimbus service is set up and ready to receive calls.
 

Show Icon Legend

💡 = A hint to signal learnings, improvements or useful information in context. 🔍 = Info points out essential notes or related page in context.
☝ = Notifies you about fallacies and tricky parts that help avoid problems. 🤔 = Asks and answers common questions and troubleshooting points.
❌ = Warns you of actions with irreversible / data-destructive consequence. ✅ = Intructs you to perform a certain (prerequired) action to complete a related step.
 
 

Configuration in Nimbus

First we need some Parameters to check on.

Description
Screenshot in Nimbus

Create these parameters in Nimbus:

  • OnCallAgent, default value null
  • TransferToOncallAgent, default value -1 or false

Create the Workflow

In the Workflow, we want to route the Closed -node from the Check Opening Hours activity to the on-call agent.

💡 The workflow overview below demonstrates the path we are interested in during this Use Case. Other paths and activities are excluded to make it easier to understand.

Description
Activity
  1. Add a Collect Information activity to the flow.
    1. Set Max digits to 1
    2. Save the choice to the TransferToOnCallAgent parameter.

🔍 Behaviour:

If the customer presses any key, it will be stored into the parameter. A Power Automate flow can check the parameter and set the OnCallAgent according to a shared list.

  1. Connect the "Input Received" output to a Wait For Parameter activity.
  2.  Select the OnCallAgent parameter.
  3.  Set the waiting time to 5 seconds (depending on how much time the Power Automate Flow needs to update the parameter, you can adjust the waiting time accordingly)

🔍 Behaviour:

This activity will wait for Power Automate to update the OnCallAgent parameter. If the OnCallAgent parameter is updated within the waiting time defined, the Updated exit will be taken. In case the parameter is not updated by Power Automate within the defined waiting time, the Timeout Reached exit will be taken.

  1. Connect the "Updated" output to a "Transfer" activity.
  2. Set the transfer to the OnCallAgent custom parameter.
    💡 This parameter will be filled with the correct Agent number during the Power Automate flow.

 

Create and Share the On-Call Agent List

KNOWN ISSUE - NO RESULTS FOR “ONCALL = TRUE”

There is a known error in Power Automate that is causing not receiving any results for "OnCall = true'". Instead, when using "OnCall = false'" (which is logically the same), it is working correctly.

 

In the MS Teams Channel of your service, create a list - in our example "OnCallCagents" - with at least three data columns:

  • Titlestring, the name of your Agent(s)
  • OnCallboolean (true/false)
  • Mobilestring, well-formatted mobile number of the agent

☝ Note that the flow will check ONLY for the first Agent being on call - in this case "Maria". The list is always parsed top to bottom and will consider the first "OnCall = true" Agent, not multiple entries.

Create the Flow to Fill the OnCallAgent Parameter

Now it's time to create the Power Automate flow to look into your Agent table during an incoming call. Here is an overview of the flow:

✅ In the following we will go through this step-by-step. Log into your Power Automate and create a new Flow.

Description
Settings
Element
Begin the flow with the Nimbus Trigger Events element "GetOnUpdatedTasks" and set the event to "Parameter Updated".

GetOnUpdatedTasks:

  • Service Item = Your service
  • SesseionEvent Item = Parameter Updated

 

Add 3 Initialize variable elements to the flow.

First "Initialize Variable":

  • Name = UpdatedParameterName
  • Type = String
  • Value = triggerOutputs()?['body/UpdatedParameterName']

💡 We will check on the UpdatedParameterName in the next conditions step.

Second "Initialize Variable":

  • Name = UpdatedParameterValue
  • Type = String
  • Value = triggerOutputs()?['body/UpdatedParameter Value ']

Third "Initialize Variable":

  • Name = OnCallAgentPhoneNumber
  • Type = String
  • Value = null

 

Add a "Condition" element to the flow.

💡 We only want to go further in the flow if TransferToOnCallAgent Parameter was updated. This happens only if the caller pressed any button (as instructed in the announcement activity of the workflow).

Condition:

  • variables('UpdatedParameterName') is equal to TransferToOncallAgent
  • int(variables( 'UpdatedParameterValue' )) is greater than or equals 0

Add a SharePoint "Get items" element to the flow.

💡 This allows you to access the list with the on-call agents created on the Teams channel.

  • We want to filter to the entries with OnCall = true.
  • We know that only one entry should be returned. 

Get items:

  • Site Address = The Team
  • List Name = OnCallAgents
  • Filter Query = OnCall eq 'true'
  • Top Count = 1

Add a "Set variable" element to the flow and set the OnCallAgentPhoneNumber variable to the Mobile field of the response from "Get items".

💡 As the result of the "Get items" element is a list the flow will automatically add the apply to each loop. We can leave it like that.

Set Variable:

Name = OnCallAgentPhoneNumber

Value = items('Apply_to_each')?['Mobile']

Add a "UpdateTask" from the Nimbus connector to the flow and set the CustomContextParameters with the on call agent number. 

RequestId = RequestId

CustomContextParameters:

  • Name = OnCallAgent
  • Value = variables('OnCallAgentPhoneNumber')

 

Table of Contents