Use Case - Updating a Task for a Known Contact in Salesforce

Updat task for a known contact in Salesforce.

In this use case, we want to use the Nimbus Power Automate Connector to log a new call task in Salesforce in case that a call remains unhandled (no agent available, customer hung up).

Show a preview of the flow

 
 

PRECONDITIONS

This Use Case assumes that you have already implemented Use Case - Looking Up Caller Information and Creating a Task in Salesforce or a version of it, which adds the custom parameters that this flow needs to check first.

At this point we assume you have a Salesforce account with admin privileges.

To connect Power Automate to your Salesforce instance, perform the steps below.

  1. Log into your Power Automate account and navigate to the "Connections" page
  2. Click "New connection" and search for the "Salesforce" connector
    💡Note that this connector requires a Premium Power Automate user license.
  3. Select your Login Environment and Salesforce API Version, then click the "Create" button

☝ We highly recommend testing in a "Sandbox" or creating a new account in Salesforce to test the connection. You can delete the account permanently after testing your solution.

 

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.
 
 

How-to Steps

Create the flow

  1. Sign in to Power Automate at https://make.powerautomate.com/ 
  2. Head to "My Flows"
  3. Click on "+ New Flow" and create a blank "Automated Cloud Flow"
  4. Give your new flow a speaking name, e.g., "Update Salesforce Task for Unhandled Call"
  5. In the text box underneath, search for "Luware Nimbus" and choose the "When a task changes state" trigger
  6. Click the "Create" button

Configure the trigger

✅ In our example, we want the new flow to react specifically to the Queue Left event, which will be triggered when the call was not handled by an agent.

  1. Select the "When a task changes state" trigger.
  2. In the "Services" dropdown select the Nimbus service's UPN.
    💡 You can also select multiple services.
  3. In the "Task Events" dropdown select "Queue Left".
  4. In the "Advanced parameters" dropdown enable "Modalities" and "Directions".
  5. In the "Modalities" dropdown select "Audio".
  6. In the "Directions" dropdown select "Inbound".

Check parameter

✅ If the contact had been found in Salesforce in a previous flow, then there should be a value in the "SFTaskID" parameter.
🔍 You may have chosen a different name for this parameter and need to reflect this in the below steps.

💡 We created these Parameters in Use Case - Looking Up Caller Information and Creating a Task in Salesforce 

  1. Click on and select "Add an action"
  2. Search for and select the "Filter array" action
  3. Click into the "From" field and select “Task Information Custom Context Parameters”
  4. Under "Filter Query", click into the left-side "Choose a value" field and choose "Insert Expression" and add the expression item()['Name']
  5. On the right side, enter "SFTaskID" (or whichever name you chose for your parameter) in plain text
  1. Next, click on and select "Add an action" again
  2. Search for and select the "Initialize variable" action
  3. Set the name to "SFTaskID"
  4. Set the type to "String"
  5. For the value, enter first(body('Filter_array'))?['Value'] as an expression
 
  1. Next, click on and select "Add an action" again
  1. Search for and select the "Condition" action
  2. On the left side of the condition, select the "SFTaskID" variable
  3. Set the comparison to "is not equal to"
  4. On the right side, leave the text box empty
     

 

Update the task in Salesforce

✅ If the SFTaskID is not an empty string, then we can update the Salesforce task as with a due date in two days.

  1. Under the "True" section of the previously added condition, click on and select “Add an action
  1. Search for and select the "Get future time" action
  2. Set the interval to two days
     
  1. Click on and select "Add an action"
  2. Search for and select the "Update record (V3)" action from the "Salesforce" connector
  3. Set the “Salesforce Object Type” to "Tasks"
  4. Under "Record Id", select the "SFTaskID" variable
  5. Choose all the advanced parameters that you wish to update in this record and fill in their details, e.g.,:
    1. Subject
      Call Back - Miss Incoming Call via Nimbus service @{triggerOutputs()?['body/serviceName']} at @{formatDateTime(triggerOutputs()?['body/created'],' hh:mm tt')}
    2. Due Date Only
      @{body('Get_future_time')}
    3. Description
      You've received a call via Nimbus service @{triggerOutputs()?['body/serviceName']}. The call has not been handled.
      Details:
      Number: @{triggerOutputs()?['body/callerTelNumber']}
      Ring Time: @{formatDateTime(triggerOutputs()?['body/created'],' hh:mm tt')}to @{formatDateTime(triggerOutputs()?['body/terminated'],' hh:mm tt')}

Table of Contents