Agentic B2C Developer Toolkit
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.
- B2C CLI: Deploy cartridges, manage code versions, run jobs, configure SLAS and eCDN, and manage Managed Runtime environments and On-Demand Sandboxes. Use the same commands interactively or in automation.
- IDE Extension: Work with cartridges, logs, and the script debugger in VS Code and compatible editors.
- B2C MCP: Connect your assistant to B2C Commerce tools, official documentation search, and workflow skills. Investigate issues, debug live cartridge code, or work with B2C Commerce data through SCAPI Admin APIs.
- Agent Skills: Give your assistant B2C Commerce development guidance, CLI workflows, Storefront Next patterns, and operational runbooks. Use skills through the MCP or install them separately.
Run commands with npx, without a global installation:
Or install the CLI to use the shorter b2c command:
For 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.
--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:
See 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.
- CLI command reference: Code, jobs, sandboxes, SLAS, eCDN, Managed Runtime, and more.
- IDE Extension: Installation, cartridge development, and debugging.
- MCP tools: Capabilities and access requirements.
- Agent Skills: Skill collections and standalone installation.
- TypeScript SDK: Build custom tooling or inspect the behavior of the official tools.
- GitHub repository: Source code, contributions, and issue reporting.