Use Case - Looking Up a Caller to Open Dynamics 365 Contact Context

Look up information about a caller in Microsoft Dynamics and show it in Nimbus.

In this use case, we want to look up information about a caller in Microsoft Dynamics and show it in Nimbus. When a call is accepted by an agent, we want Nimbus to open up the contact view of the caller in Microsoft Dynamics in a new tab.

PRECONDITIONS

  • Power Automate Premium subscription for the "Microsoft Dataverse" connector element.
  • A Microsoft Dynamics 365 instance. Alternatively you can follow the set-up of a demo environment as described below.
 

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.
 
 

Show a preview of the flow

 
 

Setting Up your Microsoft Dynamics 365 Demo Environment

✅ If you need to create a Microsoft Dynamics 365 Demo environment for testing purposes, please follow these steps.

  1. Start a Free Trial for Microsoft Dynamics 365| Microsoft Dynamics 365 This creates a demo environment with dummy data.
  2. Note down your personal the Dynamics URL. It should look like https://orgxxxxxxx.crm4.dynamics.com.
  3. Open a suite to work with. We have chosen "Sales Hub" for this demo.
  4. Pick a contact and edit the phone number
    💡 For later test purposes edit the phone number (here Cacilia Viera > Business Phone) to match the cell phone as shown in the example below.

Preparation in Nimbus

✅ We need to create some variables in Nimbus first.

  1. In Nimbus, we need to go to Configuration > Parameters and create a Custom Parameter to store the Contact ID of the Microsoft Dynamics contact:
  2. Still within Nimbus Configuration, go to Conversation Context and create a Context item with the URL to Microsoft Dynamics.
    1. Set the URL using the Custom Parameter we just created: "DynamicsContactId" that will hold the contact ID. This will eventually form your final URL to your Dynamics instance.
    2. In this example: https://orgcxxxx.crm4.dynamics.com/main.aspx?appid=d87604e4-bce3-ec11-bb3d-0022487fcfaa&pagetype=entityrecord&etn=contact&id=$(CustomContextParameters.DynamicsContactId)
  3. Make this Conversation Context available in your Nimbus via My Services > Service Settings > "Context" Tab

Create Your Flow

✅ Preconditions:

  • In Nimbus, ensure that your service's workflow has a "Accept ConversationWorkflow Activity which starts the "GetOnNewTasksTrigger Event for Power Automate.
  • In Power Automate, ensure you work in the correct environment. You can select it accordingly next to your Account information.
Where to switch the environment in Power Automate
Where to find the environment name in Microsoft Dynamics 365

💡 This is necessary to be able to work with the right tables when using the Microsoft Dataverse Connector. 

Now it's time to create a new flow:

  1. Within Power Automate click on Create > Automated Cloud Flow
  2. Name your flow accordingly, like “When a call comes in then populate the caller data from the Dynamics contacts”
  3. Start your flow with the a "GetOnNewTasks" Nimbus activity.

Get Microsoft Dynamics Contacts

✅ We want to search for the caller in the Microsoft Dynamics contacts.

  1. Add a Dataverse "List Rows" element with the following fields:
    • Table name - Contacts
    • Filter rows - in our example we want to filter on the MobilePhone column in Dynamics. In Nimbus the phone number parameter is stored under "MicrosoftCallerIDmobilephone eq '@{triggerOutputs()?['body/microsoftCallerId']}' 
    • Row count = 1, as we we only want to get the first results. We expect this to always return a list with only one item

Update the Nimbus Task

✅ We're assuming that your previous data retrieval step was successful. Now it's time to let Nimbus know about it so the caller info is also shown in the UI and the Dyanmics Contact Id will be set in Nimbus.

Add an Nimbus "UpdateTask" action to the end of your flow.

  1. Map the variables (e.g. DisplayName) to the corresponding Nimbus parameters.
  2. It is important to create a CustomContextParameter with name=DynamicsContactId and value=@items('Apply_to_each')?['contactid']

Test Your Flow

✅ Now you can test your flow in Power Automate with the manual trigger.

  1. Call the Nimbus service and ensure that the contact has been found as shown via a checkmark ✅ on "UpdateTask" in the picture below:
  2. Accept the call in Nimbus and ensure the dynamics link is opened in a new tab.
    💡 Please note that context only opens while running Nimbus in a browser.

Table of Contents