- Overview
- Adobe Sign
- Alteryx
- Amazon Comprehend
- Amazon Connect
- Amazon Rekognition
- Amazon Textract
- Box
- Release notes
- About the Box activity package
- Fix XAML After Package Update
- Project compatibility
- Setup
- Technical references
- Box Scope
- Commit Session
- Create File Version Session
- Create Upload Session
- Upload Part
- Delete Old Version
- Get Versions
- Promote Version
- Upload File Version
- Copy File
- Delete File
- Download File
- Get File Comments
- Get File Info
- Get File Info Details
- Get File Lock Info
- Lock File
- Move File
- Unlock File
- Upload File
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder Info
- Get Folder Items
- Rename Folder
- Search For Content
- Execute Method
- Cognitive
- DocuSign
- Release notes
- About the DocuSign activity package
- Project compatibility
- Setup
- DocuSign Scope
- Invoke DocuSign Operation
- Create Envelope
- Create Envelope And Send
- Create Envelope From Template
- Create Envelope Recipients
- Get Document
- Get Documents
- Get Envelope
- Get Form Data
- Send Envelope
- Update Envelope
- List Attachments
- List Custom Fields
- List Documents
- List Envelope Status Changes
- List Recipients
- Create Bulk Send List
- Create Bulk Send Request
- Get Bulk Send List
- Get Bulk Send Lists
- Create Template Custom Fields
- Create Template Recipients
- Get Template
- List Templates
- Google Vision
- Jira
- Release notes
- About the Jira activity package
- Project compatibility
- Setup
- Jira Scope
- Execute Method
- Add Attachment
- Delete Attachment
- Download Attachment
- Get Attachments
- Add Comment
- Delete Comment
- Get Comments
- Create Component
- Delete Component
- Get Components
- Search Dashboards
- Create Filter
- Get Filters
- Create Issue Link
- Delete Issue Link
- Get Issue Link Types
- Get Issue Links
- Add Watcher
- Assign Issue
- Clone Issue
- Create Issue
- Delete Issue
- Get Issue
- Get Watchers
- Remove Watcher
- Search Issues Using JQL
- Transition Issue
- Update Issue
- Create Project
- Delete Project
- Get Project Types
- Get Projects
- Update Project
- Get Transitions
- Create User
- Delete User
- Find Users
- Marketo
- Microsoft Dynamics
- Microsoft Dynamics Finance and Operations
- Microsoft Translator
- Microsoft Vision
- Oracle Integration Cloud
- Oracle NetSuite
- Salesforce
- Release notes
- About the Salesforce activity package
- Project compatibility
- Setup
- Quickstart
- Salesforce Application Scope
- Create Bulk API Job
- Get Bulk API Job
- Get Bulk API Job Results
- Start or Abort Bulk API Job
- Assign File
- Download File
- Upload File
- Composite Request
- Delete Record
- Get List View Records
- Get Record
- Insert Record
- Update Record
- Upsert Record
- Execute Report
- Execute SOQL
- Format Column Names
- Format Labels And Values
- Lightning REST API Request
- Search
- SAP BAPI
- ServiceNow
- Slack
- Smartsheet
- Release notes
- About the Smartsheet activity package
- Project compatibility
- Setup
- Technical references
- Quickstart: Working With Rows
- Smartsheet Application Scope
- Attach File
- Attach URL
- Delete Attachment
- Get Attachment
- List Attachments
- Add Comment
- Delete Comment
- Get Comment
- List Discussions
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder
- List Folders
- Add Group Members
- Get Group
- List Groups
- Remove Group Member
- Get Report
- List Reports
- Add Rows
- Copy Rows
- Create Discussion on Row
- Delete Rows
- Get Row
- List Rows
- Move Rows
- Update Rows
- Copy Sheet
- Create Sheet
- Create Sheet From Template
- Download Sheet
- Get Sheet
- List Sheets
- Update Sheet
- Add User
- Get User
- List Users
- Remove User
- Copy Workspace
- Create Workspace
- List Workspaces
- Import Sheet From CSV / XLSX
- Invoke Smartsheet Operation
- Search Activity
- Send Via Email
- Share Object
- SuccessFactors
- Tableau
- Twilio
- Workato
- Workday
Quickstart
The purpose of this guide is to help you create a working sample to quickly verify the connection to your Salesforce Org and get familiar with the included activities input/output datatypes.
After completing the steps in this guide, you'll have an automation sequence that does the following:
- Creates
SecureString
variables for your Salesforce credentials and Invoke Method. - Establishes a connection to your Salesforce Org using your
SecureString
credentials (Salesforce Application Scope) - Creates a new Salesforce account record (Insert Record).
- Uploads a file to your Salesforce Org (Upload File).
- Assigns the uploaded file to your new Salesforce account record (Assign File).
- Verifies the results of the Insert Record, Upload File, and Assign File activities by outputting each of their SalesforceStatus objects ().
Before you begin:
- Complete the Salesforce Setup steps.
-
Create a new automation project.
- Open UiPath Studio.
- Under New Project, click Process (this opens a New Blank Process window).
- Enter a project Name, Location, and Description.
-
Click Create.
-
Install the UiPath.Salesforce.Activities package.
- In the Design ribbon, click Manage Packages (this opens the Manage Packages window).
- Under All Packages, click Official.
- In the Search bar, enter Salesforce.
-
Click, install and accept the license for the UiPath.Salesforce.Activities.
-
For more information about Uipath Studio packages, see Managing Packages in the Studio Guide.
-
Build your project
SecureString
datatypes for the Consumer Secret, Password, and SecurityToken input properties. To get these SecureString
datatypes, you convert the String
values you stored for these properties when completing the Get your credentials steps in the Setup guide.
String
to a SecureString
. For simplicity and to help you quickly create working sample, the conversion is done within your project sequence and requires
you to enter your credential values as variables. This is not recommended when creating shareable or non-example projects.
When creating shareable or non-example projects, you can create and reference external workflows that get your Consumer Secret, Password, and SecurityToken from a local source (e.g., .txt, .xlsx files) and perform the conversion using <in> and <out> arguments.
Convert Strings to SecureStrings
-
Create the following three variables:
String
with your Salesforce login password as the Default value (e.g., Name: textPassword, Default: "UiPath123")SecureString
with New SecureString() as the Default value (e.g., Name: securePassword, Default:New SecureString())-
SecureString
(e.g., Name: password)- For all
SecureString
variables, select the System.Security.SecurityString type.
- For all
- Add a new statement to the process.
- Recommendation: change the Display Name to "Create SecureString - Password" or something to make it easy to identify its purpose.
-
Add a activity inside the Sequence.
- In the TypeArgument property, select System.Char.
- In the Values property, enter the
String
variable (e.g., textPassword).
-
In the For Each activity, add the InvokeMethod activity (Programming > Execute > InvokeMethod).
-
In the TargetObject property, enter your first
SecureString
variable (e.g., securePassword)- Make sure the the TargetType property is (null) (either the TargetObject or TargetType is allowed, not both).
-
In the MethodName property, enter AppendChar.
- The AppendChar method is used to add a UTF-16 code unit after the string.
- In the Parameters property, add a new parameter using the following values: Direction: In, Type: System.Char, Value: item.
-
-
Add the activity after the InvokeMethod activity.
- In the To property, enter your second
SecureString
variable (e.g., password). -
In the Value property, enter your first
SecureString
variable (e.g., _securePassword).
- In the To property, enter your second
-
Create the following three variables:
String
with your Consumer Secret as the Default value (e.g., Name: textPassword, Default: "4FA94...")SecureString
with New SecureString() as the Default value (e.g., Name: secureConsumerSeret, Default:New SecureString())-
SecureString
(e.g., Name: consumerSecret)- For all
SecureString
variables, select the System.Security.SecurityString type.
- For all
- Repeat steps 2-5 to convert your Consumer Secret
String
to aSecureString
.
-
Create the following, 3 variables:
String
with your Security Token as the Default value (e.g., Name: textPassword, Default: ""MUc2B...")SecureString
with New SecureString() as the Default value (e.g., Name: secureSecurityToken, Default:New SecureString())-
SecureString
(e.g., Name: securityToken)- For all
SecureString
variables, select the System.Security.SecurityString type.
- For all
- Repeat steps 2-5 to convert your Security Token
String
to aSecureString
.
You should now have three Create Secure String sequences in your process, similar to the image below.
SecureString
variables, you can add the Salesforce Application Scope activity along with the other Salesforce activities.
Add the Salesforce activities
-
Add the Salesforce Application Scope activity to your project.
-
Before you enter your property values, let's test your connection.
- Click the Configure button (this opens the connection wizard).
- Select your Server (if connecting to, a developer org or non-developer production org- select "Live", a sandbox/test org - select "Test").
- Enter your Consumer Key, Consumer Secret, Username, Password, and Security Token (required for developer logins).
-
Click the Test Connection button and wait for the Connection Successful window.
-
If you receive an error, make sure that you selected the correct Server. Next, try resetting your Security Token by following the last step in the Get your credentials in the Setup guide and enter the new value that's emailed to you.
-
- After a successful connection, you can now add your property values, including the
SecureString
variables you created in the steps above (the values entered in the connection wizard are independent of the property values and not shared).
- Enter your ConsumerKey value (
String
) that you copied when completing the Get your credentials steps. - In the ConsumerSecret property, enter the second
SecureString
variable you created in step 6 above (e.g., consumerSecret). - In the Password property, enter the second
SecureString
variable you created in step 1 above (e.g., password). - Enter your Server value ("Live" or "Test").
- Enter your Salesforce login Username (e.g., "name@company.com")
-
For the SalesforceConnection property, create and enter a
IConnectionService
variable (e.g., salesforceConnection).-
You will not use this variable when completing the steps in this guide, but it's good practice to create your output variables for use in subsequent activities.
-
- Add the Insert Record activity in the Salesforce Application Scope activity.
- Create a new
String
variable for this activity's output property (e.g., newAccountID). -
Click the Configure button (this opens the Salesforce Object Wizard).
- To learn more about how the wizard works, see the Salesforce Object Wizard section in the About the Salesforce Activities page.
- In the Salesforce Object drop-down list, select Account (the Account ID and Name fields should appear).
- In the Add Single Field text box, enter Type and click Enter (you should now have 3 fields).
- In the Account ID field, enter the
String
variable you created in step 1 (e.g., newAcountID). - Enter a Name for the Account (e.g., "Salesforce Quickstart").
-
Enter a valid Type
String
(e.g., "Prospect").-
All fields with a
picklist
Data Type require aString
value that matches an item in the list as shown in the Salesforce user interface.-
Using the Type field as an example, by default the picklist includes the values shown in image below (from the Salesforce Account screen). You can use the Format Labels And Values activity to preview the valid
String
values (see example below).
-
-
Click Done.
-
-
In the SalesforceOutput property, create and enter a
SalesforceStatus
variable (e.g., insertRecordStatus).
-
-
Add the Upload File activity after the Insert Record activity.
- Enter your file Description, FilePath, and Title.
- In the OutputID property, create and enter a new
String
variable (e.g., newFileID). -
In the SalesforceStatus property, create and enter a new
SalesforceStatus
variable (e.g., uploadFileStatus).
-
Add the Assign File activity after the Get Record activity.
- In the Id property, enter the
String
variable you created for the Upload File activity (e.g., newFileID). - In the RecordId property, enter the
String
variable you created for the Insert Activity activity (e.g., newAccountID). - Enter a ShareType value (e.g., "I" for Inferred).
- Enter a Visibility value (e.g., "AllUsers").
-
In the SalesforceStatus property, create and enter a new
SalesforceStatus
variable (e.g., assignFileStatus).
- In the Id property, enter the
Test your project
-
To verify that your record was inserted, file uploaded and assigned to the inserted record, add 3 activities after the Assign File activity.
-
In the first Write Line activity, enter the following Text: "Insert Record Success: "+insertRecordStatus.Success.ToString.
- insertRecordStatus is the
SalesforceStatus
variable you created for the Insert Record activity.
- insertRecordStatus is the
-
In the second Write Line activity, enter the following Text: "Upload File Success: "+uploadFileSuccess.Success.ToString.
- uploadFileStatus is the
SalesforceStatus
variable you created for the Upload File activity.
- uploadFileStatus is the
-
In the third Write Line activity, enter the following Text: "Upload File Success: "+assignFileSuccess.Success.ToString.
- assignFileStatus is the
SalesforceStatus
variable you created for the Assign File activity.
- assignFileStatus is the
-
Click Start and verify the results in the output window.
-
-
To further verify your results, login to your Salesforce Org and go to your Accounts and Files to see your new additions.
You're done! You now have an automation project that includes Salesforce activities. To learn more about the Salesforce activities, see Activities for links to the activity detail pages.
To further your Salesforce automation, see the UiPath Connector for Salesforce documentation. The UiPath Connector for Salesforce creates a “server – server” connection between Salesforce and UiPath Orchestrator (on-prem or Cloud instances). It gives you the ability to submit UiPath Jobs or add Queue items from Salesforce via Flow Builder, Process Builder, or Workflow.