Metadata Usage lists the B2C metadata your project defines or its linked cartridges use: custom attributes, site preferences, custom object types, services, payment methods, jobs, Page Designer types, and marketing and site entries such as promotions, customer groups and stores. The list on the left holds each kind, type and item with its uses, files, cartridges and sites. The details on the right show where the selected one is defined, then each cartridge that uses it, down to the file and line
Open Metadata Usage
Metadata Usage opens in an editor tab, one per project. Open it from:
- Show Metadata Usage , the first icon on the B2C Metadata title bar, or from Find Action. The first time B2C Metadata opens, a tip under the icon says what it shows
- Show in Metadata Usage, first in the menu when you right-click a file, a type, a custom attribute or preference, a custom object type or another site archive entry in B2C Metadata. An item or type opens selected in the whole list, and a file narrows the list to what it defines or uses
- Show Metadata Used by Cartridge on a linked cartridge's folder in the Project view and the B2C project view, which narrows the list to what that cartridge uses
- Show in Metadata Usage in the tree menu and the title line of the Metadata Editor, for the selected type or attribute
The actions show up once a cartridge is linked. While the IDE indexes or counts, a banner says the numbers may still change. When the list is narrowed to a cartridge or a file, Show All in the banner brings the rest back
The list
The list starts from the metadata: each kind, then its types, then their items. Kinds start open. Select a row to show its details, and press → or click the arrow to open it
| Column | Shows |
|---|---|
| Name | The kind or type with how many items it holds, or the item with No code use when no cartridge in scope uses it, or Not defined when code uses it and no metadata file in the project defines it |
| Uses | How many places in the cartridges in scope use the item. A type or kind adds up its items |
| Files | How many files hold those places. A type or kind counts each file once |
| Cartridges | How many cartridges use the item. Site import data counts as one, and a type or kind counts each cartridge once |
| Sites | The sites those uses reach. See Sites |
When the list is narrow, Files goes first, then Cartridges, then Sites. Expand All and Collapse All on the toolbar open or close every row
The details
The details show the selected item, type or kind, or every item in the list when nothing is selected. The list's filters never hide what you selected
- Header: The name, what it is (
Basket · Custom Attributes · String), its totals (5 uses in 3 files · 2 cartridges) and its sites. An item also says when no file uses it or no metadata file defines it, and a type or kind says how many of its items are used, have no code use or are not defined. Open Definition opens the first definition and Find Usages lists every use - Defined in: Each metadata file that defines it, as its path in the project, with its level: Organization, Site or Cartridge. Under a file, the line of each definition
- Cartridges: One group per cartridge that uses it, in cartridge path order, with its position (
#1), its file count, its uses and the sites it serves. Site import data has its own group - Files and lines: Under a cartridge, each file as its path in the cartridge, then each line with its code. A type or kind names the item each line reads
Double-click or press Enter on a line to open the file there, an XML line on its Text tab. Right-click a cartridge or file for the same menu as the list. With up to 60 places everything starts open. With more, files start closed under their cartridges, and a file far down the list reads its lines when you open it
Right-click a row in the list or the details for Show Only This, Show Usages, Find Usages, Copy ID and Copy Reference (Basket.custom.giftMessage), and Remove Unused Definitions when the row holds definitions nothing uses
Sites
Each use counts for the sites it reaches:
| Use in | Reaches |
|---|---|
| A cartridge | The sites whose cartridge path names it |
A B2C module or the modules folder | Every storefront site |
| A site import file | The site whose folder holds it, such as sites/AcmeUS/preferences.xml. An organization file reaches none |
| Anything else | No known site |
A row reads All sites when it reaches every storefront, and the site names otherwise. A use on Business Manager's cartridge path reads Business Manager. The project's sites come from its site paths and site import folders. With none, the Sites column stays empty and the details leave out the sites line
Search
Every word of the search must match an item's kind, type or ID, the name of a cartridge that uses it, or the path of a file that uses it. The list keeps the matches and opens them, the first match is selected, and Enter and Shift+Enter step through the rest. The count says which match is selected. Ctrl+F (⌘F on macOS) focuses the search
Filters
| Filter | Keeps |
|---|---|
| Cartridges | The cartridges and sites you check, each listed with its icon and how many uses it has. A site checks the cartridges on its cartridge path and its site data. With nothing checked, every linked cartridge counts |
| Kind | The kinds of metadata you pick, each with how many items it would show. Catalogs and content libraries read Not counted, since they hold too many IDs |
| Object | The object types you pick, such as Basket or SitePreferences |
| No code use | Items metadata defines that no cartridge in scope uses |
| Not defined | Items code uses that no metadata file in the project defines |
An item that only cartridges you left out use reads No code use, and its details say that cartridges outside the scope use it. Remove Definition shows only for definitions that no file in the project uses
When the window is narrow, the filters fold into Filters , which lists every filter with how many items each shows
Remove unused definitions
Select an item that no file uses, and Remove Definition… in the details removes its definition. On a type, a kind or the whole list, Remove Unused Definitions (N)… removes every unused definition it holds. The same action is in the right-click menu
- What can go: Custom attributes, site and organization preferences and custom object attributes that metadata defines and no file in the project reads, in any cartridge or site import file, not only the ones in scope. Keys, attribute groups and other kinds stay
- Before it removes: A warning names the items and their files, and reminds you that an instance may still use them in site data or Business Manager. Read-only files ask to be made writable first
- After: The definitions and their attribute group entries go in one step, and a notification says how many. Undo brings them all back
With agents
B2C MCP gives AI agents the same counts, so they learn which metadata a cartridge uses without reading its code. Answers carry counts first, and file and line only when asked, never code text
| Tool | What it does |
|---|---|
intellijsfcc_metadata_usage | Which metadata a cartridge, folder or file (path) uses, or which cartridges and places use one id. objectType keeps one type, such as Basket, and kinds keeps kinds such as attribute or preference. detail is counts for counts per type, ids for a row per item (the default) or places for each file and line. filter: undefined lists what code uses and nothing defines |
intellijsfcc_metadata_details | One attribute's definition, now with the cartridges that read it (byCartridge) |
intellijsfcc_metadata_search | filter: undefined lists the items code uses that no metadata file defines |
intellijsfcc_cartridge_inventory | How many metadata items of each kind the cartridge uses |
Ask "Which metadata does app_custom_acme use?" or "Which Basket attributes are used here?". For the second, the agent calls:
{ "cartridge": "app_custom_acme", "objectType": "Basket", "kinds": ["attribute"] }and gets one short row per attribute, such as { "type": "Basket", "id": "giftMessage", "uses": 4, "files": 2, "defined": true }
License
Metadata Usage needs an active license or trial, and its actions stay hidden without one. See Purchase