Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/vscode-extension-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@salesforce/b2c-dx-docs': patch
---

Document the B2C DX VS Code Extension. New `/vscode-extension/` section with overview, installation (with a dynamic download link to the latest VSIX release), configuration reference, and a feature tour covering Sandbox Realm Explorer, Cartridge Code Sync, WebDAV Browser, Content Libraries, SCAPI API Browser, B2C Script Debugger, scaffold/CAP install, log tailing, and B2C CLI plugin support.
5 changes: 5 additions & 0 deletions .changeset/vscode-telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'b2c-vs-extension': minor
---

Add anonymous usage telemetry (extension activation/deactivation lifecycle, broad feature-category usage, exceptions) to help prioritize fixes during the Developer Preview. Sending is non-blocking. Honors the new `b2c-dx.telemetry.enabled` setting (default `true`), VS Code's `telemetry.telemetryLevel`, and the `SFCC_DISABLE_TELEMETRY` / `SF_DISABLE_TELEMETRY` environment variables. No credentials, hostnames, or business data are collected.
16 changes: 16 additions & 0 deletions .github/workflows/ci-vs-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ on:
- main
paths:
- 'packages/b2c-vs-extension/**'
- 'packages/b2c-tooling-sdk/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.github/workflows/ci-vs-extension.yml'
pull_request:
branches:
- main
paths:
- 'packages/b2c-vs-extension/**'
- 'packages/b2c-tooling-sdk/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.github/workflows/ci-vs-extension.yml'

