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

Start a new Claude Code session. To install for the current project only, run it from your project directory with --scope project.

Manual MCP setup
bash
claude mcp add --transport stdio --scope user b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new session. To configure the current project only, run it from your project directory with --scope project. 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

Run:

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

Start a new Gemini CLI session. To configure the current project only, run it from your project directory with --scope project. See Gemini CLI MCP setup.

No separate skills plugins needed.

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

CIP Commands ​

Use b2c cip to query Commerce Intelligence Platform (CIP/CCAC) analytics data.

Production and Non-Production Hosts

By default, CIP uses the production analytics host for tenants ending in _prd and the staging analytics host for other tenant IDs. Use --staging to force the staging host, or --cip-host for an explicit override.

Command Overview ​

CommandDescription
b2c cip tablesList tables from the CIP metadata catalog
b2c cip describe <table>Describe columns for a CIP table
b2c cip queryRun raw SQL (argument, file, or stdin)
b2c cip reportReport topic help and report command discovery
b2c cip report listList the curated report catalog by category
b2c cip report <report-command>Run a curated report command

Availability

These commands target Commerce Cloud Analytics (CCAC) data and are primarily used with production analytics tenants. Non-production access is available when Reports & Dashboards data tracking is enabled for supported 26.1+ environments.

Authentication ​

CIP commands use OAuth client credentials only.

RequirementHow to provide
Client ID--client-id or SFCC_CLIENT_ID
Client Secret--client-secret or SFCC_CLIENT_SECRET
Tenant (CIP instance)--tenant-id or SFCC_TENANT_ID

Your API client must include the Salesforce Commerce API role with a tenant filter that includes your target instance.

Connection and Output Flags ​

These flags are available on cip tables, cip describe, cip query, and cip report subcommands:

FlagDescriptionDefault
--formatOutput format: table, csv, jsontable
--fetch-sizeFrame fetch size for paging1000
--cip-hostCIP host overridejdbc.analytics.commercecloud.salesforce.com
--stagingUse staging analytics hostfalse
--jsonOutput result as JSONfalse

Query and Report Date Flags ​

These flags are available on cip query and cip report <report-command> commands:

FlagDescriptionDefault
--fromInclusive start date (YYYY-MM-DD)First day of current month
--toInclusive end date (YYYY-MM-DD)Today

b2c cip tables ​

List tables from the CIP metadata catalog.

Usage ​

bash
b2c cip tables [flags]

Flags ​

FlagDescription
--schemaMetadata schema to inspect (default: warehouse)
--patternTable name pattern using SQL LIKE semantics
--allInclude all table types (default filters to TABLE)

Examples ​

bash
# List warehouse tables
b2c cip tables --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

# Filter by table prefix
b2c cip tables --tenant-id zzxy_prd --pattern "ccdw_aggr_%" --client-id <client-id> --client-secret <client-secret>

# Include metadata/system tables
b2c cip tables --tenant-id zzxy_prd --schema metadata --all --client-id <client-id> --client-secret <client-secret>

b2c cip describe ​

Describe table columns using CIP metadata catalog.

Usage ​

bash
b2c cip describe <table> [flags]

Flags ​

FlagDescription
--schemaMetadata schema containing the table (default: warehouse)

Examples ​

bash
# Describe a warehouse table
b2c cip describe ccdw_aggr_ocapi_request --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

# Describe metadata system table
b2c cip describe COLUMNS --schema metadata --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

b2c cip query ​

Run raw SQL directly against CIP.

Usage ​

bash
b2c cip query [SQL] [flags]

SQL Input Sources ​

Provide SQL from exactly one source:

  1. Positional argument (b2c cip query "SELECT ...")
  2. --file <path>
  3. Piped stdin (for example cat query.sql | b2c cip query ...)

Query-Specific Flags ​

FlagDescription
--file, -fRead SQL query from file

Placeholders ​

cip query supports placeholder substitution:

  • <FROM> is replaced by --from
  • <TO> is replaced by --to

Examples ​

bash
# Inline SQL argument
b2c cip query \
  --tenant-id zzxy_prd \
  --client-id <client-id> \
  --client-secret <client-secret> \
  "SELECT submit_date, num_orders FROM ccdw_aggr_sales_summary LIMIT 10"

# Non-production / staging analytics host
b2c cip query \
  --tenant-id zzxy_stg \
  --staging \
  --client-id <client-id> \
  --client-secret <client-secret> \
  "SELECT submit_date, num_orders FROM ccdw_aggr_sales_summary LIMIT 10"

# Read SQL from file
b2c cip query --file ./query.sql --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

# Read SQL from stdin
cat ./query.sql | b2c cip query --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

b2c cip report ​

Run curated reports using dedicated subcommands.

Usage ​

bash
b2c cip report --help
b2c cip report <report-command> [flags]

Shared Report Flags ​

FlagDescription
--describeShow report metadata and parameter contract
--sqlPrint generated SQL and exit

