Store and Experience Metadata
A B2B or D2C Commerce store has both store metadata and Experience Bundle metadata. The store metadata defines the functionality, and the Experience Bundle metadata defines the store’s look and feel and navigation. When deploying metadata from a Salesforce B2B or D2C source org to a target org, deploy the store metadata before deploying the Experience Bundle metadata. The store metadata defines the structure and behavior of your B2B or D2C store.
- The experience layer often depends on the underlying store metadata. By deploying the store metadata first, you can perform tests to make sure that all the business processes and data models work as expected in the new environment and avoid errors when layering on the user interface and user experience component metadata.
The metadata files are organized in the force-app
directory of your Salesforce project and have distinct file extensions to identify them.
-
Directory structure–Metadata files are organized into folders based on their type. For example:
- force-app/main/default/objects/
for custom objects- force-app/main/default/classes/
for Apex classes- force-app/main/default/experiences/
for Experience Cloud sites -
File extensions–The metadata file extensions indicate their type. Some common extensions include:
- .object-meta.xml
for custom objects- .cls and .cls-meta.xml
for Apex classes- .site-meta.xml
for Experience Cloud sites -
Naming conventions–Metadata files often follow a naming convention that includes the name of the component and the type of metadata. For example:
Here’s a sample directory structure:
By following these conventions, you can easily identify and locate metadata files within the
force-app
directory.