The B2C Site Scope tells the extension which site's cartridge path to follow. Navigation, override resolution, the Cartridges view, the Resource Bundle Editor, and endpoint actions all use the cartridge order of the selected site
The B2C Scope item
B2C Scope: [site] ([count]) sits at the right end of the status bar. Until you pick a site, it reads B2C Scope: Global (0) on a yellow background, and code assistance has no site cartridge path to follow. The picker has no Global entry, so once a connection has a site, you change it by selecting another site
Hover over the item for Selected Site Scope Info:
| Line | Link | What the link does |
|---|---|---|
| Site ID | Open Site | Opens the storefront home page of the active connection |
| Cartridges | Open Cartridge Path | Lists the cartridge path of the site in order |
| Source | Open source | Opens the site.xml file of a local site, or Business Manager for a remote site |
On Global, the tooltip shows only 💡 All code assistance is based on cartridge path of the selected site.
Select a site
Select your connection
Activate the connection you work on in the Intellij SFCC sidebar. Each connection keeps its own scope, so switching connections switches the scope with it
Open the picker
Click the B2C Scope item. While the picker loads, the item reads Selecting B2C Site Scope. Select B2C Site Scope for [connection] opens at once with the sites of your project's site.xml files, under Found in project site.xml files. The extension then reads the instance, with Getting: B2C Sites and Getting: Sites Cartridges in a notification, and adds its sites under Found on [connection]. Type a site ID to narrow the list
Pick the site
Each row shows the site ID and → [count] cartridges. A local row shows the path of its site.xml file, and a remote row shows the connection and the cartridge path. The highlighted row offers Copy Cartridge Path, Open Cartridge Path, and, for a local site, Open site.xml. Press Enter to select the site
Check the order
The status bar shows the site and its cartridge count, and the Cartridges view re-sorts: cartridges on the path come first, in path order, and the other linked cartridges follow from A to Z. Open Cartridge Path in the tooltip lists the path as 1. [cartridge], 2. [cartridge], with each cartridge marked ✅ Linked or ❌ Not linked. Its Copy button copies the colon-separated path
Local and remote sources
| Source | Where the scope comes from | How changes reach it |
|---|---|---|
Local site.xml | The site-id of the file and its <custom-cartridges> value | Saving the file updates the scope of every connection that uses it, with [connection] → Updated Cartridges Path in a notification. A changed site-id updates the site ID the same way |
| Remote instance | The sites of the active connection and their cartridge paths | The extension checks the path on the instance when the connection becomes active, when the VS Code window regains focus, and every 5 minutes while the window is focused. A changed path updates the scope with [connection] → Updated Cartridges Path. Source → Business Manager in a notification. Opening the picker also brings the selected site up to date |
Remote sites need the connection's account and a selected code version. The background check needs the account's password and runs at most once a minute, and an empty path from the instance never replaces the stored one. The source matters even when the site IDs match. Selecting a local export works with that export's order, and it does not change the site on the instance
What the scope changes
- Code assistance: the script and ISML language servers receive the cartridge path, so navigation and override resolution follow its order. A cartridge listed first wins over the ones after it when both contain the same cartridge-relative file
- Cartridges view: linked cartridges follow the path order
- Resource Bundle Editor: bundles of the same name are layered in the order of the path
- Endpoint actions: Open Endpoint and Copy Endpoint URL need an active connection and a selected site. Without a site, the extension asks you to Select B2C Scope before using endpoint actions. and offers Select B2C Site Scope
- Debugging: selecting another site restarts a running debugger session for the new site
- AI agents: SFCC MCP lists the sites and the active scope for your agent
A remote path can name a cartridge that is not in your project. It shows as ❌ Not linked, and navigation cannot open its files until you link the cartridge
The scope is stored with the connection in the workspace, and it travels with a connection export. It is not written to dw.json. Selecting a scope does not upload code or change the site on the instance
Edit a cartridge path
A site.xml file with <custom-cartridges> shows Edit [site ID] Cartridge Path ([count]) above it, and a Business Manager preferences.xml file shows Edit BM Cartridge Path ([count]). Both open the Cartridge Path Editor with an ordered list to drag, add, and remove cartridges. The change stays unsaved in the XML file until you save it, and saving a selected local site.xml refreshes its scope
Troubleshooting
- The status bar shows Global: select a site for the active connection
- A local site is missing: confirm its file is named
site.xml, is valid XML, and has asite-idon the<site>element. Check the file path when several exports contain the same site ID - A remote site is missing or cannot load: confirm the connection is active, has an account, and has a selected code version. The notification Error occurred while getting sites from [connection]. means the instance could not be read. Reopen the picker after you fix the connection
- Navigation opens an unexpected cartridge: check the order and the Linked marks in Open Cartridge Path, then link the cartridge you expect. A local export and the live site can have different paths
- A saved edit has no effect: the selected scope is remote, so it still uses the instance's path. Select the local site to use its XML, or change the site on the instance. The scope picks up the new path on its next check
- A changed remote path does not show up: the check runs only while the window is focused and the connection's account has a password. After a failed check it waits 30 minutes before it tries again with the same credentials. Reopen the picker to read the path right away