B2C Metadata

Browse every site archive XML file of your project by organization and site, search them, and open IDs from scripts in the site archive XML

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

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

Open the tool window

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

Click B2C Metadata on the right tool window bar, after B2C Entry Points. You can also open it from:

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

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view
ControlWhat it does
SearchSearch metadata, catalogs, preferences, jobs, services filters the tree
ScopeAll, Organization, All Sites, or one site under Sites. The project keeps your choice
Group by TypeLists the kinds of files first, each with its sites
RefreshLooks for site archive XML again
Expand All, Collapse AllThe tree's branches

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

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

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:

FileBelongs to
Anything under sites/<site>/That site
A site file in an export folder named for a site, such as SoloUS/preferences.xml or us/jobs.xmlThat site
A custom objectThe storage-scope of its type in your metadata, site or organization
A library under libraries/<id> or with a library-idThe organization, as a shared library
Preferences outside a site folderSite or organization, from the preference IDs it sets
A site file in no folder that names a siteSites, 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

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

Type a file name, a kind or a path: objecttype finds both metadata files, and catalog finds the catalogs. Names match as in Search Everywhere, and the matched part is highlighted

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view
  • Down selects the first file and moves to the tree
  • Enter in the search opens the first file
  • 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 SoloUS

Open, schema and paths

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

Double-click a file or press Enter to open it. Metadata files open in the Metadata Editor, and services, jobs, preferences, custom objects, slots and libraries in their site archive editor. Right-click a file for:

ItemDoes
OpenOpens the file
Open Schema (services.xsd)Opens the bundled schema of the kind, when it has one
Reveal in Project ViewSelects the file in the Project tool window
Copy PathThe full path
Copy Path from Content RootThe path inside the project, such as metadata/site_us/services.xml
Copy NamespaceThe 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 › SoloUS › Preferences › preferences.xml. META shows up with the first site archive file

B2C Metadata lists every site archive XML file of the project under Organization and Sites, with its size and archive. Narrow it to one site, list the kinds first with Group by Type, search by name, kind or path and open a file with Enter, copy its path or namespace, and find the same tree under META in the B2C project view

New site archive files

Right-click a folder and choose New › Site Archive File for an empty file that imports without errors:

KindFileRoot
Servicesservices.xmlservices
Jobsjobs.xmljobs
Site preferencespreferences.xmlpreferences
Custom objectscustom-objects.xmlcustom-objects
Content slotsslots.xmlslot-configurations
Content librarylibrary.xmllibrary

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. 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

IDs in scripts

Service, credential, preference and custom object IDs in scripts link to the XML that defines them. Cmd+Click / Ctrl+Click opens the definition, and completion lists the IDs of the project with where each one comes from

ScriptGoes to
LocalServiceRegistry.createService('acme.http.orders', ...), ServiceRegistry.get('acme.http.orders')<service service-id="acme.http.orders"> in services.xml
svc.setCredentialID('acme.http.orders.cred')<service-credential>
Site.getCurrent().getCustomPreferenceValue('apiTimeout')<preference preference-id="apiTimeout">, every instance type
CustomObjectMgr.getCustomObject('PaymentCountry', 'DK')The <custom-object> of that type and key

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

Troubleshooting

ProblemFix
No site archive XML in this projectAdd 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 folderMove it to sites/<site>/, or to a folder named for the site
No B2C Metadata menu itemLink a cartridge first, see Cartridges

On this page