Salesforce to UiPath Integration- “Automate any type of Process with Just Point and Click”

Nishant Singh
Cloudwerx
Published in
4 min readApr 6, 2022

--

UiPath is a Robotic Process Automation tool that is used for Windows desktop automation. It is used to automate repetitive/redundant tasks and eliminates human intervention. The tool is simple to use and has a drag and drop functionality for activities.

Salesforce

In our use case, we have integrated Salesforce with UiPath at the click of a button that will send all data to the Partner Community, in which UiPath acts as a mediator between Salesforce and Partner Community.

fig.(i) Onclick of this button We send the whole Project data in Partner Community using the UiPath.

How To Send the data from Salesforce to UiPath?

Sending the data in UiPath is a two-step process. First, we need to understand that integrating the Salesforce to UiPath is Token Authentication. There are two types of authentication.

i) Basic Authentication

This is used where we need to access the APIs using the Username and Password.

ii) Bearer-token Authentication

It’s a general two-step process of authentication. Firstly, We need to access token and that access token has session time associated with it and it will expire after some time.

UiPath Configuration Process

We need to get the access token first and then we can send the data to UiPath. In our Use Case, we have created a job queue in UiPath and configured it with the Orchestrator. So, Whenever the job is added in UiPath, the orchestrator picks the job and automatically fills in the details of the Partner Community.

1. We need to hit the URL to get the access token and then that access token will be sent with the bearer to create the job in UiPath. The URL to get the access token is given in the picture below.

fig.(ii) The above URL is used to get the access token.

2. Here, we are using the POST method to get the token. Along with this we need to send the body to get the requested token.

3. In Body we are sending the refresh token, Client id, and grant type.

4. Grant Type is always the “refresh_token”.

5. For Client id we get it from the UiPath while configuring the Orchestrator.

fig.(iii) The above is the request body to get the access token.

6. The Refresh token is gotten from the UiPath When we create the Tenant for the Salesforce.

fig.(iv) Above is the creation of the tenant for the Salesforce environment.

7. All the Data we securely insert into the Custom Metadata So, whenever we need that data just we need to query and fetch it.

fig.(v) In our Use Case we have stored all UiPath details inside the custom metadata.

8. The Custom Metadata has stored all the information regarding the UiPath Configuration.

9. We have created a Quick action to publish all the data in JSON format and send the data in UiPath.

10. First we need to hit the URL to get the access token and as we get them we will hit the next URL to send the data in UiPath.

fig.(vi) Above URL and the headers are sent to UiPath to add queue items.

11. As we hit the first URL we get the access token and as we get the access token we need to select the authorization as the bearer and put the access token in it.

12. Now, We need to configure the Headers for the UiPath apart from Authorization and content-type the X-UIPATH-OrganizationUnitId and X-UIPATH-TenantName; these are the details we get from the UiPath. It basically means that in which tenant we are adding the queue item and what is the Id of that tenant?

Conclusion

Onclick of the Create/Update Project button we push all the data to UiPath, and a new queue item is created in UiPath.

As we create the Queue items in the UiPath the Orchestrator picks the queue item and the Bot will run and it will automatically fill the data in Partner Community that is received from the Salesforce objects.

UiPath Connector for Salesforce lets you initiate automation based on events and status changes. That makes it possible for robots to take on sales and service follow-up processes — eliminating manual effort and improving response speed.

UiPath enables autonomous automation: robots-managing-robots. They are capable of monitoring and handling attended & unattended robot collaboration and optimization.

--

--