Use Case - Scheduling a Callback Task in Nimbus for Missed Calls on Demand

Show notification on missed calls and enable the service team to interact with adaptive cards in order to schedule a callback task.

When a service misses a call, we want that the whole Nimbus service team gets a notification, and any agent in that team can interact with an adaptive card to schedule a callback task.

PRECONDITIONS

You need to build this use case first: Use Case - Creating Nimbus outbound calls from a list of scheduled tasks.

 

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 Flow

Description
Screenshot
Start with the GetOnUpdatedTasks element from the Nimbus Connector and set the Session event to "QueueLeft".

Add a Initialize Variable element to the flow.

  • Name = DisplayName
  • Type = String

 

Add a Initialize Variable element to the flow.

  • Name = DisplayName
  • Type = String
  • Value = The Url to the list or table, holding the callback entries

In our case the Url is the shared list in Teams. We can find its url from the Teams tab "Copy link to tab"

 

Add a Condition element to the flow and check if the customer is known or not.

In our case we check on the Customer.Firstname value. If it is euqal to EMPTY, then the customer is unknown as we could not map the Firstname during the caller identification flow.

Add a Set variable element to each outcome.

Set the DisplayName variable accordingly.

Add a "Post adaptive card and wait for a response" element to the flow.

We want to send the card in the Channel using the flow bot.

Set the card content to:

Adaptive Card content

{
 "type": "AdaptiveCard",
 "body": [
 {
 "type": "TextBlock",
 "size": "Medium",
 "weight": "Bolder",
 "text": "Missed Call"
 },
 {
 "type": "ColumnSet",
 "columns": [
 {
 "type": "Column",
 "items": [
 {
 "type": "Image",
 "style": "Person",
 "url": "https://help.luware.com/download/attachments/31759305/NIMB?version=4&modificationDate=1605004975800&api=v2",
 "size": "Small"
 }
 ],
 "width": "auto"
 },
 {
 "type": "Column",
 "items": [
 {
 "type": "TextBlock",
 "weight": "Bolder",
 "text": "Nimbus Power Automate Flow",
 "wrap": true
 },
 {
 "type": "TextBlock",
 "spacing": "None",
 "text": "Created @{formatDateTime(utcNow(), 'g')} ",
 "isSubtle": true,
 "wrap": true
 }
 ],
 "width": "stretch"
 }
 ]
 },
 {
 "type": "TextBlock",
 "text": "Missed a call from @{variables('DisplayName')} (@{triggerOutputs()?['body/callerTelNumber']})",
 "wrap": true
 },
 {
 "type": "TextBlock",
 "text": "Schedule a call back",
 "wrap": true,
 "weight": "Bolder"
 },
 {
 "type": "Input.Date",
 "id": "date"
 },
 {
 "type": "Input.Time",
 "id": "time"
 }
 ],
 "actions": [
 {
 "type": "Action.OpenUrl",
 "title": "View Contact in Hubspot",
 "url": "@{triggerOutputs()?['body/customContextParameters/HubSpotUrl']}"
 },
 {
 "type": "Action.Submit",
 "title": "Schedule Callback"
 }
 ],
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.4"
}

This will render the following card:

🔍 You can omit or adapt the "View Contact in Hubspot" button.

Add a Compose element to the flow to store the adaptive card response to.

  • Inputs = outputs('Post_adaptive_card_and_wait_for_a_response_2')?['body/data']

 

In Sharepoint, time values are stored in UTC and displayed according to the timezone regional settings. You can find them in the Site Settings of your Sharepoint instance:

 

When someone interacts with an adaptive card in Teams and sets the date time, we need to convert the input to UTC before storing the values into the list or table.

To do so, add a Convert time zone element to the flow and set the values to

  • Base time = @{outputs('Submitted_Data_2')?['date']}T@{outputs('Submitted_Data_2')?['time']}:00.0000000+02:00
  • Source Time zone = The timezone regional settings in Sharepoint
  • Destination time zone = UTC

Add a Create Item element to the flow. Set the values to

  • Site Address = Your Sharepoint site
  • List Name = Your List
  • Title = Callback scheduled via Missed Call Adaptive Card - @{formatDateTime(utcNow(), 'dd-MM-yyyy')}
  • Number = @{triggerOutputs()?['body/callerTelNumber']}
  • Customer Name = @{variables('DisplayName')}
  • Datetime = @{body('Convert_time_zone_2')}
  • Status = No
  • Comments = Call back for missed call

 

Finally, add a "Reply with adaptive card in channel" element to the flow. Post as Flow bot in a Channel and set the other values to

  • Message Id = @{outputs('Post_adaptive_card_and_wait_for_a_response_2')?['body/messageid']}
  • Team = Your Team Name
  • Channel = General

With the following content for the adaptive card:

Adaptive Card content

{
 "type": "AdaptiveCard",
 "body": [
 {
 "type": "TextBlock",
 "size": "Medium",
 "weight": "Bolder",
 "text": "Missed Call - scheduled callback"
 },
 {
 "type": "ColumnSet",
 "columns": [
 {
 "type": "Column",
 "items": [
 {
 "type": "Image",
 "style": "Person",
 "url": "https://help.luware.com/download/attachments/31759305/NIMB?version=4&modificationDate=1605004975800&api=v2",
 "size": "Small"
 }
 ],
 "width": "auto"
 },
 {
 "type": "Column",
 "items": [
 {
 "type": "TextBlock",
 "weight": "Bolder",
 "text": "Nimbus Power Automate Flow",
 "wrap": true
 },
 {
 "type": "TextBlock",
 "spacing": "None",
 "text": "Created @{formatDateTime(utcNow(), 'g')} ",
 "isSubtle": true,
 "wrap": true
 }
 ],
 "width": "stretch"
 }
 ]
 },
 {
 "type": "TextBlock",
 "text": "Callback scheduled to @{variables('DisplayName')} (@{triggerOutputs()?['body/callerTelNumber']})",
 "wrap": true
 }
 ],
 "actions": [
 {
 "type": "Action.OpenUrl",
 "title": "View Contact in Hubspot",
 "url": "@{triggerOutputs()?['body/customContextParameters/HubSpotUrl']}"
 },
 {
 "type": "Action.OpenUrl",
 "title": "View Scheduled Callback",
 "url": "@{variables('CallbackListTabUrl')}"
 }
 ],
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.4"
}

This will render a reply to the initial message when the agent interacted with it:

 

Table of Contents