A B2B 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 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 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.
Commerce Metadata Files
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:
1` - Account.object-meta.xml` for the Account object metadata23` - MyCustomClass.cls and MyCustomClass.cls-meta.xml` for an Apex class named MyCustomClass45` - MyExperience.site-meta.xml` for an Experience Cloud site named MyExperience