Activity Forums Salesforce® Discussions How to do Salesforce to Salesforce integration using Rest API?

  • Radhakrishna

    Member
    June 13, 2017 at 4:10 am

    Hello Rajesh,

    One of the ways to Integrate two Salesforce Instances will be using oauth for session management and using REST API

    Lets Assume you have SalesforceA as Source ORG and SalesforceB as Destination ORG .Now lets assume flow of data is from SalesforceA to SalesforceB Instance

    1) For oauth 2.0 in Destination org(SalesforceB) create a Connected App .To help you configure the Connected App in Destination below screenshot should assist.Callback Url may not be of any significant as we are using User-Name Password flow model.You will obtain client secret, consumer key in this process and one should store in Source org custom object or custom setting

    2) In your source org create a Remote site settings with url as the URL of the Destination Instance

    3) Create a Integration User in the Destination org whose credentials you will use to call API from Salesforce Source ORG

    4) Use the username, password and security token(Also i would prefer setting password never expires here for integration User) and also client secret and consumer key in a custom object or custom setting (Protected) in Source org.

  • Ap Mishra

    Member
    June 13, 2017 at 8:07 pm

    Hi Friends,

    Please find the complete solution for this in the doc I created.

    This contains the complete flow to achieve the requirement, so hope this helps you.

    Salesforce to Salesforce Integration

  • Ashley

    Member
    June 13, 2017 at 8:43 pm

    @ap-mishra Thanks for the document on "Salesforce to Salesforce Integration", very helpful. As mentioned in the doc, can you plan to write the blog on forcetalks and provide a link here so it will be easier for other community members to go through the information.

  • Ap Mishra

    Member
    June 13, 2017 at 9:32 pm

    Hi Ashley,

    Please refer the blog here - Salesforce to Salesforce Integration using Rest API Callouts

    Thanks,
    Akash Mishra

    Sr. Salesforce Dev. (Dazeworks Inc.)

  • CEPTES

    Member
    January 12, 2018 at 7:39 am

    Hello Rajesh,

    Write a rest service class in one Salesforce org. Make a Call from different Salesforce org using Http/HttpRequest class.

    For more detail: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm.

Log In to reply.

Popular Salesforce Blogs