From b2c-cli
Queries B2C Commerce Intelligence (CIP) for analytics reports and custom SQL — sales, search, payment, API performance, cache hit ratios, and more.
How this skill is triggered — by the user, by Claude, or both
Slash command
/b2c-cli:b2c-cipThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use `b2c cip` commands to query B2C Commerce Intelligence (CIP), also known as Commerce Cloud Analytics (CCAC).
Use b2c cip commands to query B2C Commerce Intelligence (CIP), also known as Commerce Cloud Analytics (CCAC).
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cli.
cip
├── tables - list metadata catalog tables
├── describe <table> - describe table columns
├── query - raw SQL execution
└── report - curated report topic
├── list - list the catalog grouped by category
├── Sales: sales-analytics, sales-summary, revenue-by-channel
├── Technical: ocapi-requests, ocapi-client-usage, scapi-traffic-latency,
│ scapi-error-rate-by-status, scapi-latency-distribution,
│ scapi-cache-hit-ratio, controller-health-scorecard,
│ controller-error-rate-trend, remote-include-performance
├── Product: top-selling-products, product-co-purchase-analysis, recommender-effectiveness
├── Promotion: promotion-discount-analysis, promotion-roi-leaderboard, discount-depth-breakdown
├── Search: search-query-performance, zero-result-searches
├── Customer: customer-registration-trends, new-vs-returning-buyer-revenue
├── Payment: payment-method-performance
├── Traffic: top-referrers, checkout-funnel-dropoff, bot-traffic-share
└── Inventory: inventory-stockout-by-location
Run b2c cip report list (or --help) for the live catalog; each report's exact flags come from b2c cip report <name> --describe.
Values like tenantId, clientId, and clientSecret resolve from dw.json / SFCC_* env vars / the active instance / configuration plugins. Examples below show minimal usage; add flags only to override configured values — passing --client-id/--client-secret/--tenant-id is usually unnecessary. If a required value is missing, the CLI emits an actionable error pointing at the flag, env var, and config key.
Run b2c setup inspect to see the resolved configuration and which source provided each value (--json for scripting, --unmask to reveal secrets). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
Relevant overrides:
--tenant-id (alias --tenant) / SFCC_TENANT_ID / tenantId--client-id / SFCC_CLIENT_ID / clientId--client-secret / SFCC_CLIENT_SECRET / clientSecret--cip-host / SFCC_CIP_HOST to override the default host--staging / SFCC_CIP_STAGING to force staging analytics host--user-auth is not supported)Salesforce Commerce API role with tenant filter for your instance::: warning Availability
This feature is typically used with production analytics tenants (for example abcd_prd).
Starting with release 26.1, reports and dashboards data can also be enabled for non-production instances (ODS/dev/staging and designated test realms) using the Enable Reports & Dashboards Data Tracking feature switch.
Reports & Dashboards non-production URL: https://ccac.stg.analytics.commercecloud.salesforce.com
:::
b2c cip tables) or curated reports (b2c cip report --help).b2c cip describe <table> or report --describe to inspect structure/parameters.--sql to preview generated SQL.cip query when you need custom execution/output handling.# List warehouse tables (uses configured tenant)
b2c cip tables
# Filter table names
b2c cip tables --pattern "ccdw_aggr_%"
# Describe table columns
b2c cip describe ccdw_aggr_ocapi_request
# Target a different tenant than the active config
b2c cip tables --tenant-id abcd_prd
For an efficient table catalog grouped by aggregate/dimension/fact families, use:
references/KNOWN_TABLES.mdFor a general-purpose starter query pack with ready-to-run SQL patterns, use:
references/STARTER_QUERIES.mdThe list is derived from official JDBC documentation and intended as a quick discovery aid.
# Discover the catalog grouped by category (no credentials needed)
b2c cip report list
b2c cip report list --category "Technical Analytics"
# Run a report (tenant resolves from config)
b2c cip report sales-analytics \
--site-id Sites-RefArch-Site \
--from 2025-01-01 \
--to 2025-01-31
# Show report parameter contract (flags are auto-derived per report)
b2c cip report top-referrers --describe
# Print generated SQL and stop
b2c cip report top-referrers --site-id Sites-RefArch-Site --limit 25 --sql
# Force staging analytics host
b2c cip report top-referrers --site-id Sites-RefArch-Site --limit 25 --staging --sql
These analyze SCAPI, OCAPI, and SFRA controller request data. The request tables carry a
response-time histogram (num_requests_bucket1..11, fastest→slowest), so the latency-distribution
and health-scorecard reports surface the slow-tail percentage that a plain average hides.
SCAPI traffic is often attributed to a headless site (or no site), so --site-id is optional on
SCAPI reports — omit it to span all sites.
# SCAPI latency distribution + slow-tail %, all sites
b2c cip report scapi-latency-distribution --from 2025-01-01 --to 2025-01-31
# SCAPI endpoints ranked by 5xx error rate
b2c cip report scapi-error-rate-by-status --from 2025-01-01 --to 2025-01-31 --status-class 5xx
# SCAPI cache hit ratio (find cacheable endpoints running as MISS)
b2c cip report scapi-cache-hit-ratio --from 2025-01-01 --to 2025-01-31
# OCAPI usage per integration client_id
b2c cip report ocapi-client-usage --from 2025-01-01 --to 2025-01-31
# SFRA controller health scorecard / daily error-rate trend
b2c cip report controller-health-scorecard --site-id Sites-RefArch-Site --from 2025-01-01 --to 2025-01-31
b2c cip report controller-error-rate-trend --site-id Sites-RefArch-Site --from 2025-01-01 --to 2025-01-31
b2c cip report sales-analytics --site-id Sites-RefArch-Site --sql \
| b2c cip query
b2c cip query "SELECT * FROM ccdw_aggr_sales_summary LIMIT 10"
You can also use:
--file ./query.sqlcat query.sql | b2c cip query ...)b2c cip query supports placeholder replacement:
<FROM> with --from YYYY-MM-DD<TO> with --to YYYY-MM-DD--from defaults to first day of current month--to defaults to todayIf you provide --site-id, the common CIP format is Sites-{siteId}-Site. The command warns when siteId does not match that pattern but still runs with your input.
Both raw query and report commands support:
--format table (default)--format csv--format json--json (global JSON mode)The underlying JDBC analytics service has strict limits. Keep requests scoped:
SELECT * queriesLimits can change over time. Use the official JDBC access guide for current NFR limits:
tenant-id is required: set --tenant-id (or SFCC_TENANT_ID)--user-authFor full command reference, use b2c cip --help and CLI docs.
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cliQueries Salesforce Commerce Cloud observability metrics: request volume, latency, error rates, cache performance, sales, eCDN, and third-party integrations.
Calculates business metrics like total revenue, CLV, conversion rates, and cross-channel analytics from Wix eCommerce, Events, and Bookings APIs using bash and jq.
Analyzes D2C ecommerce order data with a bundled Python engine: KPIs, pass/watch/fail health checks, period comparisons. Interprets results as a full business review or answers focused questions.