3

I am very familiar with Salesforce 2 Salesforce (S2S) and it works well for sharing data going forward between production-production orgs or sandbox-sandbox orgs, either automatically or manually. In fact, I understand that it also even works with production - developer orgs too, as per: How to connect Salesforce to Salesforce in Apex.

However, there are other methods of integrating Salesforce orgs with each other, as per: Integrate two Salesforce developer orgs. The most common alternative to using S2S seems to be leveraging the REST API. This link goes into some helpful detail on that: How can i integrate one SFDC org to another SFDC using Rest Api. Also, http://amulhai.blogspot.co.uk/2015/11/salesforce-to-salesforce-integration.html.

I understand that S2S is out of the box and is the default answer when choosing to integrate two Salesforce orgs with each other. But I'm curious to know what one can do with the REST API, or another option, that one couldn't with S2S.

My question is: what are the pros and cons of using S2S over the REST API, Named Credentials or External Objects alternative methods?

1

1 Answer 1

4

There are no benefits to any alternatives to S2S, because S2S was purpose-built for the task, and was actually designed and included because there were other solutions out there that were not as efficient as having a native solution.

Benefits to S2S include more real-time integration than other solutions, no-code-necessary configuration and setup, built in GUI and programmatic access to the feature, doesn't consume (some) limits, like daily asynchronous limit or email limits, has automatic retry and error handling, development time required for alternative solutions versus S2S, the list goes on and on. There is no other solution that can compare.

You may as well be asking which is more efficient for driving around town: getting a car for free that you can use to drive around town, or buying and building all the parts your own car from the frame up. Sure, you can build that car if you want to, but why would you when someone just gave you a car to use? There's some people that enjoy a challenge and want to do everything themselves, and that's okay--they can use REST, external objects, etc. For the admin who simply wants to run their business, use S2S. It's the correct tool for the job.

Edit: S2S does count against daily API usage, this was a misunderstanding of the feature. However, it is still far better than any hand-written solution one can come up with manually, as it still involves no code, and is a quick solution that can be implemented in minutes to hours instead of days to weeks for complicated situations. As also noted in a comment, not all objects are supported, so there are still times when you might need a personalized solution, but S2S should generally be considered first before any other option.

4
  • yet again, another brilliant answer. Many thanks!! 1) If an organisation has a particularly complicated requirement to connect 3..* Salesforce organisations together, what would you recommend in that use case? I suppose S2S could be used between A and B, and B and C. In this way, S2S can handle actually n..* of integrations and not just 2..2? 2) I'm also interested if there's a limit as to how many S2S integrations an org can actually have? I couldn't find this information in the docs. Lastly...3) if an org A is on EU1 and org B is on EU2, which server does the processing? Thanks :) Nov 22, 2016 at 20:36
  • 1
    @AndyHitchings (1) As far as I know, there's no limit on connections. I'd probably recommend a star topology; A should connect to B, C, D, E... so all data goes through the central point. (2) I've never run into a limit or found a documented limit. It's meant to be used as often as you need. (3) Both servers do the processing; EU1 sends it to EU2, and once approved, DML processing occurs on EU2. I'd imagine there's some staging servers inbetween that manage those data migrations, but it's not documented.
    – sfdcfox
    Nov 22, 2016 at 20:45
  • 2
    @sfdcfox - It looks like s2s uses api limits. pls see help.salesforce.com/…. Can you please clarify.
    – ManishG
    Oct 22, 2018 at 11:08

Not the answer you're looking for? Browse other questions tagged .