4

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?

8

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

10
  • This looks like the right answer, and we have previously investigated along these lines. However we've not actually managed to get it to work! Before we invest more time in this, can you confirm that you have migrated sites in this way? – Rob Baillie May 3 '16 at 15:04
  • Yes I have used this approach and it works .experiment with two sandboxes to confirm and be sure – Mohith Shrivastava May 3 '16 at 15:23
  • 1
    Thanks, your confirmation gives us hope that we'll get it to work. There must be something stupid that we've missed. We'll refresh from Prod and start our experiment again. If we get it working I'll "accept" your answer. Thanks – Rob Baillie May 3 '16 at 18:04
  • After a lot more testing and tearing hair, we simply can't get it to work. We either get an internal Salesforce error, or it does nothing. Several people at all levels in Salesforce have told us that migrating a site built using Community Builder is not possible with site.com, so unfortunately I can't accept your answer. – Rob Baillie May 5 '16 at 11:02
  • Are you using napili template? Is your org spring 16 ?If you have internal error code ,you can raise a case and see what's going on – Mohith Shrivastava May 5 '16 at 11:18
1

Salesforce Sites have to be manually configured in an org because of the requirements Salesforce has placed on it by ICANN to register a domain for the Site. Once it's been configured, a Site's content can then be transported from one sandbox to another or into production. That's the primary reason one cannot directly deploy a Site from one sandbox to another or directly into production. This same restriction applies to Communities for precisely the same reasons.

There are a number of Salesforce configuration settings that must be set from within an org that cannot be deployed via the metadata API. I recommend you visit Trailhead and go through the Application Lifecyle Management Module where you'll find more on Unsupported Metadata Types and tracking changes manually.

2
  • You say it can, but you've not described the mechanism you use to do it. Can you describe a mechanism that you have used to move a Community Builder built site between sandboxes? – Rob Baillie May 3 '16 at 15:07
  • It has been several years since I've built a community for production. It was right after they were introduced. What I recall us doing was using change sets to deploy to production org. That was before the current templates existed. We did not use custom pages from sites. Everything since then has been in a DE Org. – crmprogdev May 3 '16 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.