B2C Metadata lists the site archive XML files of your project in one tool window: metadata, catalogs, price books, libraries, preferences, jobs, services, slots and the other import files. Each file sits under the organization or the site it belongs to, with its size and its archive, and opens into what it defines: services, jobs, preferences, and in metadata each type with its custom attributes, groups and system attributes
Open the tool window
Click B2C Metadata on the right tool window bar, after B2C Entry Points. You can also open it from:
- Navigate › B2C Metadata
- Tools › Salesforce B2C Commerce › B2C Metadata
- The Show in B2C Metadata link in the summary of the Metadata Editor
The menu items show up once a cartridge is linked and focus the search field. The window looks for files while it opens, so it first reads Looking for site archive XML...
The header
The search and the scope beside it fill the row over the tree. The buttons sit on the tool window's title bar, and Refresh in its ⋮ menu
| Control | What it does |
|---|---|
| Search | Search metadata, catalogs, preferences, jobs, services filters the tree |
| Scope | All, Organization, All Sites, or one site under Sites. The project keeps your choice |
| Show Metadata Usage | The first icon on the title bar. Opens Metadata Usage: which cartridges, files and sites use each type and attribute. To start from one row, right-click it and choose Show in Metadata Usage |
| Group by Type | Lists the kinds of files first, each with its sites |
| Unused in code | Keeps only the entries that no script or template names, see Unused in code |
| Select Opened File | Selects the file of the editor you are in |
| Expand All, Collapse All | The tree's branches |
| Refresh | In the ⋮ menu. Looks for site archive XML again |
The footer counts what you see: 9 files in 2 archives, 2 of 9 files while a scope narrows the tree, or 2 matches while you search
Organization and sites
Organization holds the data at the top of the site archives: metadata, catalogs, price books, shared libraries, jobs, services and global preferences. Sites holds each site's data: preferences, content slots, promotions and customer groups. Each file row shows its name, its size and its archive in grey. The size is coloured from green for the project's smallest files to red for its largest. Hover a group or a file for what it holds
The plugin decides the owner from the file, so exports that don't follow the archive layout still land in the right place:
| File | Belongs to |
|---|---|
Anything under sites/<site>/ | That site |
A site file in an export folder named for a site, such as AcmeUS/preferences.xml or us/jobs.xml | That site |
| A custom object | The storage-scope of its type in your metadata, site or organization |
A library under libraries/<id> or with a library-id | The organization, as a shared library |
| Preferences outside a site folder | Site or organization, from the preference IDs it sets |
| A site file in no folder that names a site | Sites, marked no site folder |
Group by Type
Group by Type lists the kinds instead, such as Metadata, Custom Objects or Preferences, each with its sites and then its organization files. The setting is shared with the META node of the B2C project view
What each file holds
Each file opens into what it defines, in file order, as the Site Archive tab of Search Everywhere finds it: services, profiles and credentials, jobs, preferences, custom objects, slot configurations, and library content and folders. Each row shows the ID, then its kind in grey, such as Service or Job
Types in metadata
A metadata file lists the custom object types it defines and the system objects it extends, each as Custom object type or System object. A type opens into the lists the Metadata Editor shows for it:
| List | Holds |
|---|---|
| Custom Attributes | The custom attributes the file defines for the type, each with its name, its type and its usages in code |
| Groups | The attribute groups the file defines for the type, each with its name and the attributes it lists |
| Attributes | The system attributes the file changes for the type. A custom object type's key comes first, marked Key |
A list shows only when the file has something for it, and a type with nothing to list doesn't open. Hover a list for what it holds
Usages
An entry that code names, such as a service, a job or a custom object type, shows how many places use it, as its Code Vision count in the XML does. A custom attribute, and the key of a custom object type, counts its reads in scripts and templates as the Metadata Editor does. Click the count to list the places, or right-click the row and choose Show Usages. The counts follow your edits
Usage counts of custom attributes need an active license or trial, as in the Metadata Editor
Unused in code
Unused in code in the header keeps only the entries that no script or template names, such as a service nothing creates or a custom object type nothing reads
The footer counts them, such as 2 unused. A system object is never listed, since code doesn't name it by its ID. The check is a text search, so an ID that code builds at run time is not found
Search
Type a file name, a kind or a path: objecttype finds both metadata files, and catalog finds the catalogs. The search also finds the IDs of entries, custom attributes, system attributes and groups, such as acme.http or acmeAccountId, and opens the rows that hold them. Names match as in Search Everywhere, and the matched part is highlighted
Downselects the first file and moves to the treeEnterin the search opens the first file- A group found by its own ID lists all its attributes, and a group found through one of its attributes lists that attribute
- Typing in the tree goes back to the search
- The tree shows up to 500 files, then N more, refine the search
- A search with no file reads Nothing matches "promo", and a scope with none No files in AcmeUS
Open, schema and paths
Double-click a file or press Enter to open it. Files open in the Metadata Editor: metadata, services, jobs, preferences, custom objects, slots and libraries. An entry, a group or an attribute opens its file on that row, such as the attribute selected in the Metadata Editor. Right-click one for Open in Editor, Show Usages and Copy ID. Right-click a file for:
| Item | Does |
|---|---|
| Open | Opens the file |
| Open Schema (services.xsd) | Opens the bundled schema of the kind, when it has one |
| Reveal in Project View | Selects the file in the Project tool window |
| Copy Path | The full path |
| Copy Path from Content Root | The path inside the project, such as metadata/site_us/services.xml |
| Copy Namespace | The file's XML namespace |
META in the B2C project view
The B2C project view shows the same files under META , beside the site's root, where External Libraries sits. It has the same groups, counts and sizes, follows Group by Type, and selects the file you open, such as META › Sites › AcmeUS › Preferences › preferences.xml. META shows up with the first site archive file
New site archive files
Right-click a folder and choose New › Site Archive File for an empty file that imports without errors:
| Kind | File | Root |
|---|---|---|
| Services | services.xml | services |
| Jobs | jobs.xml | jobs |
| Site preferences | preferences.xml | preferences |
| Custom objects | custom-objects.xml | custom-objects |
| Content slots | slots.xml | slot-configurations |
| Content library | library.xml | library |
The folder puts its kind first: sites/RefArch offers preferences, libraries/SharedLibrary a library with library-id="SharedLibrary", custom-objects custom objects. The other kinds stay in the list, and Up / Down in the name field moves through them. A name left as one of the kinds' names follows the kind you pick, so preferences with Content slots makes slots.xml. The file opens in its editor, ready for the first row. For metadata, use New › Metadata File, see Metadata Editor
Site Archive in Search Everywhere
The Site Archive tab of Search Everywhere finds what the files define: services, profiles and credentials, jobs, preferences, custom objects, slot configurations, and library contents and folders. Enter opens the file in its editor with that row selected
Enter opens the file in its editor with the row selectedIDs in scripts
Service, credential, preference and custom object IDs in scripts link to the XML that defines them. Cmd+Click / Ctrl+Click opens the file in its editor with that row selected, or on the ID in the XML while the file shows its Text tab. Completion lists the IDs of the project with the file each one comes from
Cmd+Click on the ID in createService or ServiceRegistry.get opens services.xml on the Services Editor tab with the service selected, and setCredentialID completes the credentials with the file each comes from. With the file on its Text tab, the jump lands on the ID in the XML. An ID that only Business Manager defines stays plain, with no error| Script | Goes to |
|---|---|
LocalServiceRegistry.createService('acme.http.orders', ...), ServiceRegistry.get('acme.http.orders') | <service service-id="acme.http.orders"> in services.xml |
svc.setCredentialID('acme.http.cred') | <service-credential> |
Site.getCurrent().getCustomPreferenceValue('apiTimeout') | <preference preference-id="apiTimeout">, every instance type, and the attribute in the metadata |
CustomObjectMgr.getCustomObject('PaymentCountry', 'AT') | The <custom-object> of that type and key |
An ID with a target is underlined. A service, credential or custom object the project doesn't define, such as a service set up only in Business Manager, stays plain and is no error. A preference ID that no site preference in your metadata defines is an error, see Undefined preferences
Fast on big archives
The window doesn't build an XML tree. It reads each file up to its root element, so a catalog of hundreds of megabytes costs what a small file does, and it keeps what it read across restarts. Folders named cartridge and node_modules, and dot folders, are skipped. A change to a file updates the tree within a moment, unsaved edits included
cartridge folders and node_modules stays outThe IDE indexes no file above 2.5 MB. Intellij SFCC reads those files itself, one element at a time, so large catalogs, price books, inventory lists, libraries, slot configurations and metadata open into their entries and count usages as small files do. Scripts, forms and log links go to what they define, and B2C Doctor and the B2C MCP tools read them
Troubleshooting
| Problem | Fix |
|---|---|
| No site archive XML in this project | Add the import files to the project as .xml, such as meta/system-objecttype-extensions.xml. Files inside cartridges and node_modules aren't listed |
| Waiting for indexing to finish... | The window fills when indexing ends |
| A site file is under no site folder | Move it to sites/<site>/, or to a folder named for the site |
| No B2C Metadata menu item | Link a cartridge first, see Cartridges |