b2c-storefronts
БесплатноБез исполняемых скриптовНе проверенSet up and move Storefront Next (composable) storefronts between B2C Commerce instances with the b2c CLI. Use this skill whenever the user needs to choose…
от SalesforceCommerceCloud★ 58 звёзд на GitHubОб этом скилле
B2C Storefronts Skill
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).
Create or Import
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.
Create a Storefront
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.
Move a Storefront to Another Instance
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.
Import Requirements
The import fails, without creating anything, unless all of these hold on the target:
- Sites exist. Every associated site must exist on the target and not already belong to another storefront. Replicate or import the site first.
- Name is free. No storefront with the same name exists on the target. Do not delete a storefront to retry an import: deleting a storefront over the SCAPI backend (
mrt project delete) removes its MRT project for every instance. - Same MRT organization. The
org-slugmust match the target instance's MRT organization. - Authorized identity. An import run from a Business Manager session uses that user. An API import (client credentials) uses the
user-idin 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.
Verify
# 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.
Project Configuration and Credentials
To develop locally or configure CI against a storefront, use Download .env on the storefront's detail page in Business M
Установить b2c-storefronts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл b2c-storefronts?
Set up and move Storefront Next (composable) storefronts between B2C Commerce instances with the b2c CLI. Use this skill whenever the user needs to choose between creating a storefront and importing one, connect a production or other instance to an existing Managed Runtime project, export or import a storefront with a site archive, or find a storefront's project configuration and credentials — even if they just say "set up my storefront on production" or "why did my storefront import fail".
Как установить скилл b2c-storefronts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл b2c-storefronts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic