/b2c-cli:b2c-replicationfrom b2c-cli
Automates code and data replication from B2C Commerce staging to production/development using the b2c CLI and custom jobs with ExecuteCodeReplication and ExecuteDataReplication steps.
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.
Replicate code and data from a staging instance to its production or development instance by importing a custom job that uses the platform's replication job steps, then running it with b2c job run. Run every command against the staging instance.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (for example,npx @salesforce/b2c-cli job run Replicate-Global --wait).
To publish individual products, price tables, or content assets instead of whole task groups, use granular replications (b2c scapi replications).
| Step type | Replicates | Availability |
|---|---|---|
ExecuteCodeReplication | A code version (transfer, activate, or both) | B2C Commerce 26.11+ |
ExecuteDataReplication | Global and per-site data task groups | All current releases |
Both steps take one ReplicationConfiguration parameter: a JSON string that describes the process and its tasks. Nothing needs to be set up in Business Manager first. Both run in the organization context (<context site-id="Sites"/>).
The ExecutePreconfiguredCodeReplicationProcess and ExecutePreconfiguredDataReplicationProcess steps instead run a replication process already defined in Business Manager. Use them when the process should stay editable there.
Put the job definitions in jobs.xml at the archive root. For the full jobs.xml format, see b2c:b2c-custom-job-steps. Ready-to-use definitions: job definitions.
<job job-id="Replicate-Code">
<description>Transfer and activate the active code version</description>
<parameters/>
<flow>
<context site-id="Sites"/>
<step step-id="ReplicateCode" type="ExecuteCodeReplication" enforce-restart="false">
<description/>
<parameters>
<parameter name="ReplicationConfiguration">{"code_replication_configuration":{"target":"production","type":"transfer_and_activation","code_version":{"selection":"active"}}}</parameter>
</parameters>
</step>
</flow>
<rules/>
<triggers>
<run-once enabled="false">
<date>2026-01-01Z</date>
<time>00:00:00.000Z</time>
</run-once>
</triggers>
</job>
Validate the archive, then import it on staging:
b2c validate ./replication-jobs
b2c job import ./replication-jobs --show-log
b2c job run Replicate-Code --wait --show-log
b2c job run Replicate-Global --wait --show-log
b2c job run Replicate-MySite --wait --show-log
Each run transfers the selected data (or code) and, for transfer_and_publish / transfer_and_activation, makes it live on the target. Runs take minutes. Replications run one at a time, so start the next job after the previous one finishes.
To change what a run replicates, re-import the job with an updated configuration. Keep one job per configuration you run (for example, a code job, a global-data job, and one per site) rather than editing a single job.
<triggers> is required. The disabled run-once trigger registers the job for on-demand runs. To schedule replication, use a <run-recurring> trigger that lists every weekday the job should run (a trigger without <day-of-week> never fires; see b2c:b2c-custom-job-steps), or run b2c job run from a scheduled CI pipeline.
Code replication (code_replication_configuration):
| Field | Values |
|---|---|
target | production or development (required) |
type | transfer, activation, transfer_and_activation, or undo (required) |
code_version | {"selection":"active"} or {"selection":"specific","id":"<version>"}; required for transfer and transfer_and_activation, not allowed otherwise |
description | Optional label for the process |
Data replication (data_replication_configuration):
| Field | Values |
|---|---|
target | production or development (required) |
type | transfer, publish, transfer_and_publish, or undo (required) |
tasks.global | Global task groups, or {"all": true} |
tasks.sites.<site> | Per-site task groups keyed by site ID, or {"all": true} |
cache_invalidation | clear_all, clear_impacted_partitions, or keep_all |
notification | {"type": "process_end" | "process_error" | "periodically", "to": ["[email protected]"]} |
description | Optional label for the process |
Tasks left out, or set to false, are not replicated. Task group names: data tasks.
Site data replicates only to a site that already exists on the target. The site itself is created by the global tasks (sites). A combined configuration fails on the first run: the target has no site yet, so the site tasks are skipped, and the run fails with a generic error such as Optimistic locking failure or ErrorGeneric.
For a site that has never been replicated, run two jobs in order:
{"global": {"all": true}} or at least {"global": {"sites": true}}){"sites": {"MySite": {"all": true}}})Keep the global and site jobs separate so the same jobs work for new and existing sites.
b2c logs get --level INFO --since 30m -g replication). Lines such as Skipping site ... because it is not replicated to 'Production' yet or Empty replication task encountered point to the first-replication order above.NO_STAGING_INSTANCE means the job ran on an instance other than staging; the step succeeds without doing anything.b2c-cli:b2c-storefronts.b2c-cli:b2c-import-set-migrations), and create SLAS clients with b2c slas client create -i <target>.b2c sites list -i production and bring it online in Business Manager or with a site.xml import on the target (see b2c-cli:b2c-sites for what that import resets).b2c-cli:b2c-setup — end-to-end realm setup, including where replication fitsb2c-cli:b2c-job — run, wait for, and inspect jobsb2c:b2c-custom-job-steps — jobs.xml format, triggers, and custom stepsb2c-cli:b2c-storefronts — moving Storefront Next storefronts between instancesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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"./b2c-capManage Commerce App Packages (CAPs), also called commerce apps or apps, and commerce features using the b2c CLI. Use this skill whenever the user needs to validate, package, install, uninstall, list, or pull commerce apps on B2C Commerce instances, view configuration tasks, or pull app sources for cartridge deployment or Storefront Next development. Also use when checking which apps are installed on an instance, inspecting app details or versions, or managing app lifecycle — even if they just say "what apps do I have", "list my commerce apps", "which CAPs are installed", "install this app", "pull app sources", or "show installed apps"./b2c-cipQuery CIP/CCAC sales, merchandising, payment, traffic, and API/controller analytics with the B2C CLI or MCP. Discover reports/tables, scope SQL, export results, and resolve analytics access./b2c-codeDeploy, download, and manage cartridge code versions on B2C Commerce instances. Use this skill whenever the user needs to upload or download cartridges to/from a sandbox, activate or delete code versions, watch for local file changes during development, or deploy a subset of cartridges. Also use when pushing code to an instance, pulling code from an instance, or setting up a dev workflow with live reload -- even if they just say 'push my code to the sandbox', 'download the code', or 'how do I activate the new version'./b2c-configConfigure B2C CLI/MCP authentication, instances, and project defaults; troubleshoot missing credentials, wrong targets, or configuration precedence. Routine inspection can use config_inspect or b2c setup inspect directly.Other plugins' skills for the same job