/b2c-cli:b2c-storefrontsfrom b2c-cli
Sets up and migrates Storefront Next (composable) storefronts between B2C Commerce instances using the b2c CLI. Handles creation, export, import, and project configuration.
Ships in b2c-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A Storefront Next storefront links B2C Commerce sites on an instance to a Managed Runtime (MRT) project. Setup also creates the storefront's API clients, SLAS client, eCDN configuration, and MRT environment.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (for example,npx @salesforce/b2c-cli job export --storefront my-storefront).
Choose by whether the MRT project should already exist:
| Goal | Use |
|---|---|
| A new storefront with a new MRT project | Storefront setup in Business Manager, or b2c mrt project create |
| Add another instance (for example, production) to an existing project | Export the storefront from the source instance and import it on the target |
Creating a storefront always provisions a new MRT project, even if one with the same name and sites already exists. To keep staging and production in one project, create the storefront once, then export and import it.
Storefronts do not replicate. Code and data replication from staging (see b2c-cli:b2c-replication) leaves them out, so import the storefront on each target instance.
Business Manager storefront setup is the primary path; it also scaffolds the project configuration. To create one from the CLI over the SCAPI Storefronts API:
b2c mrt project create "My Storefront" --site MySite --mrt-backend scapi
Creation runs asynchronously. It needs an Account Manager API client with sfcc.storefront.storefronts.rw; the client that storefront setup creates does not have it. See the b2c-cli:b2c-mrt skill for SCAPI backend setup.
Requires B2C Commerce 26.10 or later on both instances.
# 1. Export the storefront record from the source instance (by storefront name)
b2c job export --storefront my-storefront -i staging --output ./storefront-export
# 2. Import the extracted archive directory on the target and wait for setup
b2c job import ./storefront-export/<archive-name> -i production --wait-for-storefront --show-log
The export extracts to ./storefront-export/<archive-name>/storefronts/<storefront-name>.xml. It contains only the storefront record: storefront name, type, associated sites, MRT project (mrt-site), MRT organization (org-slug), and the acting user-id. Neither MRT environments nor bundles are copied.
The import creates the storefront and runs sfcc-post-import-setup-storefront. That job provisions API and SLAS clients, site state, eCDN, and a new MRT environment in the existing project. It can take 20 minutes or more. Without --wait-for-storefront, the command returns once the archive import finishes and setup keeps running on the instance.
The import fails, without creating anything, unless all of these hold on the target:
mrt project delete) removes its MRT project for every instance.org-slug must match the target instance's MRT organization.user-id in the archive, which must be an Account Manager user with a Managed Runtime role in the instance's organization.An export made with client credentials records the API client's service user (for example, scapi-<client-id>@...), which fails that check on import. Before importing, set user-id in storefronts/<storefront-name>.xml to an authorized user's login.
Source repository (GitHub) links are not imported. Connect the new environment to source control separately if needed.
When the import fails, read the job log (--show-log, or b2c job log sfcc-site-archive-import). The summary error is generic (Internal fatal error); the cause appears as a [DATAERROR] line.
# Both instances should list the same project, each with its own environment
b2c mrt env list -p my-mrt-project -i staging --mrt-backend scapi
b2c mrt env list -p my-mrt-project -i production --mrt-backend scapi
The MRT project ID is the mrt-site value in the export, not the storefront name.
To develop locally or configure CI against a storefront, use Download .env on the storefront's detail page in Business Manager. Use that file for the storefront project rather than copying values by hand. Its client secrets download only once, and no CLI command or API returns them; to rebuild the other values or rotate a lost SLAS secret, see the Storefront Next setup reference in b2c-cli:b2c-setup or Get the Environment File. See the Storefront Next guide (b2c docs read guide-storefront-next) for how the CLI uses common Storefront Next project variables.
b2c-cli:b2c-setup — end-to-end sandbox and realm setupb2c-cli:b2c-mrt — MRT projects, environments, bundles, and environment variablesb2c-cli:b2c-site-import-export — site archive layout and other export data unitsb2c-cli:b2c-job — job execution, logs, and waitingb2c-cli:b2c-replication — replicate the sites a storefront needs before importing itWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
b2c-commerce, storefront-next, managed-runtime, b2c-cli, commerce-cloud
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cli28 skills in this plugin
/b2c-amManage Account Manager resources including API clients, users, roles, and organizations. Use this skill whenever the user needs to create or update API clients, onboard or offboard developers, assign Account Manager roles scoped to tenants, audit user permissions, look up organizations, or provision API clients for CI/CD pipelines. Also use when managing AM role assignments or querying Account Manager data — even if they just say "add a new developer" or "set up an API client". For instance-level Business Manager administration (BM roles, BM users, BM access keys, BM whoami), defer to the `b2c-cli:b2c-bm-users-roles` skill./b2c-bm-users-rolesManage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever the user needs to list or search BM users on a sandbox or production instance, identify which BM user an OAuth token resolves to ("whoami"), assign or revoke instance-level access roles, edit role permissions, look up a user's WebDAV / OCAPI / Storefront access key, or rotate access keys for SSO-managed users. Also use when the user asks "what's my BM login on sandbox X", "rotate my WebDAV password", "how do I make a custom BM role", "audit BM users on this instance", or "delete a stale BM user from a sandbox".Other plugins' skills for the same job