Use Case - Looking Up Caller Information and Creating a Task in Salesforce

Look up information about a caller in Salesforce and open a new task for the agent for note taking.

In this use case, we want to cover the following scenario:

  1. When a call comes in, then populate the caller data from the Salesforce contacts.
  2. When an agent takes the call, then log a new call task in Salesforce, open the new Task view automatically so that the agent can easily take notes to it while in the call with the customer.


✅ Salesforce Premium Power Automate Connector needed

  • Add a connection in Power Automate: Data > Connections > New Connection > choose Salesforce
  • Add URL, select API Version, and test connection
    🔍 Either use a Sandbox account for testing purposes or create a new Account in Salesforce and add some contacts for testing purposes. You can delete the account permanently after testing your solution.


Click here to expand...


Preparation in Nimbus

You need to create some variables in Nimbus first. For that, follow the steps:

  1. In Nimbus Portal, go to Configuration > Parameters and create the following Custom Parameters to store the Salesforce task ID and URLs to:
    • SFTaskID
    • SalesForceAccountViewUrl
    • SalesForceTaskDetailViewUrl
  2. Go to Configuration > Conversation Context and create a Conversation Context with the URL to a Task in Salesforce.
  3. Make the newly created Conversation Context available in the service in My Services > Settings > (Selected Service) > Context

Creating the flow

As a next step, create a flow that populates the caller data from the Salesforce contacts when a call comes in.

Start the workflow

✅ Ensure that your service's workflow has a "Accept ConversationWorkflow Activity which starts the "GetOnNewTasksTrigger Event.

  1. Start your flow with the a "GetOnNewTasks" Nimbus activity.

Get contacts then get accounts

✅ We want to search for the caller in the Salesforce contacts and the linked accounts. 

  1. Add a Salesforce Get records element.
    1. Salesforce Object Type: Contacts.
    2. Filter Query (String) - in our example, we want to filter the MobilePhone and Phone column in Salesforce. The phone number is stored in Nimbus as “MicrosoftCallerID”.
    3. Top Count: 1 - we only want to get the first results. We expect this to always return a list with only one item.
  2. Add another Get records element. This action will immediately add "Apply to each element" because the output value of the last element is a collection.
    • Filter Query (String) - (Id equals 'AccountID').
    • Top Count = 1 we only want to get the first results. We expect this to always return a list with only one item.

Create a task in Salesforce

We assume that a contact with account has been found in Salesforce.

  1. Add a Salesforce Create record element. This will automatically add "Apply to each element". Set fields as follows:
    • SalesForce Object Type = Task
    • Name ID = ContactID (items('Apply_to_each')?['Id'])
    • Call Type = Inbound
    • Task Subtype = Call

Set other additional fields as you would like to.

Update the Nimbus task

✅ We assume that your previous data retrieval was successful - it's time to let Nimbus know about it so that the caller info is also shown in the UI and the Task URL will be set in Nimbus.

  1. Add an Nimbus "UpdateTask" action to the end of your flow.
  2. Map the variables (e.g. DisplayName) to the corresponding Nimbus parameters.
  3. Map the Custom Context Parameters:

When it rings in Nimbus, the contact information is now populated from Salesforce. When an agent takes the call, the Task URL is opened in a new tab and the agent can take notes to the call.

Delete the Nimbus Task if caller has not been handled

Optionally, if the call has not been handled by an agent, you can delete the task in Salesforce. Here is the simple flow overview:

Table of Contents