I have a customer with a salesforce to salesforce connection for Leads (only currently) to their partner and they would now like to include Chatter posts across the two organisations. This sounds like a great (interesting) requirement and before I investigate further I would like to know if anyone else has done this?

I believe it might be possible by utilising the PartnerNetworkRecordConnection object to find the corresponding partner organisation record that the post needs to be 'duplicated' on. Posting replies to the original comment may be a little problematic.

Any one else come across this requirement?

4 Answers 4


Based on the API, and confirmed by this comment from Salesforce Product Manager John Kucera, Chatter records can't be shared per se via S2S (yet).

That said, if I had this requirement I would probably create a Detail object under Lead that acts as a proxy for the LeadFeed. You write a trigger on FeedItem that, when the chatter post meets your criteria (e.g. is on a shared Lead, maybe has certain keywords or excluding certain users), you create a corresponding Shared_Feed_Item__c (or whatever you called it) record that duplicates the post, and sends it to the S2S connection.

Then on the other side, an insert trigger on Shared_Feed_Item__c does the reverse: it creates a Chatter post when new Shared_Feed_Item__c records come down the wire.

Note this is theoretical, but I've done similar things with S2S so the theory should be sound.

The auto-sharing will look a lot like the code here or here, if it's not in place already. Hope that helps.

Also, FYI, if you ever run into a real S2S stumper of a technical issue, I've had impressively quick responses in the past by emailing s2s at salesforce dot com, it seems to still be monitored by the PM's.

  • Great idea to use a related custom object, I was thinking I would need to create Web services on each organisation. I will have a look at the links and provide some further feedback of my results over next few weeks. Jason Commented Sep 23, 2012 at 10:47
  • Using S2S to share is going to be your best bet, I think. You'll need to figure out how/if to credit the original author in the "shadow" posts but other than that it should be pretty straightforward.
    – jkraybill
    Commented Sep 24, 2012 at 2:06

Chatter PM mentioned above here.

If you have budget, these guys recently built a Chatter migrator: http://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wK2yEAE

All approaches have various tradeoffs, and I think the biggest things to think about: 1) How many posts & comments do you get / day? API calls are higher for real time sync vs. a delayed batching salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm

2) How to keep track of the FeedItemId & FeedCommentId in the other org so that when new comments & likes come in, you parent them to the right post

If you want to do real time, a custom object is probably needed to store the mapping of the FeedItem & FeedComment ID's for both orgs. If you ignore likes & files on comments, you can ignore feedComment Ids and save some storage at 2Kb / record (neither are API accessible right now anyhow, but will be in the near future).

To save on API calls, you could batch and only wake up every hour or day with a scheduled job. This app has code to migrate lots of posts & comments at once and could be a good place to borrow some code. You could figure out new posts & comments to migrate by createdDate http://appexchange.salesforce.com/listingDetail?listingId=a0N30000003Jj1aEAC

  • Thanks for the heads up on this one John (I'll be on the phone to passport this afternoon) and may therefore change my best answer following the call but it certainly looks like it does everything the customer needs plus some. Commented Oct 15, 2012 at 1:31
  • Just got off the phone to MakePositive and they have 2 models (public and limited) the public one is out of the question as the organisations are partners of each other and not subsidiary/departments or associated companies although for those organisations I can see the benefit and know of another company that it might help. I need to understand the limited model a little more but initial views is that is relies on a private chatter group. Commented Oct 15, 2012 at 10:38

As S2S didn't allow certain things (like callouts loops etc) and had many limitations, so I had to go ahead with a architecture with Heroku hub acting as intermediate between two salesforce organizations.

I had developed a C2C application with Heroku sitting in between. The application is a 2-part application for synchronizing "chatter” activity across multiple Salesforce instances.

The two parts consist of

  1. “Hub” a Ruby on Rails application hosted on Heroku.
  2. Salesforce managed package that includes scheduled apex jobs that gather new and updated chatter object records on salesforce, which are processed, serialized in to a JSON payload and sent to Hub for further processing

This product is now with MakePositive (either you can contact them) or build something using above architecture.


Using sf to sf sounds like you're like me, where avoiding code and integrations is part of the fun. This is quick and dirty.

I have a custom email service running that receives emails and posts stuff, including the attachments, to chatter. We use it for stuff Ike Google analytics reports or survey gizmo reports that I want to share with the team.

I'm thinking it might be easy to have emails running between the orgs (post generates an email to other org, which generates a post).

It can get your links and files, unlike some of the above.

You must log in to answer this question.

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