[SalesForce] Migration of Salesforce Communities configurations between environments

I am looking at a technical POC using Salesforce Community Builder to create an externally visible application on top of Salesforce. This would need us to be able to build in development environments and migrate into QA, UAT and Production orgs.

For the rest of Salesforce we extract the meta data into Bitbucket (git), and manage releases using Bamboo. We would like to do the same with the communities site.

At the moment we can't see how we can do this, or anything similar – the meta data includes a ".site" and some xml config, but importing the site into Site.com doesn't appear to work.

Has anyone tried anything similar?

How do other people migrate communities sites from development, through QA into production?

Best Answer

I have been trying to do this and one thing I have discovered is the site.com metadata is a binary package .So technically yes if you have a github repository for every release you can maintain certain metadata that are community related in your Github repo .

The main metadata components that are community specific that I extracted are as below

<?xml version="1.0" encoding="UTF-8"?>
 <Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
    <members>*</members>
    <name>ApexClass</name>
</types>
<types>
    <members>*</members>
    <name>ApexTrigger</name>
</types>
<types>
    <members>GoogleApps</members>
    <name>AuthProvider</name>
</types>
<types>
    <members>*</members>
    <name>Community</name>
</types>
<types>
    <members>*</members>
    <name>CustomApplication</name>
</types>
<types>
    <members>*</members>
    <name>CustomObject</name>
</types>
<types>
    <members>*</members>
    <name>CustomPageWebLink</name>
</types>
<types>
    <members>YourSite</members>
    <name>CustomSite</name>
</types>
<types>
    <members>*</members>
    <name>CustomTab</name>
</types>
<types>
    <members>Communities_Shared_Document_Folder</members>
    <members>SharedDocuments</members>
    <members>Topic_Shared_Document_Folder</members>
    <name>Document</name>
</types>
<types>
    <members>All/CommunityChangePasswordEmailTemplate</members>
    <members>All/CommunityForgotPasswordEmailTemplate</members>
    <members>All/CommunityWelcomeEmailTemplate</members>
    <members>All/CommunityWelcomeEmailTemplateSandbox</members>
    <name>EmailTemplate</name>
</types>
<types>
    <members>UserAlt-User Profile Layout</members>
    <name>Layout</name>
</types>
<types>
    <members>YourCommunity</members>
    <name>Network</name>
</types>
<types>
<members>field1</members>
    <name>CustomField</name>
</types>
<types>
    <members>Admin</members>
    <name>Profile</name>
</types>
<types>
    <members>Yoursite</members>
    <name>SiteDotCom</name>
</types>
<types>
    <members>CKEDITOR</members>
    <members>LightningComponentStyles</members>
    <name>StaticResource</name>
</types>
<types>
    <members>communityName</members>
    <name>ManagedTopics</name>
</types>
 <types>
    <members>*</members>
    <name>AuraDefinitionBundle</name>
 </types>
<version>35.0</version>

Now everytime you run your deployment or release you will deploy all community related components mentioned in the above package.xml and also there is one important manual step is to export your site.com site and import to the PROD site.com

Note that the exported file is same as file found in the siteDotComSites Folder for that community .You can directly import and overwrite that to get latest of your sandbox

enter image description here

The export is nothing but .site file in your project repo .So from your version control you can directly import this to your PROD .

Import the .site file into the template using site.com studio that comes with communities

enter image description here