/b2c-cli:b2c-docsfrom b2c-cli
Searches and reads B2C Commerce documentation via the b2c CLI, covering Script API, Developer Center guides, Salesforce Help, tooling docs, job steps, and XSD schemas. Use for any B2C Commerce developer or admin question.
Ships in b2c-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill for ANY B2C Commerce developer or administrator question that is not already grounded in a loaded skill or the current project context. The docs corpus covers Script API reference, Commerce API (SCAPI/OCAPI) integration patterns, storefront framework guides (SFRA, PWA Kit, Storefront Next), Business Manager administration and merchandising (Salesforce Help), job step parameters, authentication flows, and tooling configuration.
Use the b2c CLI to search and read B2C Commerce documentation spanning multiple corpora: Script API reference (dw.* classes/modules), Developer Center guides (conceptual and how-to content across Commerce API, PWA Kit, SFRA, and more), Salesforce Help (Business Manager administration and merchandising content from help.salesforce.com), tooling documentation (this project's own guides), the standard (system) job step catalog, and XSD schemas.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli docs search ProductMgr).
MCP parity: If the
b2c-dx-mcpserver is connected, its docs tools —docs_search,docs_read,docs_list,docs_schema_search,docs_schema_read, anddocs_schema_list— cover the same corpus with the same search, workspace-awareness, and topic-scoping behavior described here;validate_xml_schemamatchesb2c validate.
--category to narrow results to a specific corpus (e.g., commerce-api, pwa-kit-managed-runtime, sfra, script-api, help-admin, help-merchant, help-kb)category, summary, keywords, and url to help identify the right match without reading full contenturl (human-facing .html page) and sourceUrl (raw .md source). Script API entries link developer.salesforce.com; Salesforce Help entries link the live help.salesforce.com article while content is served from a raw markdown mirror. Content is fetched via sourceUrl with offline fallbackrelatedEntries; Salesforce Help landing entries use the same field for linked child articles and include a matching Related Content section in their raw Markdown--topics flag or SFCC_DOCS_TOPICS env var, or the docsCategories config field (dw.json docs-categories, SFCC_DOCS_CATEGORIES, package.json). The MCP server has a --docs-topics startup flag# Search across all documentation
b2c docs search "passwordless login"
# Filter by category for targeted results
b2c docs search "passwordless login" --category commerce-api
# Search Developer Center guides
b2c docs search "storefront components" --category sfra
b2c docs search "deploy bundle" --category pwa-kit-managed-runtime
# Search Script API reference
b2c docs search ProductMgr --category script-api
b2c docs search "catalog product"
# Find a standard job step by type ID
b2c docs search ImportCatalog
# Search Salesforce Help — administration (import/export, jobs, security, Account Manager)
b2c docs search "site import export" --category help-admin
# Search Salesforce Help — merchandising (catalogs, promotions, search, pricing)
b2c docs search "price book assignment" --category help-merchant
# Search Salesforce Help Knowledge Articles — troubleshooting, known issues, how-to answers
b2c docs search "code upload certificate hyperforce" --category help-kb
# Search tooling documentation
b2c docs search "authentication setup" --category tooling
b2c docs search "import set" --category tooling
# Limit results (CLI default is 20, MCP default is 5)
b2c docs search authentication --limit 5
# Read the next page of ranked results
b2c docs search authentication --limit 5 --offset 5
# Show extended fields (url, sourceUrl, summary, keywords)
b2c docs search authentication --columns id,title,category,url,summary
# or use -x for extended output
b2c docs search authentication -x
# Workspace awareness is ON by default — search auto-detects the project type
b2c docs search "components"
# Opt out of workspace awareness
b2c docs search "components" --workspace all
# Force auto-detection explicitly
b2c docs search "hooks" --workspace auto
# Search with specific workspace types (boosts relevant docs)
b2c docs search "page designer" --workspace sfra
# Search with multiple workspace types (union of their boost categories)
b2c docs search "checkout" --workspace cartridges,pwa-kit-v3
# List all available documentation
b2c docs search --list
# List entries in a specific category
b2c docs search --list --category commerce-api
# List docs relevant to a specific workspace (list does not auto-detect)
b2c docs search --list --workspace cartridges
# Bound the entire corpus to specific topics (allowlist; env: SFCC_DOCS_TOPICS)
b2c docs search "login" --topics sfnext,commerce-api
--topicsvs--category:--categoryfilters a single query;--topics(CLI flag orSFCC_DOCS_TOPICSenv var) is an allowlist that bounds the entire available corpus —--category/--workspacenarrow within it, anddocs readwon't resolve an id outside it. Pin it to expose only the docs relevant to your project. The MCP server has an equivalent--docs-topicsstartup flag andSFCC_DOCS_TOPICSenv var.
The docs search understands which workspace framework your project uses and automatically favors relevant documentation. This helps surface the right guides for SFRA, PWA Kit, or Storefront Next projects, and is on by default.
How it works:
docs search detects the project type from the workspace structure automatically; pass --workspace auto to force it explicitlycartridges, sfra, pwa-kit-v3, or storefront-next. Multiple types union their boost categories--workspace all to search without any workspace preferenceCategory boost mapping:
b2c-commerce, commerce-solutions, ocapi, toolingcartridges → script-api, job-stepsfra → sfrapwa-kit-v3 → pwa-kit-managed-runtime, commerce-apistorefront-next → sfnext, commerce-apiDe-boost competing frameworks: When a workspace is detected or specified, the search engine de-boosts (x0.3) storefront framework guides that are NOT the current one. For example, if workspace is sfra, then pwa-kit-managed-runtime and sfnext categories are de-boosted; this reweights results without hiding them.
SFRA vs cartridges distinction: A SFRA project is detected as both cartridges and sfra (SFRA is a refinement — it has the app_storefront_base cartridge). A cartridge project that is not SFRA (custom API cartridges, or a PWA Kit / Storefront Next repo that also ships cartridges) is cartridges only — so it will not boost sfra docs.
A detected or specified workspace always boosts relevant docs (ranks them higher) but never hides categories. To hard-scope results to a category, use --category or --topics.
--list behavior: When using --list to browse the catalog, workspace auto-detection is disabled — the list shows the full corpus unless you explicitly pass --workspace <type> to narrow it.
Examples:
# Auto-detect and boost relevant docs (default behavior)
b2c docs search "components"
# Search with specific workspace type
b2c docs search "checkout" --workspace sfra
# Search with multiple workspace types
b2c docs search "deploy" --workspace pwa-kit-v3,storefront-next
# Read Script API documentation
b2c docs read ProductMgr
b2c docs read dw.catalog.ProductMgr
# Read Developer Center guides by namespaced ID
b2c docs read sfnext/sfnext-get-started
b2c docs read commerce-api/slas-passwordless-login-registration
b2c docs read pwa-kit-managed-runtime/getting-started
# Read Salesforce Help articles by namespaced ID
b2c docs read help-admin/b2c_site_import_export
b2c docs read help-merchant/b2c_creating_price_books
b2c docs read help-kb/002772125
# Read tooling guides
b2c docs read guide-authentication
b2c docs read guide-configuration
# Output raw markdown (for piping)
b2c docs read ProductMgr --raw
# Output as JSON
b2c docs read ProductMgr --json
Exact vs. fuzzy match:
docs readresolves an exact id deterministically (e.g.dw.catalog.ProductMgr). For a fuzzy query (e.g.productmgr) it applies the same workspace-aware ranking asdocs search— so a fuzzy read resolves the same top hit search ranks first. Pass--workspace allto opt out.
Content sources: Script API, Developer Center guides, Salesforce Help, and tooling docs are fetched online from the .md source (sourceUrl) and cached locally, with a graceful offline fallback (summary + headings + both URLs). Only standard job steps are bundled in the CLI.
To retrieve the human-facing .html page URL (for citing/opening in browser) or the raw .md source URL, use --json output or --columns url,sourceUrl in search results.
The bundled corpus includes the catalog of standard (system) job step type IDs — the built-in steps (for example ImportCatalog, ExportCatalog, ImportInventoryLists) added to Business Manager job flows. Each step's page lists its purpose and configuration parameters (required, defaults, allowed values).
# Read the catalog overview (all standard step type IDs)
b2c docs read job-steps
# Read a specific step's purpose + configuration parameters
b2c docs read ImportCatalog
# Search for a step
b2c docs search "import price"
b2c docs search ExportInventoryLists --category job-step
For how standard steps fit into job flows — chaining with custom steps, IMPEX file hand-off, and when to use an in-flow step vs. the CLI equivalent — see the b2c:b2c-custom-job-steps and b2c-cli:b2c-job skills.
Download the latest Script API documentation from a B2C Commerce instance. The CLI auto-discovers the target server and credentials from dw.json, SFCC_* env vars, and configuration plugins — --server is only needed to override. Run b2c setup inspect to confirm what the CLI sees; see the b2c-cli:b2c-config skill for troubleshooting.
# Download to a directory (uses configured instance)
b2c docs download ./my-docs
# Override server explicitly
b2c docs download ./docs --server sandbox.demandware.net
# Keep the original archive
b2c docs download ./docs --keep-archive
Read bundled XSD schema files for import/export data formats:
# Read a schema by name
b2c docs schema catalog
# Fuzzy match schema name
b2c docs schema order
# List all available schemas
b2c docs schema --list
# Print the filesystem path to the schema file
b2c docs schema catalog --path
b2c validate checks import/export XML against these schemas offline, choosing each file's schema from its root element namespace. Unrecognized files found in a directory are skipped; malformed or invalid files fail with line numbers and exit status 1.
# Validate a site archive directory or specific files
b2c validate ./site_template
b2c validate my-catalog.xml
# Force a schema, or use your own XSD
b2c validate export.xml --schema catalog
b2c validate data.xml --schema ./custom.xsd
# JSON results (per-file status, schema, and errors with line numbers)
b2c validate ./site_template --json
| Category | Description | Example IDs |
|---|---|---|
script-api | Server-side Script API reference (dw.* classes/modules) | dw.catalog.ProductMgr, dw.order.Basket |
commerce-api | Commerce API (SCAPI/OCAPI) conceptual and how-to guides | commerce-api/slas-passwordless-login-registration |
pwa-kit-managed-runtime | PWA Kit and Managed Runtime (MRT) guides | pwa-kit-managed-runtime/getting-started |
sfra | Storefront Reference Architecture (SFRA) guides | sfra/controllers-and-routes |
sfnext | Storefront Next guides | sfnext/sfnext-get-started |
b2c-commerce | General B2C Commerce platform guides | b2c-commerce/business-manager-overview |
commerce-solutions | B2C Commerce Solutions — bot management, caching strategies, flash-sale traffic, and industry solutions | commerce-solutions/bot-management |
ocapi | OCAPI reference — usage, hooks, settings, and best practices for the Open Commerce API | ocapi/ocapisettings, ocapi/bestpractices |
tooling | B2C CLI reference, guides, MCP docs, SDK guidance, and VS Code extension docs | guide-authentication, cli-jobs |
job-step | Standard (system) job step catalog | ImportCatalog, ExportCatalog, job-steps |
help-admin | Salesforce Help — administration/ops (import/export, jobs, replication, security, Account Manager, permissions, logs, inventory) | help-admin/b2c_site_import_export |
help-merchant | Salesforce Help — merchandising (catalogs, products, promotions, search, content, analytics, SEO) | help-merchant/b2c_creating_price_books |
help-kb | Salesforce Help Knowledge Articles — troubleshooting, known issues, and how-to answers (keyed by article number) | help-kb/002772125 |
URLs: All categories except
job-stepcarry bothurl(human .html page) andsourceUrl(machine-readable .md). Forhelp-admin/help-merchant/help-kb,urlis the live help.salesforce.com article and content is read fromsourceUrl.job-stepentries have neither (content is bundled inline).Caching: Content for the online corpora (
script-api, the guide categories,help-admin/help-merchant/help-kb,tooling) is fetched ondocs readand cached locally. Useb2c docs cacheto inspect it andb2c docs cache --clearto purge it (forces a re-fetch).
| Class | Description |
|---|---|
dw.catalog.ProductMgr | Product management and queries |
dw.catalog.Product | Product data and attributes |
dw.order.Basket | Shopping basket operations |
dw.order.Order | Order processing |
dw.customer.CustomerMgr | Customer management |
dw.system.Site | Site configuration |
dw.web.URLUtils | URL generation utilities |
| Schema | Description |
|---|---|
catalog | Product catalog import/export |
order | Order data import/export |
customer | Customer data import/export |
inventory | Inventory data import/export |
pricebook | Price book import/export |
promotion | Promotion definitions |
coupon | Coupon codes import/export |
jobs | Job step definitions |
b2c docs search searches documentation. To find which b2c command performs a task, search the CLI's own commands instead:
b2c commands search "deploy cartridges"
b2c commands search "environment variables" --topic mrt --json
The CLI bundles its agent skills (workflow guides like this one). Read the skill for a command or topic, or search them, without installing a plugin:
b2c docs skill # list b2c-cli skills
b2c docs skill code deploy # skill covering a command or topic
b2c docs skill --search "site import" # search skills
b2c docs skill --all --search "hooks" # include b2c, b2c-ops, storefront-next
See b2c docs --help for a full list of available commands and options.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
b2c-commerce, salesforce-commerce, script-api, sfra, pwa-kit, ocapi
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cli28 skills in this plugin
/b2c-amManage Account Manager resources including API clients, users, roles, and organizations. Use this skill whenever the user needs to create or update API clients, onboard or offboard developers, assign Account Manager roles scoped to tenants, audit user permissions, look up organizations, or provision API clients for CI/CD pipelines. Also use when managing AM role assignments or querying Account Manager data — even if they just say "add a new developer" or "set up an API client". For instance-level Business Manager administration (BM roles, BM users, BM access keys, BM whoami), defer to the `b2c-cli:b2c-bm-users-roles` skill./b2c-bm-users-rolesManage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever the user needs to list or search BM users on a sandbox or production instance, identify which BM user an OAuth token resolves to ("whoami"), assign or revoke instance-level access roles, edit role permissions, look up a user's WebDAV / OCAPI / Storefront access key, or rotate access keys for SSO-managed users. Also use when the user asks "what's my BM login on sandbox X", "rotate my WebDAV password", "how do I make a custom BM role", "audit BM users on this instance", or "delete a stale BM user from a sandbox"./b2c-capManage Commerce App Packages (CAPs), also called commerce apps or apps, and commerce features using the b2c CLI. Use this skill whenever the user needs to validate, package, install, uninstall, list, or pull commerce apps on B2C Commerce instances, view configuration tasks, or pull app sources for cartridge deployment or Storefront Next development. Also use when checking which apps are installed on an instance, inspecting app details or versions, or managing app lifecycle — even if they just say "what apps do I have", "list my commerce apps", "which CAPs are installed", "install this app", "pull app sources", or "show installed apps"./b2c-cipQuery CIP/CCAC sales, merchandising, payment, traffic, and API/controller analytics with the B2C CLI or MCP. Discover reports/tables, scope SQL, export results, and resolve analytics access./b2c-codeDeploy, download, and manage cartridge code versions on B2C Commerce instances. Use this skill whenever the user needs to upload or download cartridges to/from a sandbox, activate or delete code versions, watch for local file changes during development, or deploy a subset of cartridges. Also use when pushing code to an instance, pulling code from an instance, or setting up a dev workflow with live reload -- even if they just say 'push my code to the sandbox', 'download the code', or 'how do I activate the new version'./b2c-configConfigure B2C CLI/MCP authentication, instances, and project defaults; troubleshoot missing credentials, wrong targets, or configuration precedence. Routine inspection can use config_inspect or b2c setup inspect directly.Other plugins' skills for the same job