While I was working on my last project, one client requirement was to implement Salesforce to Salesforce integration. All the existing Accounts and Contacts in the database were being transferred from one Salesforce instance to another by enabling two Salesforce instances to communicate with one another. This post will describe how this was achieved and will cover everything you need to know about Salesforce to Salesforce integration.
What is Salesforce to Salesforce?
The concept of transferring records from one Salesforce instance to another is known as Salesforce to Salesforce. One of the main features in this concept includes having one Salesforce instance as the source and another Salesforce instance as the destination. Records can be transferred from source to destination by mapping desired objects and their respective fields in both the source and destination instances. Using Salesforce to Salesforce integration not only allows us to transfer records from source to destination instances but also allows us to edit the values of the records which were transferred. The changes made to the records in the source instance will be replicated in the records in the destination instance. Additionally, data can be transferred both to a single destination instance and across multiple destination instances that are connected to the source instance thus creating a bidirectional connection between the source and destination instances.
In order to enable Salesforce to Salesforce, navigate to Setup -> App setup -> Customize -> Salesforce to Salesforce -> Settings -> Edit -> Enable -> Save. Only users with the necessary permissions to Manage Connections are granted access to Salesforce to Salesforce. System administrators can create a new profile, for example S2S Admin and assign it to the users who manage the connection. In smaller organizations, system administrators themselves will probably be managing connections in which case we might not need to create a separate profile. Once Salesforce to Salesforce is enabled in one org, a data sharing relationship can be established with another org by sending an invitation. This invitation can be forwarded to the email address of the contact that was selected while establishing the connection. The connected user at the destination needs to click the link in order to accept the connection invitation. The invitation can be customized by modifying the from email address, display name, and email templates used for sending the invitation emails.
To begin using Salesforce to Salesforce, we need to use the Connections tab. If it is absent in the application, it can be added by clicking the (+) symbol beside the objects at below screen.
The following screen shows us that the Connections tab is selected . If not, it needs to be added from Available Tabs to Selected Tabs and then click Save.
Once the connection has been established, the next step is to publish and subscribe to objects. Both source and destination instances can publish and subscribe to each other’s objects and fields. In order to continue this functionality, let’s publish objects from the source instance. This can be done by clicking on Publish in the Connections tab, and selecting the object that you wish to publish. You can publish most of the standard objects and all custom objects. We’ve selected Account, Attachment, Case, Case Comment, Contact and Lead.
Click Edit next to each object to choose the fields that you wish to publish to the other environment.
As the following diagram indicates, we’ve chosen to publish only a handful of the fields related to an Account and Contact. Click Edit next to Account and Contact Objects to select particular fields that need to be mapped to the destination instance.
Modify each object to select the fields that you want to publish. This completes the publishing setup on the source instance.
In my next post, I’ll describe how to subscribe to these published objects, the use cases for Salesforce to Salesforce and how to overcome challenges you may have with the integration.
Anil is working as Staff Consultant at Apps Associates. He has more than 3 years of experience as a Salesforce developer. Anil is a certified Salesforce Developer with good experience in working with business users to understand their requirements and in providing appropriate solution(s). He is an expert in Sales Cloud and has handled complex requirements in his career. Anil holds a bachelors degree in Electronics and Communication and resides in Hyderabad, India. He likes to spend time with his friends and family.