b2c-code_skill

This skill helps you deploy, monitor, and manage Salesforce B2C code versions using the b2c CLI, simplifying cartridge workflows.
  • TypeScript

20

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill salesforcecommercecloud/b2c-developer-tooling --skill b2c-code

  • SKILL.md2.5 KB

Overview

This skill provides a command-line interface for deploying and managing code versions and cartridges on Salesforce B2C Commerce instances using the b2c CLI. It streamlines uploading cartridges, activating or reloading code versions, watching file changes during development, and automating CI/CD tasks. Use it to reduce manual WebDAV operations and ensure Custom API endpoints are registered after deployments.

How this skill works

The skill wraps the b2c CLI commands to upload cartridges, list and activate code versions, delete versions, and watch source directories for changes. It supports targeting specific servers and code versions, including options to delete existing cartridges, exclude or include specific cartridges, and trigger a reload to register Custom APIs. Watch mode monitors files and pushes incremental updates during development or CI runs.

When to use it

  • Deploy cartridge sets to a sandbox or instance.
  • Activate or reload a code version after code or Custom API changes.
  • Continuously upload changes during local development with watch mode.
  • Run automated deployments in CI/CD pipelines.
  • Remove or clean up old code versions on an instance.

Best practices

  • Use --reload when adding or changing Custom APIs to ensure registration occurs.
  • Specify cartridges (-c) or exclusions (-x) to limit upload scope and speed up deployments.
  • In CI, run b2c code list and validate the expected code versions before and after activation.
  • Combine --delete with deploy cautiously to avoid losing needed files; test in a sandbox first.
  • Use watch mode for fast iterative development, but switch to full deploy in staging/CI for consistent artifacts.

Example use cases

  • Push the storefront and plugin cartridges to a developer sandbox: b2c code deploy -c app_storefront_base -c plugin_applepay.
  • Run an automated pipeline step that deploys, deletes old cartridges, and reloads the target code version.
  • Activate a new release on a staging instance: b2c code activate v2 --server staging.example.demandware.net.
  • Locally develop a cartridge and have changes uploaded automatically: b2c code watch ./cartridges -c my_cartridge.
  • List code versions in JSON for scripting and validation: b2c code list --json.

FAQ

No. If b2c is not installed globally, run it via npx: npx @salesforce/b2c-cli code <command>.

When should I use --reload?

Use --reload when you add or modify Custom API endpoints or when you need the instance to re-register APIs and server-side hooks after deployment.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational