Thursday, October 31, 2013

Salesforce Admin Journal: Creating Groups based on Criteria with Workbench

I have so many posts in draft that I just haven't gotten around to finishing. So, instead of waiting and stressing and feeling ridiculous about it, here's something short that I stumbled upon today.

Scenario:

I wanted to create several public groups based on some criteria (in my case, I was using email domain). I discovered that was pretty much impossible in Setup. I was only seeing an option for creating a group and then adding users manually or by role/profile.



Solution:

  1. I created my groups in Setup. I don't think you can create a group without a single member, so I added someone I knew would be included anyway based on my criteria.
  2. I exported a query of all my active users as a csv (I used LexiLoader but Workbench would work great too).

    Select Id, LastName, FirstName, Email FROM User WHERE IsActive = True 
  3. I opened my csv in Excel and sorted it by the field I wanted to use to segment my groups and added a column for Group ID.
  4. I copied the id from the url for each newly created group.
  5. I pasted the group id into my sorted csv for each user as I wanted to segment them in my groups.


  6. I did a 'save as' on my csv.
  7. I used workbench to upload the file in the GroupMembers object.




Ta da! Done! Perfect!

This process was much easier for me than trying to manually add the users to these new groups.

I haven't used Workbench that much in the past but I'm realizing that it is pretty stinkin' handy. I've been a bit frustrated with LexiLoader lately (which is the Mac version of DataLoader) and I often miss the Excel Connector (which is only for Windows OS) but even that had its flaws. 

And that's all for today... until I finish those almost done blog posts that are glaring at me.


Related Posts Plugin for WordPress, Blogger...