Install AI Tools

B2C Commerce tools, documentation, and skills for your assistant.

Claude

Install the plugin Recommended

bash
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
claude plugin install b2c-dx-mcp@b2c-developer-tooling --scope project

Start a new Claude Code session in your project. Use --scope user instead for all projects.

Manual MCP setup

From your project directory:

bash
claude mcp add --transport stdio --scope project b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new session. Use --scope user instead for all projects. See Claude Code MCP setup.

Claude Desktop setup

Codex

Install the plugin Recommended

bash
codex plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
codex plugin add b2c-dx-mcp@b2c-developer-tooling

Start a new Codex session in your project. This setup also works with the Codex IDE extension and the ChatGPT Work desktop app.

Manual MCP setup
bash
codex mcp add b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Or add this to ~/.codex/config.toml (or $CODEX_HOME/config.toml if customized):

toml
[mcp_servers.b2c-dx-mcp]
command = "npx"
args = ["-y", "@salesforce/b2c-dx-mcp@latest"]

Start a new session. See Codex MCP configuration.

ChatGPT online setup

VS Code

Install the plugin Recommended

  1. Open the Command Palette (Cmd/Ctrl+Shift+P) and run Chat: Install Plugin from Source.
  2. Enter SalesforceCommerceCloud/b2c-developer-tooling.
  3. Select b2c-dx-mcp and follow the installation prompts.
  4. Start a new chat in GitHub Copilot.
Manual MCP setup

Add this to .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "b2c-dx-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@salesforce/b2c-dx-mcp@latest"]
    }
  }
}

See VS Code MCP setup.

Copilot CLI setup

Cursor

Reload the MCP server in Cursor after installation.

Manual MCP setup

Add this to .cursor/mcp.json in your project:

json
{
  "mcpServers": {
    "b2c-dx-mcp": {
      "command": "npx",
      "args": ["-y", "@salesforce/b2c-dx-mcp@latest"]
    }
  }
}

For all projects, use ~/.cursor/mcp.json instead.

See Cursor's MCP documentation.

OpenCode

Add this to opencode.json in your project:

json
{
  "mcp": {
    "b2c-dx-mcp": {
      "type": "local",
      "command": ["npx", "-y", "@salesforce/b2c-dx-mcp@latest"],
      "enabled": true
    }
  }
}

Restart OpenCode. For all projects, use ~/.config/opencode/opencode.json. See OpenCode MCP setup.

Gemini

From your project directory, run:

bash
gemini mcp add --scope project b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new Gemini CLI session. Use --scope user instead for all projects. See Gemini CLI MCP setup.

No separate skills plugins needed.

Other clients and manual setup →
Skip to content
View as Markdown
View as Markdown

Custom APIs

Check which SCAPI Custom API endpoints are active and investigate registration failures.

See Salesforce's Custom API Status Reports for registration behavior and error explanations.

B2C CLI showing Custom API names, HTTP methods, and registration status.

Global Custom APIs Flags

These flags are available on all Custom APIs commands:

FlagEnvironment VariableDescription
--tenant-idSFCC_TENANT_ID(Required) Organization/tenant ID
--short-codeSFCC_SHORTCODESCAPI short code
--client-idSFCC_CLIENT_IDAccount Manager API Client ID
--client-secretSFCC_CLIENT_SECRETAccount Manager API Client secret

Additional authentication flags (--auth-methods, --user-auth, --account-manager-host, --jwt-cert, --jwt-key, --jwt-passphrase) and logging flags (--log-level, --debug, --jsonl) are also available. See the Authentication Guide for credential configuration, or run any command with --help for the complete flag list.

Authentication

Custom APIs commands require an Account Manager API Client with OAuth credentials.

Required Scopes

The following scopes are automatically requested by the CLI:

ScopeDescription
sfcc.custom-apisAccess to Custom APIs endpoints
SALESFORCE_COMMERCE_API:<tenant_id>Tenant-specific access scope

Configuration

bash
# Set credentials via environment variables
export SFCC_CLIENT_ID=my-client
export SFCC_CLIENT_SECRET=my-secret
export SFCC_TENANT_ID=zzxy_prd
export SFCC_SHORTCODE=kv7kzm78

# Or provide via flags
b2c scapi custom status --client-id xxx --client-secret xxx --tenant-id zzxy_prd

For complete setup instructions, see the Authentication Guide.


b2c scapi custom status

Get the status of Custom API endpoints for an organization. Shows which endpoints are active and which failed to register.

Usage

bash
b2c scapi custom status --tenant-id <TENANT_ID>

Flags

FlagDescriptionDefault
--tenant-id(Required) Organization/tenant ID
--status, -sFilter by endpoint status (active, not_registered)
--group-by, -gGroup output by field (type or site)
--columns, -cColumns to display (comma-separated)
--extended, -xShow all columns including extended fieldsfalse
--jsonOutput results as JSONfalse

Available Columns

Default columns: type, apiName, endpointPath, httpMethod, status

Extended columns (shown with --extended): sites, securityScheme, operationId, schemaFile, implementationScript, errorReason, id, apiVersion, cartridgeName

API Types

The type column shows a human-readable API type based on the security scheme:

Security SchemeType
AmOAuth2Admin
ShopperTokenShopper

Examples

bash
# List all Custom API endpoints
b2c scapi custom status --tenant-id zzxy_prd

# Filter by status
b2c scapi custom status --tenant-id zzxy_prd --status active
b2c scapi custom status --tenant-id zzxy_prd --status not_registered

# Group by API type (Admin/Shopper)
b2c scapi custom status --tenant-id zzxy_prd --group-by type

# Group by site
b2c scapi custom status --tenant-id zzxy_prd --group-by site

# Show extended columns
b2c scapi custom status --tenant-id zzxy_prd --extended

# Custom columns
b2c scapi custom status --tenant-id zzxy_prd --columns type,apiName,status,sites

# Debug failed registrations
b2c scapi custom status --tenant-id zzxy_prd --status not_registered --columns type,apiName,endpointPath,errorReason

# Output as JSON
b2c scapi custom status --tenant-id zzxy_prd --json

Output

Default table output:

Active code version: version1
Found 5 endpoint(s):

Type     API Name      Path        Method  Status
───────────────────────────────────────────────────────────
Shopper  loyalty-info  /customers  GET     active
Shopper  loyalty-info  /points     GET     active
Admin    inventory     /stock      GET     active
Admin    inventory     /stock      PUT     active
Shopper  wishlist      /items      POST    not_registered

Grouped by type:

Admin APIs:
API Name   Path    Method  Status
─────────────────────────────────────────
inventory  /stock  GET     active
inventory  /stock  PUT     active

Shopper APIs:
API Name      Path        Method  Status
─────────────────────────────────────────────
loyalty-info  /customers  GET     active
loyalty-info  /points     GET     active
wishlist      /items      POST    not_registered

Grouped by site:

Site: RefArch
Type     API Name      Path        Method  Status
───────────────────────────────────────────────────────────
Shopper  loyalty-info  /customers  GET     active
Shopper  loyalty-info  /points     GET     active
Admin    inventory     /stock      GET     active

Site: SiteGenesis
Type     API Name   Path    Method  Status
─────────────────────────────────────────────────
Admin    inventory  /stock  GET     active
Admin    inventory  /stock  PUT     active

Notes

  • Endpoints are rolled up by site: if the same endpoint is active on multiple sites, the sites are combined into a comma-separated list (visible with --extended or --columns sites)
  • The errorReason column (extended) shows why an endpoint failed to register
  • Use --group-by site to see which endpoints are deployed to each site