Deploy Experience Metadata to a Target Org
Experience metadata supports the look and feel of the store, the user interface, and the user experience components. Deploying experience data can involve transferring customizations made to the store’s layout, design, and navigation and moving custom code or integrations.
To deploy the Experience metadata with Change Sets, follow the steps outlined in Migrate Your Store Configuration. Configure the source and target deployment connections, and follow the same set of steps substituting Experience Bundle, Network, and Custom Site for the component types.
The experience bundle metadata deployment process involves extracting the metadata from the source environment. Use Salesforce DX, Metadata API, change sets, or a third-party deployment tool, and then deploy to the target environment.
Before you deploy DigitalExperienceBundle, review these considerations.
- **Dependencies–**Make sure that all related metadata, such as Apex classes, Lightning components, and custom objects that the digital experience depends on, are included in your migration package.
- **Compatibility–**Check that the target org is compatible with the features and settings of the digital experience that you’re migrating.
- **Validation–**Test the migration in the target org without committing the changes so that you can address issues before the actual deployment.
- **Backup–**Before deploying to the target org, back up your current target metadata in case you need to roll back to a previous state.
- **Testing–**After deployment, thoroughly test the digital experience in the target org to confirm that all functionality works as expected.
Note: These guidelines outline a general approach to deploying Experience metadata for LWR sites. Each Salesforce Commerce instance is unique, and your process can vary. To retrieve and deploy DigitalExperienceBundle metadata, follow these guidelines.
-
Make sure the source environment is fully configured.
-
Document any manual configurations or settings that the metadata doesn’t capture.
-
Use the Salesforce Command-Line Interface (CLI) to retrieve the DigitalExperienceBundle metadata from the source environment.
a. For example:
Sf Projet retrieve start --target-org my_scratch –-metadata ExperienceBundle -dir ./<directory>
This sample command pulls the metadata into your local Salesforce DX project.
-
Commit the retrieved metadata to a version control system like DevOps or Git. This step is crucial for tracking changes and maintaining a history of your configurations.
-
Make sure that the target environment is ready for the deployment.
a. Set up dependencies that the DigitalExperienceBundle requires, such as custom objects, Apex classes, permission sets, and profiles.
-
Deploy the Metadata.
a. Use Salesforce CLI to deploy the DigitalExperienceBundle metadata to the target environment with a command. b. For example:
Sf project deploy start --metadata ExperienceBundle --target-org a-prod-org --dir ./<directory>
c. Monitor the deployment for any errors and resolve them as needed.
-
After the metadata is deployed, perform any necessary post-deployment steps such as configuring domains, updating URLs, or setting up single sign-on (SSO) if necessary.
-
Manually reapply any settings or configurations that aren’t deployed with the metadata.
Deploying a Salesforce B2B Commerce enhanced LWR store’s DigitalExperienceBundle metadata from one environment to another involves a series of steps. Here's a general process to follow.
These guidelines outline a general approach to deploying Experience metadata for enhanced LWR sites.
It’s important to have a rollback plan in case you encounter critical issues that can’t be resolved in the target environment post-deployment. Test your rollback procedures in the source org before the actual deployment to ensure that they work as expected.
-
Make sure that the source environment is fully configured.
-
Document the manual configurations or settings that the metadata doesn’t capture.
-
Use Salesforce CLI to retrieve the DigitalExperienceBundle metadata from the source environment.
a. For example, this command pulls the metadata into your local Salesforce DX project.
Sf Projet retrieve start --target-org my_scratch –-metadata DigitalExperienceBundle -dir ./<directory>
-
Commit the retrieved metadata to a version control system like DevOps or Git to track changes and maintain a history of your configurations.
-
Make sure that the target environment is ready for the deployment.
a. Set up dependencies that the DigitalExperienceBundle requires, such as custom objects, Apex classes, permission sets, and profiles.
-
Deploy the metadata to the target environment.
a. For example:
Sf project deploy start --metadata DigitalExperienceBundle --target-org a-prod-org --dir ./<directory>
Monitor the deployment for any errors and resolve them as needed.
-
Perform post-deployment steps, such as configuring domains, updating URLs, or setting up single sign-on.
-
Manually reapply settings or configurations that couldn’t be deployed with the metadata.