Use --sql to pipe into cip query:

bash
b2c cip report sales-analytics --site-id Sites-RefArch-Site --sql \
  | b2c cip query --tenant-id zzxy_prd --client-id <client-id> --client-secret <client-secret>

Discovering Reports ​

List the full catalog grouped by category (no credentials required):

bash
b2c cip report list
b2c cip report list --category "Technical Analytics"
b2c cip report list --json

Report Commands ​

Report flags are derived from each report's parameter contract — run b2c cip report <command> --describe to see the exact flags and which are required.

Sales Analytics

CommandDescriptionExtra Flags
sales-analyticsDaily sales performance with AOV/AOS--site-id
sales-summaryDetailed sales records--site-id (optional)
revenue-by-channelRevenue/AOV/discount by channel/device/locale--site-id, --limit

Technical Analytics

CommandDescriptionExtra Flags
ocapi-requestsOCAPI request volume and latency--site-id
ocapi-client-usageOCAPI volume, error rate, latency per client_id--site-id (optional), --limit
scapi-traffic-latencySCAPI endpoints by volume and average latency--site-id (optional), --limit
scapi-error-rate-by-statusSCAPI endpoints by 4xx/5xx error rate--site-id (optional), --status-class, --limit
scapi-latency-distributionSCAPI latency histogram + slow-tail (SLA) percentage--site-id (optional), --limit
scapi-cache-hit-ratioSCAPI cache hit ratio per endpoint--site-id (optional), --limit
controller-health-scorecardSFRA controller volume/errors/slow-tail/cache--site-id, --limit
controller-error-rate-trendDaily 4xx/5xx error rate per controller--site-id, --limit
remote-include-performanceRemote-include child controllers by parent page--site-id, --limit

Product, Promotion & Search

CommandDescriptionExtra Flags
top-selling-productsTop products by units/revenue--site-id
product-co-purchase-analysisFrequently co-purchased products--site-id
recommender-effectivenessRecommender engagement and ROI--site-id, --limit
promotion-discount-analysisPromotion discount impactnone
promotion-roi-leaderboardPromotions by revenue per discount $--site-id, --limit
discount-depth-breakdownPromotional vs manual discount split--site-id
search-query-performanceSearch revenue and conversion metrics--site-id, --has-results
zero-result-searchesSearch terms returning no results--site-id, --limit

Customer, Traffic & Inventory

CommandDescriptionExtra Flags
customer-registration-trendsRegistration trends by date/device--site-id
new-vs-returning-buyer-revenueFirst-time vs returning buyer revenue--site-id
payment-method-performancePayment method adoption/performance--site-id
top-referrersReferrer traffic share--site-id, --limit
checkout-funnel-dropoffVisits and drop-off per checkout step--site-id
bot-traffic-shareBot vs human visit share by day--site-id, --limit
inventory-stockout-by-locationOut-of-stock / low-stock SKUs by location--threshold, --limit

Technical reports and latency buckets

The SCAPI/OCAPI/controller request tables record a response-time histogram (num_requests_bucket1..11, fastest to slowest). The *-latency-distribution and *-health-scorecard reports use these buckets to surface the slow-tail percentage that a plain average latency hides. SCAPI traffic is often attributed to a headless site (or no site at all), so --site-id is optional on SCAPI reports — omit it to span all sites.

Site ID Format ​

For report commands that accept --site-id, the common CIP format is:

Sites-{siteId}-Site

If your value does not match this pattern, the command warns and still uses your provided value.

Examples ​

bash
# Run a report
b2c cip report sales-analytics \
  --site-id Sites-RefArch-Site \
  --from 2025-01-01 \
  --to 2025-01-31 \
  --tenant-id zzxy_prd \
  --client-id <client-id> \
  --client-secret <client-secret>

# Show report parameter contract
b2c cip report top-referrers --describe

# Generate SQL only
b2c cip report top-referrers --site-id Sites-RefArch-Site --limit 25 --sql

# Technical: SCAPI latency distribution (slow-tail %), all sites
b2c cip report scapi-latency-distribution \
  --tenant-id zzxy_prd --from 2025-01-01 --to 2025-01-31

# Technical: SCAPI endpoints by 5xx error rate
b2c cip report scapi-error-rate-by-status \
  --tenant-id zzxy_prd --from 2025-01-01 --to 2025-01-31 --status-class 5xx

# Technical: SFRA controller health scorecard
b2c cip report controller-health-scorecard \
  --tenant-id zzxy_prd --site-id Sites-RefArch-Site --from 2025-01-01 --to 2025-01-31

# Inventory: low/out-of-stock SKUs by location
b2c cip report inventory-stockout-by-location \
  --tenant-id zzxy_prd --from 2025-01-01 --to 2025-01-31 --threshold 10

Output Formats ​

Both cip query and report commands support:

  • --format table (default)
  • --format csv (writes CSV to stdout)
  • --format json (writes JSON to stdout)
  • --json (global JSON mode; available on all CIP commands)