b2c-import-set-migrations
Import Set Migrations Skill
Use b2c job import-set to apply site import/export archives from discovered cartridge metadata/ directories followed by project migrations. Each archive is applied once per instance and skipped on later runs. Re-running the command is the intended workflow for local setup, developer onboarding, and CI/CD.
[!IMPORTANT] This is an optional, opt-in, project-level approach — not a default workflow. A project adopts it deliberately by keeping import-set sources with its code and running
b2c job import-setfrom setup scripts or CI. Follow an existing project's conventions. If a project only uses occasional one-off site imports, use theb2c-cli:b2c-site-import-exportskill instead.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli job import-set).
Configuration & Authentication
The CLI auto-discovers the target instance and credentials from SFCC_* environment variables, dw.json in the current or parent directories, ~/.mobify, package.json, and configuration plugins. Flags like --server, --client-id, --client-secret, --username, and --password are usually unnecessary — only pass them to override what's auto-detected.
job import-set requires both OAuth and WebDAV credentials. Run b2c setup inspect to confirm the resolved configuration; see the b2c-cli:b2c-config skill for precedence rules and troubleshooting.
Import Sources and Order
The command considers cartridge metadata first, followed by the project migrations directory (./migrations by default). Discovered cartridges are ordered by name, and archives within each source are ordered lexically.