permissions:
contents: read
Expand Down Expand Up @@ -51,6 +59,14 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Cache VS Code test binary
uses: actions/cache@v5
with:
path: packages/b2c-vs-extension/.vscode-test
key: ${{ runner.os }}-vscode-test-${{ hashFiles('packages/b2c-vs-extension/.vscode-test.mjs', 'pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-vscode-test-

- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ docs/.vitepress/cache
docs/api/

*dw.json*
!packages/b2c-vs-extension/src/test/fixtures/**/dw.json
.env
.config/wt.toml
.b2c/
Expand Down
12 changes: 11 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ const guidesSidebar = [
{text: 'Commerce Apps (CAPs)', link: '/guide/commerce-apps'},
],
},
{
text: 'VS Code Extension',
items: [
{text: 'Overview', link: '/vscode-extension/'},
{text: 'Installation', link: '/vscode-extension/installation'},
{text: 'Configuration', link: '/vscode-extension/configuration'},
],
},
{
text: 'MCP Server',
items: [
Expand Down Expand Up @@ -197,7 +205,7 @@ document.addEventListener('click', (e) => {

export default defineConfig({
title: 'B2C Developer Toolkit',
description: 'Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, SDK, and IDE extensions for Salesforce B2C Commerce',
description: 'Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, SDK, and the B2C DX VS Code Extension for Salesforce B2C Commerce',
base: basePath,

head: [['script', {}, versionSwitchScript]],
Expand Down Expand Up @@ -263,6 +271,7 @@ export default defineConfig({
nav: [
{text: 'Guides', link: '/guide/'},
{text: 'Skills', link: '/guide/agent-skills'},
{text: 'VS Code', link: '/vscode-extension/'},
{text: 'MCP', link: '/mcp/'},
{text: 'Reference', link: '/cli/'},
{text: 'SDK', link: '/api/'},
Expand All @@ -280,6 +289,7 @@ export default defineConfig({
sidebar: {
'/mcp/tools/': referenceSidebar,
'/mcp/': guidesSidebar,
'/vscode-extension/': guidesSidebar,
'/cli/': referenceSidebar,
'/guide/': guidesSidebar,
'/api/': [
Expand Down
4 changes: 3 additions & 1 deletion docs/guide/ide-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: Configure IDE tooling like Prophet VS Code extension and IntelliJ S

# IDE Integration

This guide explains how to connect IDE extensions to your B2C CLI configuration.
This guide explains how to connect third-party IDE extensions (Prophet, IntelliJ SFCC) to your B2C CLI configuration.

> Looking for the **Salesforce-published B2C DX VS Code Extension**? See the dedicated [VS Code Extension](../vscode-extension/) section — it consumes `dw.json` and the active instance directly, no bridge script required.

## Prophet VS Code Extension

Expand Down
31 changes: 30 additions & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
---
description: Introduction to the Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, and SDK for Salesforce Agentforce Commerce.
description: Introduction to the Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, VS Code extension, and SDK for Salesforce Agentforce Commerce.
---

<script setup>
import {data as vsxRelease} from '../vscode-extension/release.data.ts';
</script>

# Introduction

The Agentic B2C Developer Toolkit exposes the B2C Commerce platform as commands, MCP tools, and coding skills — so you and your AI agents can build, deploy, and operate storefronts from the terminal or directly inside your IDE. No clicking through Business Manager to deploy, no context-switching to run a job, no manual copy-paste when your agent needs to touch a live sandbox.

- **B2C CLI** — a single command for every workflow: cartridge deploys, jobs, ODS/MRT, WebDAV, site archives, SLAS, eCDN, Account Manager, CI/CD.
- **Agent Skills** — 30+ preconfigured skills that teach your coding agent (Claude Code, Cursor, Agentforce Vibes, Copilot, Codex) how B2C Commerce works — SCAPI Custom APIs, SLAS, SFRA controllers and forms, ISML, Page Designer, hooks, custom objects — and which CLI commands to run when.
- **MCP Server** — a focused set of MCP tools that complement the CLI for agent-driven workflows.
- **VS Code Extension** *(Developer Preview)* — sandbox management, cartridge code sync, content libraries, SCAPI explorer, and a server-side script debugger right inside VS Code.
- **Tooling SDK** — everything the CLI does, available as a typed TypeScript SDK for custom integrations.

## Quick CLI Install
Expand Down Expand Up @@ -74,13 +79,37 @@ claude plugin install b2c-dx-mcp --scope project

See the [MCP Server Installation Guide](/mcp/installation) for full setup steps and troubleshooting.

## Quick VS Code Extension Install <Badge type="warning" text="Developer Preview" />

The B2C DX VS Code Extension brings sandbox management, code sync, content libraries, the SCAPI explorer, and a server-side debugger into VS Code. It isn't on the Marketplace yet — install the latest pre-built `.vsix` from GitHub.

<div v-if="!vsxRelease.unavailable">

Latest version: <strong>{{ vsxRelease.version }}</strong> · <a :href="vsxRelease.vsixDownloadUrl">Download {{ vsxRelease.vsixAssetName }}</a> · <a :href="vsxRelease.releasePageUrl">Release notes</a>

```bash
code --install-extension {{ vsxRelease.vsixAssetName }}
# or, in Cursor:
cursor --install-extension {{ vsxRelease.vsixAssetName }}
```

</div>
<div v-else>

The extension hasn't shipped a release yet. Browse the <a :href="vsxRelease.fallbackUrl">GitHub releases page</a> for `b2c-vs-extension@*` tags.

</div>

See the [VS Code Extension](/vscode-extension/) section for the full overview, [installation](/vscode-extension/installation), and [configuration](/vscode-extension/configuration).

## Next Steps

- [Authentication Setup](./authentication) - Set up Account Manager, OCAPI, and WebDAV
- [Analytics Reports (CIP/CCAC)](./analytics-reports-cip-ccac) - Run curated analytics reports and SQL queries
- [Configuration](./configuration) - Configure instances and credentials
- [IDE Integration](./ide-integration) - Connect Prophet VS Code to B2C CLI configuration
- [MCP Server](/mcp/) - AI-assisted development with Model Context Protocol
- [VS Code Extension](/vscode-extension/) - Sandbox management, code sync, and the script debugger inside VS Code
- [CLI Reference](/cli/) - Browse available commands
- [MCP Tools](/mcp/toolsets) - Explore MCP tools for cartridges, MRT, SCAPI, and so on
- [SDK Reference](/api/) - Explore the SDK
47 changes: 42 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ renameNotice:
hero:
name: Agentic B2C Developer Toolkit
text: ""
tagline: CLI, Agent Skills, MCP Server, and IDE extensions for Salesforce Agentforce Commerce — everything you and your coding agent need to build, deploy, and operate B2C Commerce together.
tagline: CLI, Agent Skills, MCP Server, and the B2C DX VS Code Extension for Salesforce Agentforce Commerce — everything you and your coding agent need to build, deploy, and operate B2C Commerce together.
image:
src: /hero-collage.png
alt: Agentic B2C Developer Toolkit — CLI, Agentforce Vibes, and Claude Code
Expand All @@ -22,11 +22,11 @@ hero:
text: Agent Skills
link: /guide/agent-skills
- theme: alt
text: MCP Server
link: /mcp/
text: VS Code
link: /vscode-extension/
- theme: alt
text: Reference
link: /cli/
text: MCP
link: /mcp/

features:
- icon:
Expand All @@ -53,8 +53,20 @@ features:
details: A focused set of MCP tools that complement the CLI for agent-driven workflows. Pairs naturally with skills.
link: /mcp/
linkText: MCP Server
- icon:
src: /icons/cli.svg
width: 48
height: 48
title: VS Code Extension (Developer Preview)
details: B2C DX activity-bar containers for sandbox lifecycle, cartridge code sync, WebDAV, content libraries, SCAPI, and a B2C script debugger — all driven by the same dw.json the CLI uses.
link: /vscode-extension/
linkText: VS Code Extension
---

<script setup>
import {data as vsxRelease} from './vscode-extension/release.data.ts';
</script>

## Install the CLI

::: code-group
Expand Down Expand Up @@ -117,3 +129,28 @@ npx @salesforce/b2c-cli setup skills

:::

## Install the VS Code Extension <Badge type="warning" text="Developer Preview" />

The extension is not yet published to the VS Code Marketplace — install the latest pre-built `.vsix` from GitHub releases.

<div v-if="!vsxRelease.unavailable" class="b2c-vsx-install">
<p>
Latest release: <strong>{{ vsxRelease.version }}</strong>
<span> · </span>
<a :href="vsxRelease.vsixDownloadUrl">Download {{ vsxRelease.vsixAssetName }}</a>
<span> · </span>
<a :href="vsxRelease.releasePageUrl">Release notes</a>
</p>
<p>Then install with:</p>
<pre><code>code --install-extension {{ vsxRelease.vsixAssetName }}
# or, in Cursor:
cursor --install-extension {{ vsxRelease.vsixAssetName }}</code></pre>
</div>
<div v-else>

Browse the [GitHub releases page]({{ vsxRelease.fallbackUrl }}) for `b2c-vs-extension@*` tags and install the `.vsix` via `code --install-extension <file>.vsix`.

</div>

Detailed setup: [Installation](/vscode-extension/installation) · [Configuration](/vscode-extension/configuration)

120 changes: 120 additions & 0 deletions docs/vscode-extension/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
description: Connect the B2C DX VS Code Extension to a B2C Commerce instance — credentials, OAuth, telemetry, and the b2c-dx.* settings reference.
---

# Configuration

The extension reuses the [B2C CLI](../guide/configuration)'s configuration system, so anything that works with `b2c` works here — `dw.json`, `SFCC_*` environment variables, and active-instance selection.

This page covers:

- [Connecting to a B2C Instance](#connecting-to-a-b2c-instance) — credentials per feature.
- [Switching the Active Instance](#switching-the-active-instance) — single-workspace, multi-instance.
- [Settings Reference](#settings-reference) — the `b2c-dx.*` toggles and verbosity controls.

## Connecting to a B2C Instance

The extension needs different credentials depending on which feature you use. **A `dw.json` at your workspace root is the recommended setup** — populate the fields each feature needs, and the extension picks them up automatically.

### Per-feature requirements

A summary by feature:

| Feature | Required `dw.json` fields |
| ------- | ------------------------- |
| **Sandbox Realm Explorer** | OAuth (browser login by default; `client-id` + `client-secret` for headless). `Sandbox API User` role with a tenant filter. |
| **WebDAV Browser** | `hostname`, `username`, `password` (WebDAV access key). OAuth (`client-id` + `client-secret`) also accepted. |
| **Content Libraries** | Same as WebDAV. Optionally `contentLibrary` (or `libraries`) to seed the tree. |
| **Cartridge Code Sync** | WebDAV for transfer **and** OCAPI (`client-id` + `client-secret`) for code-version operations. |
| **SCAPI API Browser** | `client-id`, `client-secret`, `short-code`, `tenant-id`. |
| **B2C Script Debugger** | WebDAV (for source-mapping). |
| **Log Tailing** | WebDAV (logs are read from `Logs/`). |
| **CAP install** | WebDAV; some apps additionally require OAuth client credentials. |
| **Scaffold**, **Page Designer Assistant** | None — local-only. |

### Example `dw.json`

```jsonc
{
// WebDAV (Code Sync, WebDAV Browser, Content Libraries, Log Tailing, Debugger)
"hostname": "abcd-001.dx.commercecloud.salesforce.com",
"username": "your-bm-username",
"password": "your-webdav-access-key",
"code-version": "version1",

// OCAPI / OAuth (Sandbox API, Code Versions, CAP)
"client-id": "...",
"client-secret": "...",

// SCAPI (API Browser)
"short-code": "...",
"tenant-id": "...",

// Optional — content tree seed
"contentLibrary": "your-library-id"
}
```

You can also set any of these via `SFCC_*` environment variables (`SFCC_SERVER`, `SFCC_USERNAME`, `SFCC_CLIENT_ID`, `SFCC_TENANT_ID`, etc.). See the [CLI Configuration guide](../guide/configuration) for the complete list and precedence rules, and the [Authentication Setup guide](../guide/authentication) for OAuth scope requirements and Account Manager API client setup.

<!-- TODO(screenshot): replace ./images/settings.svg with ./images/settings.png — Settings UI filtered to b2c-dx -->

## Switching the Active Instance

When `dw.json` defines multiple named instances (the recommended pattern for working across dev / staging / sandbox), click the cloud icon in the status bar to run **B2C DX: Switch Active Instance** — a quick-pick over the configured instances. Selecting a new one updates the underlying `dw.json` active-instance pointer and refreshes every view.

The same pointer is shared with the CLI: switching here is equivalent to running `b2c setup instance set-active <name>`.

## Settings Reference

These VS Code settings live under the `b2c-dx.*` namespace. **You usually don't need to change any of them** — they exist for niche cases like disabling a feature you don't use, or quieting the log channel for a bug report. To browse: **Settings** (Cmd+,) → search for `b2c-dx`.

### Feature toggles

Each feature is enabled by default. Set to `false` to skip its activation entirely (no tree views, no commands, no context-menu entries). Useful for trimming the UI, isolating activation issues, or running in a project where a feature isn't applicable.

| Setting | Default |
| ------- | ------- |
| `b2c-dx.features.sandboxExplorer` | `true` |
| `b2c-dx.features.webdavBrowser` | `true` |
| `b2c-dx.features.contentLibraries` | `true` |
| `b2c-dx.features.codeSync` | `true` |
| `b2c-dx.features.logTailing` | `true` |
| `b2c-dx.features.scaffold` | `true` |
| `b2c-dx.features.apiBrowser` | `true` |
| `b2c-dx.features.cap` | `true` |

The B2C Script Debugger registers regardless of these toggles — it activates only when a `b2c-script` launch configuration is used.

### Verbosity, polling, telemetry

| Setting | Default | Description |
| ------- | ------- | ----------- |
| `b2c-dx.logLevel` | `info` | Verbosity for the **B2C DX** output channel. Allowed: `trace`, `debug`, `info`, `warn`, `error`, `silent`. Applied immediately on change. Drop to `debug` or `trace` when filing a bug. |
| `b2c-dx.sandbox.pollingInterval` | `10` | Seconds between polls while a sandbox is in a transitional state (`creating`, `starting`, `stopping`, `deleting`, `cloning`). Range: 2–300. Polling stops automatically once the realm settles. |
| `b2c-dx.telemetry.enabled` | `true` | Send anonymous usage telemetry. Honors VS Code's `telemetry.telemetryLevel` — disabling that disables this regardless of this setting. |

### Complete defaults (copy-paste)

```jsonc
// .vscode/settings.json
{
"b2c-dx.features.sandboxExplorer": true,
"b2c-dx.features.webdavBrowser": true,
"b2c-dx.features.contentLibraries": true,
"b2c-dx.features.codeSync": true,
"b2c-dx.features.logTailing": true,
"b2c-dx.features.scaffold": true,
"b2c-dx.features.apiBrowser": true,
"b2c-dx.features.cap": true,
"b2c-dx.logLevel": "info",
"b2c-dx.sandbox.pollingInterval": 10,
"b2c-dx.telemetry.enabled": true
}
```

## Next Steps

- [Overview](./) — what the extension can do.
- [Authentication Setup](../guide/authentication) — Account Manager API clients, WebDAV access keys, OAuth scopes.
- [CLI Configuration](../guide/configuration) — full `dw.json` reference and precedence rules.
Loading
Loading