salesforcecommercecloud/b2c-developer-tooling
Overview
This skill guides the creation of new CLI commands and topics for the B2C CLI using oclif and the B2C Tooling SDK. It explains command placement, class hierarchy, common flag patterns, table rendering, i18n, validation, client access, and error handling. The goal is to provide a repeatable template and checklist so new commands are consistent, testable, and JSON-friendly.
How this skill works
Commands are added as TypeScript files under packages/b2c-cli/src/commands, with the directory structure mapping directly to command names. Choose the appropriate base class from the B2C Tooling SDK (InstanceCommand, MrtCommand, OdsCommand, etc.) to get built-in validation, clients, and helpers. Follow the standard command template: define description, examples, args, flags, enable JSON output, implement run() with API calls and error handling, and use the provided table and i18n utilities for consistent output.
When to use it
- Adding a new top-level command or nested topic for B2C CLI functionality
- Implementing commands that interact with instances, WebDAV, OCAPI, MRT, or ODS APIs
- Creating commands that must support both human and --json output
- Standardizing flag behaviors, table output, and internationalized messages
- Building commands that require credential or environment validation
Best practices
- Place command files under packages/b2c-cli/src/commands mirroring the command namespace
- Extend the most specific base class to reuse validation and client helpers
- Set static enableJsonFlag = true and return structured objects for JSON mode
- Use the t() i18n helper for all user-facing strings and follow keys commands.<topic>.<command>.<key>
- Destructure response with error on API calls and use getApiErrorMessage for clean error text
- Use TableRenderer.createTable and column defs for consistent, extendable tabular output
Example use cases
- Add b2c code deploy to upload and activate a code version via OCAPI and WebDAV
- Create b2c sandbox create to provision on-demand sandboxes via the ODS client
- Implement b2c mrt env var set to manage MRT project environment variables
- Build a b2c job run command that uses JobCommand helpers to trigger and poll jobs
- Add a b2c site list command that renders site metadata with table columns and --extended
FAQ
Pick the most specific base class that provides the validation and clients you need (InstanceCommand for instance-level ops, MrtCommand for MRT API, OdsCommand for sandbox APIs). This avoids reimplementing credential checks and client initialization.
How should I handle errors from API calls?
Always destructure {data, error, response} and use getApiErrorMessage(error, response) to produce clear messages. Call this.error(...) for fatal errors or this.warn(...) for non-fatal issues.
24 skills
This skill helps you create and organize new B2C CLI commands and topics with structured templates for faster, reliable tooling.
This skill helps you manage order lifecycles, create and place orders, handle failures, and query status using the B2C OrderMgr API.
This skill helps you generate typed API clients from OpenAPI specs with OAuth scope management and middleware for authentication and logging.
This skill helps you verify Custom SCAPI endpoint registration status using the b2c cli across tenants, accelerating debugging and deployment validation.
This skill helps you author and debug ISML templates for Salesforce B2C Commerce, using isprint, isloop, and isinclude to render dynamic storefront content.
This skill helps you manage Salesforce B2C On-demand sandboxes using the b2c CLI, including create, start, stop, and delete with safeguards.
This skill guides you to consume Salesforce Shopper APIs efficiently, enabling product, search, baskets, orders, and context management for headless
This skill helps you manage files on B2C Commerce WebDAV from the command line, enabling listing, uploading, downloading, and folder operations.
This skill guides you in creating and maintaining user-facing agent skills, including SKILL.md frontmatter, structure, and discoverability.
This skill helps you manage SLAS shoppers clients with the b2c CLI, enabling custom scopes, PWA setups, and token debugging.
This skill helps you quickly search and read Salesforce B2C Script API docs and XSD schemas using the b2c CLI to write and validate scripts.
This skill simplifies importing and exporting Salesforce B2C Commerce site archives, metadata, and configurations to streamline custom attributes, preferences,
This skill helps you implement and manage B2C hooks across OCAPI, SCAPI, and system extensions to customize commerce workflows.
This skill helps you define and manage B2C Commerce site metadata XML for custom attributes, objects, and site preferences.
This skill helps you troubleshoot b2c configuration by inspecting sources, validating credentials, and managing named instances for reliable authentication.
This skill guides you in creating storefront controllers for SFRA or classic B2C patterns to handle requests, render responses, and generate URLs.
This skill lets you run and monitor existing B2C jobs with the b2c CLI, streamlining batch processing and log retrieval.
This skill helps you explore and retrieve SCAPI OpenAPI schemas using the b2c CLI, clarifying available endpoints and data models for B2C commerce.
This skill helps you deploy, monitor, and manage Salesforce B2C code versions using the b2c CLI, simplifying cartridge workflows.
This skill helps you manage B2C eCDN settings and operations using the b2c CLI, including zones, certificates, and security configurations.
This skill retrieves and monitors Salesforce B2C Commerce logs, enabling rapid error detection and contextual debugging across services.
This skill helps you create and customize Business Manager extension cartridges for B2C Commerce, enabling menus, dialogs, forms, and templates.
This skill helps you design and deploy custom B2C SCAPI endpoints with schema.yaml, api.json mappings, and TypeScript implementations.
This skill generates B2C Commerce cartridges, controllers, hooks, APIs, job steps, and Page Designer components from scaffold templates to accelerate project