Deploying Experience Cloud Site using Metadata API vs Gearset

Aritri Ganguly
builure
3 min readMar 3, 2024

--

Experience cloud is a platform integrated into Salesforce that helps in creating online communities and digital experiences. An experience cloud is composed of several layers that work together, each layer contributes specific type of content and data. With this complex hierarchical structure comes the difficulty of deployment and maintenance. There is branding, permissions, contents, assets etc. that completes the entire portal and hence the deployment is not all in one kind of push. The components are interdependent and if the dependencies are not taken care of, errors pop up one after the other.

I was trying to deploy our brand-new site from sandbox to production first via Change sets. After deployment, found that the custom site pages were not deployed and since we had a lot of rich content texts and pictures, we had to manually reconfigure the unsupported items in the target org site.

The next option that came to our mind is Metadata API to deploy our site with the help of SFDX. With an existing SFDX setup, it took no time to establish a connection with sandbox and production org in VS Code. A quick setup in package.xml helped to extract the Experience Cloud Bundle for our Aura Site. CustomSite, ExperienceBundle, Network and Static Resources were the required metadata types for our package.

While the extraction was easy, deploying it into production took a bit of time. Following are some examples how we got rid of those errors.

  1. Before trying to deploy a new site, it is recommended to create the site with the same name and template (if used) and set metadata API checkbox in settings in production environment.
  2. If you have custom navigation menu and it has dependencies with site pages, deploy the navigation link using change set or create it manually before deploying the package.
  3. Include static resources in package and after successful deployment use changeset to deploy the asset files.

Looking at the complexity and dependency in deployment we started exploring Gearset as our preferred deployment tool for future CI/CD pipeline. Gearset has capabilities to efficiently support deployment of new site or updating an existing one with partial deployments.

Using Gearset’s powerful Compare and deploy tool you can very easily analyse the missing items and avoid manual errors in deployment tracker.

Once the metadata is extracted from both the organizations, Gearset gives a detailed and granular comparison outlook.

Not only that, one of my favourite features is the next step. Once you have selected all the components that you want to deploy, Gearset gives a detailed analysis of the deployment summary and suggested fixes. Gearset has option for static code analysis for your pro-code deployments as well.

Adding a quick reference to the JIRA ticket is also possible with Gearset and you can also schedule the deployment for a future release.

To conclude, Gearset as a CI/CD tool has a very convenient approach to deploy experience cloud site than using Change set or Metadata API and of course the peace of mind on deployment days. Here are some key features of Gearset and link to 30 days free trial.

--

--