Use Case - Creating Tasks in Planner for All Nimbus Service Calls

Create different tasks in Microsoft Planner depending on the outcome of a call.

In this Use Case we want to create different tasks in Microsoft Planner depending on the call outcome:

  • Missed Calls without leaving a voice message shall create call back tasks
  • Missed Calls with a voice message left shall create tasks with the voice message content
  • Handled Calls should create follow-up tasks for the Agent who handled the call.

Each case will result in a different power automate flow. We will therefore need to create 3 flows.

PRECONDITIONS

  • You require service owner to make changes to the service workflow and Nimbus configuration and share the planner tasklist
  • A service is set up
 

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.
 
 

Create the planner list and buckets

Add a new Tab on your team and create a new planner list. Add 3 buckets to it

  • Call back
  • Follow-up
  • Voicemail

Here is a preview of what we expect to see, once the Power Automate flows are all set up:

Configuration in Nimbus

In Nimbus we need to create a new Parameters and set up the workflow.

  1. Create a Parameter named "WentToVoiceMail" and set its value to -1 .
  2. Then, in the service workflow, before sending any calls to a voice message activity, we set the value of this parameter.
    We can use the activities "Save To Parameter " or " Collect Information " to do so.
  3. Finish your workflow as needed (e.g. with Voice Message and Caller disconnect). 

Now it's time to prepare the flows in the background.

Flow 1: After every handled call, create a follow-up task in Planner

Create a new flow and name it: "<Nimbus Service Name>- Follow-up Task on ConnectedToUser in Planner".

Show Flow Overview

 

 
 

The flow steps are explained in the following.

Description
Settings
Element
To trigger the flow, begin with " GetOnUpdatedTasks " from the Nimbus Connector and listen to the ConnectedToUser event.
  • Service Item = Your Nimbus service
  • SessionEvent Item = ConnectedToUser

 

Add a "Initialize variable" element to the flow to store the last connected user id to.
  • Name = LastConnectedUserId
  • Type = String
  • Value = triggerOutputs()?['body/lastConnectedUserId']

Add a O365 "Get user profile (V2)" element to the flow. We want to use the last connected user Id to get the user information from Office.
  • User (UPN) = variables('LastConnectedUserId')

Now add a "Create a task" element from the Planner connector to the flow. 
  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = Folllow-up on call with @{triggerOutputs()?['body/microsoftCallerId']}(@{triggerOutputs()?['body/customer/displayName']})
  • Bucket Id = Follow-up
  • Assigned User Ids = @{outputs('Get_user_profile_(V2)')?['body/userPrincipalName']}

💡 We also set the label Blue to Yes to help distinguish the task in planner.

Add a "Update task details" element to the flow. 

We also want to see the Voice message link on the task. 

  • Task Id = outputs('Create_a_task')?['body/id'] 
  • References Alias - 1 = CRM link to customer
  • Reference Response Link - 1 = concat('https://tel.search.ch/?was = ', triggerOutputs()?['body/microsoftCallerId'])

💡 The reference link could be your customer CRM's URL.

Flow 2: On missed calls without voice message left, create a call-back task in Planner

Create a new flow and name it: "<Nimbus Service Name> - Callback on WentToVoicemail = -1 and LastConnectedUser null in Planner".

Show Flow Overview

 
 
Description
Setting
Element
To trigger the flow begin with " GetOnUpdatedTasks " from the Nimbus Connector and listen to the Terminated event.
  • Service Item = Your Nimbus service
  • SessionEvent Item =  Terminated

Add an "Initialize variable" element to the flow to store the WentToVoiceMail parameter value.
  • Name = WentToVoiceMail 
  • Type = Integer
  • Value = int(triggerOutputs()?['body/CustomContextParameter/WentToVoiceMail '])
Add another "Initialize variable" element to the flow to store the LastConnectedUserId to.
  • Name = LastConnectedUserId
  • Type = String
  • Value = triggerOutputs()?['body/lastConnectedUserId']
Add a "Condition" element to the flow. We need to check if LastConnectedUserId is null
  • LastConnectedUserId
  • is equal to
  • <leave blank>

In the "YES" branch we want to go further.

Add a "Condition" element to the flow. We need to check if there has been a voice message recording or not. If not, then we want to create the call back task.

If the user pressed any key (as indicated in our workflow), then the call went to the voicemail workflow activity.

  • WentToVoiceMail 
  • is greater than or equals
  • 0

In the "NO" branch we want to go further.

Add a "Create a task 2" element to the flow. 

This allows us to create a task in planner. 

  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = triggerOutputs()?['body/microsoftCallerId']
  • Bucket id=Call back

💡 We also set the label Red to Yes to help distinguish the task in planner,

We also want to set some details on the task. Add a "Update task details" to the flow. Add information according to your own use case. 
  • Task Id = outputs('Create_a_task_2')?['body/id'] 
  • Description = Missed a call from @{triggerOutputs()?['body/customer/displayName']}, @{triggerOutputs()?['body/microsoftCallerId']}
  • References Alias - 1 = CRM link to customer
  • Reference Response Link - 1 = concat('https://tel.search.ch/?was =', triggerOutputs()?['body/microsoftCallerId'])

We also add a checklist item "Call back" and set it to unchecked.

Flow 3: For every voice message left, create a voice-message handling task in Planner

Create a new flow and name it: "<Nimbus Service Name> - Voicemail Task on Received Voicemail Card in Planner".

Show Flow Overview

 
 
Description
Setting
Element

We know that Nimbus Voice messages create Adaptive cards in Teams. 

Therefore, begin the flow with a Teams trigger "When a new channel message is added".

  • Team = Your Nimbus service
  • Channel = General

Add a "Initialize variable" element to the flow.

From the Adaptive Card, we want to get to the VoiceMessageUrl.

  • Name = VoiceMessageUrl
  • Type = String
  • Value = json(triggerOutputs()?['body/attachments'][0]['content'])['actions'][0]['url']

Add another "Initialize variable" element to the flow.

From the Adaptive Card, we want to get the Title text.

  • Name = VoiceMessageText
  • Type = String
  • Value = json(triggerOutputs()?['body/attachments'][0]['content'])['body'][2]['items'][0]['text']

Now add a "Condition" element to the flow. We need to check on the Url. 

Only if a voicemessage has been left, we want to create the task in planner.

  • length(variables('VoiceMessageURL')
  • is greater than
  • 0

In the YES branch, add a "Create a task" element to the flow. 

We set the title to the Voice Message adaptive card text.

  • Group Id = Your Nimbus Team
  • Plan Id = The name of the planner list from step 1
  • Title = variables('VoiceMessageText')
  • Bucket id=Voicemail

 

We also need to add the Voicemail Url as a link to the task.

Add a "Update task details" to the flow. Add information according to your own use case.

  • References Alias - 1 = Download link
  • Reference Response Link - 1 = variables('VoiceMessageURL')
UCID UC  NIMB 047

Table of Contents