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 on the phone with the customer.

PRECONDITIONS

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

Overview

Click here to expand...

 
 

Preparation in Nimbus

✅ We need to create some variables in Nimbus first.

  1. In Nimbus, we need to go to Configuration > Parameters and create the following Custom Parameters to store the salesforce task ID and URLs to:
    • SFTaskID
    • SalesForceAccountViewUrl
    • SalesForceTaskDetailViewUrl
  2. In Nimbus, ceate a Conversation Context with the URL to a Task in Salesforce: Nimbus > Configuration > Conversation Context
  3. Make this Conversation Context available in the service: Nimbus > My Services > Settings >(Select Service) > Context

Create the flow (when a call comes in then populate the caller data from the Salesforce contacts)

✅ 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 on 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 an "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

✅ Assuming that a contact with account has been found in Salesforce.

  1. Add a Salesforce Create record element. This will automatically add a "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 want.

Update the Nimbus task

✅ Assuming that your previous data retrieval was successful it's now time to let Nimbus know about it so 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:

Now when it rings in Nimbus the contact information is 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, you 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