Saturday, September 23, 2023
HomeUncategorizedIntegration of Two Salesforce Org Utilizing REST API - The Full Information

Integration of Two Salesforce Org Utilizing REST API – The Full Information


What’s Integration in Salesforce?

Salesforce integration is the method of incorporating the knowledge and performance of Salesforce with one other operation to offer druggies a single unified expertise. It permits you to give your platoon a really perfect mix of options pertaining to each platforms. 

The integration connects two or extra techniques collectively in order that if one system requires something it will possibly callout or request to a different system and in return different system offers a response to the request. 

Integration is broadly utilized in Salesforce like Org to PayPal integration. 

How Can We Callout from One System to One other?

We will do that through the use of two strategies:

  2. SOAP

On this weblog, we’re going to present the combination of two-Salesforce org utilizing REST API.

We’re going to combine Salesforce Org A with Salesforce Org B. To realize this, we’ve to comply with some steps. These steps are as follows:

Step 1: Create two separate Developer orgs Org A and Org B.

Step 2: We’ve to create a “Related App” in Org B.

Step 3: We’ve to create an “Auth. Supplier” in Org A.

Step 4: Final step is we’ve to create “Title Credential” in Org A.

dont miss out iconRemember to take a look at: Unboxing Salesforce Knowledge Rest APIs

Creation of Related App in Org B

Related apps are a framework that permits the exterior app to combine with Salesforce by way of APIs. Due to this fact, we arrange a related app in Org B.

Please comply with the configuration beneath to arrange your Related App:

Navigate to Setup >> App Supervisor >> New Related App


  1. Right here in Contact E mail all the time enter your individual E mail Id in order that in case of any error or success you’ll be able to obtain an e mail alert.
  2. Word down your Shopper Key and Secret it will likely be utilized in Auth. Supplier Step.
  3. Right here, Callback URL Worth can be taken from Auth. Supplier

Creation of Auth. Supplier in Org A

Earlier than creating Named Credentials, we have to arrange an Auth. Supplier in org A. Follows the next steps for creating an Auth. Supplier.

  • Navigate to Setup -> Auth. Suppliers.
  • Click on on the brand new Button.
  • Choose “Salesforce” because the Supplier Kind
  • Present a Title for Auth. Supplier.
  • Present “Shopper Key” and “Shopper Secret” from the earlier step.
  • In “Default Scope”, enter the worth as “refresh_token full”.

Then Save.

Creation of Title Credential in Org A

Now we’ve all of the issues to arrange Named credentials in New Salesforce org. Use the next steps to create Named credentials.

    • Navigate to Setup -> Named Credentials.
    • Click on on the brand new Button.
    • Present a label.
    • In URL, Present the Salesforce occasion URL of New Salesforce org (Or your org url)
    • Choose “Named Principal” in Identification Kind.
    • Choose “OAuth 2.0” within the Authentication Protocol.
    • Choose the Auth. The supplier we’ve created within the earlier step in Authentication Supplier.
    • Test the “Permit Merge Fields in HTTP Physique” checkbox. (That is vital so as to add the request physique to the API callout)

dont miss out iconTry a tremendous Salesforce video tutorial right here: Salesforce Rest API | Http Methods | Salesforce Integration

Lastly, Save.

Word: In URL Discipline Point out your Org B Area which is able to work as your Endpoint.

Apex Code to Join with Org B Utilizing Title Credentials:

Http http = new Http ();
HttpRequest request = new HttpRequest();
request.setHeader('Content material-Kind', 'utility/json;charset=UTF-8');
HttpResponse response = http.ship(request);


Source link



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments