Boomi Salesforce OAuth2.0

By in ,
670
Boomi Salesforce OAuth2.0

Why OAuth2.0?

The first thing we need to know is why to use OAuth2.0 using HTTP Client connector to connect to salesforce when we have already a Boomi-provided Salesforce Out Of The Box (OOTB) connector. The reason behind this is due to the limitations of salesforce we cannot access the reports in Salesforce from Boomi using the standard salesforce OOTB connector since we are connecting to salesforce with password+token authentication type by using SOAP URL. But reports can be accessed only by REST URL and the only authentication supported by Salesforce REST is Oauth2.0.

Pre-requisite:

The Salesforce team must create a new OAuth2.0 Client in their system and share the details like service URL, Client Id, Client Secret, Username, Password, Token, and Grant-type with us.

Boomi configuration:

So, the next step is we need to follow the below two steps to complete the request:

  1. We need to get an access token from salesforce using an HTTP POST request by providing all those above-mentioned details like Client Id, Client secret, username, password, Token, and Grant type in the below format using the Set properties shape. Then in the response, we will get an access token that we need to store using a property.

HTTP Connection:

Boomi SF Connection

HTTP Operation:

Boomi SF Operation

Resource Path Continuation:

Boomi SF Connection - Resource Path Config

The check box in the resource path means we are passing the value through the property which we are setting up before the HTTP connector like below reference picture:

Boomi SF Connection - Properties

Values for these properties you can pass in parameters as static or through process properties which are extensible.

Then from the HTTP Response, we will get a JSON profile in which we have a field that contains an access token so we will store that value using set properties again and prepend the word Bearer to it like below:

Boomi SF Connection - Bearer Token

  1. Then we will make the actual request to the salesforce REST API URL from where we want to get the report’s data. In this request, we need to pass the access token which we stored in the above step by passing it as Authorization-Header.

HTTP Connection: Same as above.

HTTP Operation:

Boomi SF Operation 1

The Authentication header contains the bearer token which we set as a property in the above step.

Boomi SF Token

This is how you will set up and connect to salesforce Rest API.

The final structure of the process is like below reference picture:

Boomi SF OAuth2.0 - Sample Process

Cover Image by rawpixel.com on Freepik