Posted by: eliz_beth | August 15, 2014

Moving posts and comments in Chatter

I’ve had a couple of experiences where I needed to populate a group with information from a prior system into a new Salesforce org.  It’s not the most difficult thing to do but you do need to pay attention to details to do it right.  Recently I was presented with a question on how to move everything from one chatter group to another after the security was changed to allow customers in the group (which should not be open to customers).

So here are my steps for doing this if you ever come up against it in the wild-

1-      Get Group ID from Salesforce for old group and note it for later.

2-      Create new Group with correct permissions. Note ID.

3-      Open Dataloader. Click on “show all objects”

4-      Choose FeedItem

5-      Run export pulling all available fields and filter on the Group ID you want to export. This will pull all the original posts but not the comments.

6-      Take results from export, Replace the old Group ID with the new Group ID.

7-      Upload the new file. Be sure to save the success file. (If you run into problems, consolidate all success files when completed into one success file)  This file should be the original posts, with their create dates,

8-      Now you’re going to do comments. In Dataloader, choose FeedComments.

9-      Perform an export, selecting all the available fields and filtered by the Group ID.

10-   Open this sheet in excel. Open the success file from the prior step. You’ll need to do a vlookup to match the old post item ID with the new post ID. Once they are matched up, you can then upload them to the associated posts in the new group.

Note, vlookups can be tricky. If you’re not experienced with it or with excel much, I recommend only working on a few posts at a time until you’re comfortable with the process.

So, if the time comes and something similar happens in your org, or perhaps you’re bringing on another org and want to keep their group history, hopefully this will help you.  If you are dealing with files, it just adds another layer of complexity, but the same basic ideas apply.

Edited to add:

As Rhonda points out in the comments, you want to use the Dataloader for your extracts as it will give you the 18 character casesafe ID that is compatible with vlookup in excel. Vlookup is case insensitive and will assume 123abc is the same as 123ABC.  There’s ways to get the 18 character ID, but trust me, stick to dataloader for this task completely.

Advertisements

Responses

  1. Nice post, Elizabeth! As I’m sure you know, Salesforce has both 15 and 18 character version of record IDs. Dataloader uses the 18 character versions, but reports use the 15 character versions. The 15 character version do not work correctly with Microsoft Excel vlookup. More info here: http://help.salesforce.com/apex/HTViewSolution?id=000005635&language=en_US

    It is important that readers follow your instructions precisely and don’t decide to take a shortcut and get the records from a report instead of using Dataloader.

    • You’re absolutely right Rhonda, which is why I use Dataloader- it also gives you the access to the items you need without having to do any changes or conversions. Plus the success (and error) files are crucial so you can match things up correctly.
      One of my best tips is to create a Casesafeid(id) field on every object as well, so if you do run reports, it makes it much easier to work with the data.

      One other catch I had was the first time I did this I was moving from another application to Salesforce. I had to add extra steps as I had to break down the posts from the old system (we were still at max 1000 characters for chatter posts) and amend them via comment. It was a lot of work, I just hope someone has used the information since then!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: