Announcements
Agentic B2C Developer Toolkit
B2C Commerce Agent Skills
Agentic MCP Shopper Tools Quick Start (Pilot)
SFRA Quick Start
Composable Storefront Quick Start
B2C Commerce API Quick Start
B2C Commerce Release Notes
Ask the Community
Build, debug, deploy, and manage Salesforce B2C Commerce from your terminal, editor, or AI assistant. The Agentic B2C Developer Toolkit supports developers building storefronts and integrations, and administrators managing their sites.
Run commands with npx, without a global installation:
1npx @salesforce/b2c-cli --help
2npx @salesforce/b2c-cli setupOr install the CLI to use the shorter b2c command:
1npm install -g @salesforce/b2c-cli
2b2c setupFor prerequisites and other installation options, see Install the B2C CLI.
Use b2c setup for guided configuration, or supply settings through dw.json, environment variables, and command flags. The CLI, MCP, and IDE Extension share B2C Commerce configuration. Configure one instance or name multiple instances and select one with --instance. For configuration information, see Configuration.
For SCAPI administrative commands, create an Account Manager API client. In Account Manager, assign the client the Salesforce Commerce API role, select each instance that the client needs to access through SCAPI, and add the scopes required by the task. For example, listing eCDN zones requires the sfcc.cdn-zones scope.
The following shell examples use placeholder values. Replace them with your credentials and your realm’s short code. Keep credentials out of source control.
1export SFCC_CLIENT_ID='your-account-manager-client-id'
2export SFCC_CLIENT_SECRET='your-account-manager-client-secret'
3export SFCC_SHORTCODE='your-short-code'
4
5npx @salesforce/b2c-cli ecdn zones list --tenant-id abcd_stg--tenant-id accepts a tenant ID such as abcd_stg or its organization ID, f_ecom_abcd_stg. The CLI requests the access token for the command; you don’t need to obtain or paste a bearer token first.
SLAS client administration uses the SLAS Organization Administrator role. Managed Runtime commands that use an API key accept MRT_API_KEY, available from Runtime Admin Account Settings. Cartridge and WebDAV operations can also require an instance hostname, username, and WebDAV access key, depending on the authentication method.
See Configuration for project and global dw.json files, multiple instances, and environment variables. See Authentication for client roles, scopes, OCAPI permissions, and WebDAV access. Safety Mode can restrict supported write and delete operations across the CLI, MCP, and IDE Extension.
Install the B2C MCP through an agent plugin in supported clients. For example, in Claude Code:
1claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
2claude plugin install b2c-dx-mcp@b2c-developer-tooling --scope projectSee the B2C MCP guide for complete setup instructions and supported AI assistants. The plugins use the open Agent Plugins standard. For clients that require manual MCP configuration, use npx with arguments --yes @salesforce/b2c-dx-mcp as the local server command.
The MCP provides official B2C Commerce documentation search, live cartridge debugging, log investigation, deployment tools, and general-purpose SCAPI Admin API access. Your assistant can combine API requests and summarize the results, such as reviewing products and their category assignments. Available actions depend on the credentials and permissions you configure.
It also makes the b2c, b2c-cli, storefront-next, and b2c-ops skill collections available to your assistant through MCP tools. You don’t need to separately install the skills plugins. You can still install Agent Skills separately if you want skills without an MCP connection or as native skills in your assistant.
Example requests:
Find the official guidance for Custom API authorization, then help me diagnose why my endpoint isn’t registered.
Investigate failed orders on my sandbox. Summarize the affected period, supporting evidence, and next steps before making changes.
Operational skills help your assistant correlate evidence and prepare a handoff to your team or Salesforce Support. See Operations and Administration.