In this post we are Integrating one Salesforce Org (Org A) to another Salesforce Org (Org B), in which If a record is created in Org A it will automatically create in Org B. Before writing code you need to do some settings as mentioned below:

Org A (Source Org)

  • You need to set the endpoint URL of Target Org in the Remote Site setting (setup >> Remote Site Setting).
  • Then you will write the a) Future callout class. b) Trigger which call Future Class on Insertion
Org B (Target Org)
  • Create a connected app (please refer image below) and obtain clientId, clientSecret, username, password (a combination of password and security token) from Org B (Target Org).
  • Write Webservice class that consumes JSON and does the operation in target org.

Source Org (Org A)

Target Org (Org B)