UiPath Activities Guide

About the Salesforce Activities Pack

The UiPath.Salesforce.Activities pack enables you to automate Salesforce processes. It can connect to a Salesforce Org via the Salesforce Application Scope and, alongside the rest of the activities, enable you to perform actions such as file manipulation, record manipulation, report execution, and SOQL commands execution.

Once established, the connection to the Salesforce Org can be stored into a IConnectionService object and easily reused in all subsequent child Scope activities. The credentials for the connection are encrypted by use of the Microsoft .NET Data Protection API (DPAPI) and can only be accessed by the same user and on the same machine they were entered on.

Prerequisites

A Salesforce account as well as a Salesforce Connected App are both required to use the Salesforce activities. These can be acquired from your Salesforce Administrator.

Alternatively, RPA Developers can use a Salesforce Developer account for automating processes in Salesforce.

The SalesforceStatus Object

All of the activities that perform data manipulation in Salesforce return a proprietary datatype, called SalesforceStatus. This object contains details on the status of each activity's execution in interaction with Salesforce. The object is structured to contain the following properties:

  • Success - States whether the action was successful or an error was thrown.
  • ErrorCode - In case an error is thrown upon execution, returns the error code from Salesforce.
  • Message - In case an error is thrown upon execution, returns the error message from Salesforce.

The Salesforce Object Wizard

The Get Record, Insert Record, and Update Record activities can be configured by using the Salesforce Object wizard. Clicking the Configure button present in the body of the activities opens this window.

The Salesforce Object drop-down lets you select the object you want to interact with, displaying all its details. The first record in that object is also retrieved as a Sample Record. The Sample Value column shows the value of the field for that record. You can enter a new Sample Id and hit Enter to retrieve a different sample record.

Note

When a Salesforce Object is selected, the list of fields is populated with the list of fields that are marked as mandatory across all the layouts of the object in Salesforce. Due to the limitation of the available configuration details from Salesforce, there could be more fields that are mandatory, but are not added by default. Use the Test with sample values to test the activity.

By using the Add Single Field text box, you can add fields to the selected object. The Add Multiple Fields button opens a different section of the wizard, which lets you choose multiple fields to add to the object. This can be done by selecting the check marks for all of the fields you want to add and clicking Done.

Note:

In the Insert Record activity, only the fields that are identified as being allowed to be created by the Salesforce Lightning API are available. In the Update Record activity, only the fields that are identified as being allowed to be updated are available.

Clicking Done again saves the changes you made to the activity that was being configured.

The Insert Record and Update Record activities also have the option of testing the operation with sample values. This can be done by clicking the Test with sample values button. This executes the operations with the values in the Sample Value column, and reports success or errors.

Salesforce Object Fields and Data Type

In the Get Record, Insert Record, and Update Record activities, all field values are passed as String.

For fields with the Picklist data type, the string passed should be the valid value and not the label as seen in the application. Use the Format Labels And Values activity to setup the string correctly.

For fields with the Multiplicklist data type, the string passed should be a list of the valid values separated by semicolons and not the labels as seen in the application. Use the Format Labels And Values activity to setup the string correctly.

For fields with the boolean data type, the string passed should be true or false. Note that when Salesforce returns these values in the Get Record activity, the values shown in the Sample Value column can be either of the following: True, true, False, or false, depending on how data was originally entered in Salesforce.

For fields with the Date data type, the string passed should be in the format YYYY-MM-DD.


About the Salesforce Activities Pack


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.