Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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/many-knives-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@salesforce/b2c-dx-docs': minor
---

Added MCP Server documentation
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Issues labelled `good first contribution`.

# Running the MCP server from source

When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
For information on running the MCP server from source and local development, see [packages/b2c-dx-mcp/CONTRIBUTING.md](packages/b2c-dx-mcp/CONTRIBUTING.md).

# Contribution Checklist

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> [!NOTE]
> This project is currently in **Developer Preview**. Not all features are implemented, and the API may change in future releases. Please provide feedback via GitHub issues and Unofficial Slack.
Salesforce Commerce Cloud B2C Command Line Tools.
Salesforce B2C Commerce Command Line Tools.

> [!TIP]
> **Just looking for the B2C CLI or MCP install instructions?** Visit the documentation site at [https://salesforcecommercecloud.github.io/b2c-developer-tooling/](https://salesforcecommercecloud.github.io/b2c-developer-tooling/) for the latest install guide and CLI reference.
Expand Down
23 changes: 22 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ const guideSidebar = [
{text: 'Storefront Next', link: '/guide/storefront-next'},
],
},
{
text: 'MCP Server',
items: [
{text: 'Overview', link: '/mcp/'},
{text: 'Installation', link: '/mcp/installation'},
{text: 'Configuration', link: '/mcp/configuration'},
{text: 'Toolsets & Tools', link: '/mcp/toolsets'},
],
},
{
text: 'Extending',
items: [
Expand Down Expand Up @@ -83,6 +92,16 @@ const guideSidebar = [
{text: 'Logging', link: '/cli/logging'},
],
},
{
text: 'Tools Reference',
items: [
{text: 'cartridge_deploy', link: '/mcp/tools/cartridge-deploy'},
{text: 'mrt_bundle_push', link: '/mcp/tools/mrt-bundle-push'},
{text: 'scapi_schemas_list', link: '/mcp/tools/scapi-schemas-list'},
{text: 'scapi_custom_apis_status', link: '/mcp/tools/scapi-custom-apis-status'},
{text: 'storefront_next_page_designer_decorator', link: '/mcp/tools/storefront-next-page-designer-decorator'},
],
},
];

// Script to force hard navigation for version switching links
Expand Down Expand Up @@ -111,7 +130,7 @@ document.addEventListener('click', (e) => {

export default defineConfig({
title: 'B2C DX',
description: 'Salesforce Commerce Cloud B2C Developer Experience - CLI, MCP Server, and SDK',
description: 'Salesforce B2C Commerce Developer Experience - CLI, MCP Server, and SDK',
base: basePath,

head: [['script', {}, versionSwitchScript]],
Expand All @@ -132,6 +151,7 @@ export default defineConfig({
nav: [
{text: 'Guide', link: '/guide/'},
{text: 'CLI Reference', link: '/cli/'},
{text: 'MCP Server', link: '/mcp/'},
{text: 'API Reference', link: '/api/'},
{
text: isDevBuild ? 'Dev' : 'Latest',
Expand All @@ -147,6 +167,7 @@ export default defineConfig({
sidebar: {
'/guide/': guideSidebar,
'/cli/': guideSidebar,
'/mcp/': guideSidebar,
'/api/': [
{
text: 'API Reference',
Expand Down
42 changes: 21 additions & 21 deletions docs/guide/account-manager.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
description: Managing Account Manager users, roles, organizations, and API clients with the B2C CLI including authentication options, CI/CD automation, and common workflows.
description: Manage Account Manager users, roles, organizations, and API clients with the B2C CLI, including authentication options, CI/CD automation, and common workflows.
---

# Account Manager Guide

The B2C CLI provides commands for managing Account Manager resourcesusers, roles, organizations, and API clientsdirectly from the terminal. This guide covers authentication setup, common workflows, and CI/CD automation.
The B2C CLI provides commands for managing Account Manager resources—users, roles, organizations, and API clients—directly from the terminal. This guide covers authentication setup, common workflows, and CI/CD automation.

::: tip
For the full command reference with all flags and options, see [Account Manager Commands](/cli/account-manager).
:::

## Authentication

Account Manager commands work out of the boxno configuration required. The CLI uses a built-in public client that authenticates via browser login. For automation, you can provide your own API client credentials.
Account Manager commands work out of the box—no configuration is required. The CLI uses a built—in public client that authenticates via browser login. For automation, you can provide your own API client credentials.

### Zero-Config (Default)

Just run commands. The CLI opens a browser for login using the built-in client:
Just run the commands without configuring any settings. The CLI opens a browser for login using the built-in client.

```bash
# Works immediately — opens browser for login
Expand All @@ -40,7 +40,7 @@ b2c am orgs list --user-auth

### Client Credentials

Uses the API client's secret for non-interactive authentication. Best for CI/CD pipelines, scripts, and automation.
Uses the API client's secret for non-interactive authentication. This option is best for CI/CD pipelines, scripts, and automation.

```bash
# List users with client credentials
Expand All @@ -53,11 +53,11 @@ Requirements:

### Authentication Order

By default, the CLI tries client credentials first (if `--client-secret` is provided), then falls back to browser-based user authentication (using either your configured `--client-id` or the built-in public client). To force browser-based login, pass `--user-auth`.
By default, the CLI tries client credentials first (if `--client-secret` is provided), then falls back to browser-based user authentication by using either your configured `--client-id` or the built-in public client. To force browser-based login, pass `--user-auth`.

### Role Requirements

Different operations require different roles, and the required roles depend on how you authenticate:
Different operations require different roles, and the required roles depend on how you authenticate.

| Operations | Client Credentials (roles on API client) | User Auth (roles on user account) |
|---|---|---|
Expand All @@ -75,18 +75,18 @@ If authentication fails, the CLI provides contextual error messages recommending

### For Interactive Use

No setup required. Account Manager commands use the CLI's built-in public client by default:
No setup required. Account Manager commands use the CLI's built-in public client by default.

```bash
b2c am users list
```

If you need to use your own API client (for specific scopes or organization restrictions):
If you need to use your own API client for specific scopes or organization restrictions:

1. In [Account Manager](https://account.demandware.com), find or create an API client
2. Under **Redirect URLs**, add `http://localhost:8080`
3. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`
4. Set **Default Scopes** to: `mail roles tenantFilter openid`
1. In [Account Manager](https://account.demandware.com), find or create an API client.
2. Under **Redirect URLs**, add `http://localhost:8080`.
3. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`.
4. Set **Default Scopes** to: `mail roles tenantFilter openid`.

```bash
export SFCC_CLIENT_ID=your-client-id
Expand All @@ -95,12 +95,12 @@ b2c am users list --user-auth

### For CI/CD and Automation

1. In [Account Manager](https://account.demandware.com), create a dedicated API client
2. Set a strong password (client secret) and save it securely
3. Set **Token Endpoint Auth Method** to `client_secret_post`
4. Under **Roles**, add **User Administrator** (for user/role management)
5. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`
6. Set **Default Scopes** to: `mail roles tenantFilter openid`
1. In [Account Manager](https://account.demandware.com), create a dedicated API client.
2. Set a strong password (client secret) and save it securely.
3. Set **Token Endpoint Auth Method** to `client_secret_post`.
4. Under **Roles**, add **User Administrator** (for user/role management).
5. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`.
6. Set **Default Scopes** to: `mail roles tenantFilter openid`.

Then configure your CI/CD environment:

Expand All @@ -110,7 +110,7 @@ export SFCC_CLIENT_SECRET=your-client-secret
```

::: tip
Store the client secret in your CI/CD system's secrets managernever commit it to source control.
Store the client secret in your CI/CD system's secrets manager—never commit it to source control.
:::

## Common Workflows
Expand Down Expand Up @@ -236,7 +236,7 @@ The CLI will suggest the specific role or auth method needed. Common fixes:

### "No valid auth method available"

The CLI could not find credentials for any allowed auth method:
The CLI couldn't find credentials for any allowed auth method:

- Verify `--client-id` is set (or `SFCC_CLIENT_ID` environment variable)
- For client credentials, verify `--client-secret` is set
Expand Down
10 changes: 5 additions & 5 deletions docs/guide/agent-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ These skills follow the [Agent Skills](https://agentskills.io/home) standard and

When installed, the skills teach AI assistants about B2C Commerce development, CLI commands, and best practices, enabling them to help you with:

- **CLI Operations** - Deploying cartridges, running jobs, managing sandboxes, WebDAV operations
- **B2C Development** - Controllers, ISML templates, forms, localization, logging, metadata
- **Web Services** - HTTP/SOAP/FTP integrations using the Service Framework
- **Custom APIs** - Building SCAPI Custom APIs with contracts, implementations, and mappings
- **CLI Operations**: Deploying cartridges, running jobs, managing sandboxes, WebDAV operations
- **B2C Development**: Controllers, ISML templates, forms, localization, logging, metadata
- **Web Services**: HTTP/SOAP/FTP integrations using the Service Framework
- **Custom APIs**: Building SCAPI Custom APIs with contracts, implementations, and mappings

## Available Plugins

Expand All @@ -26,7 +26,7 @@ When installed, the skills teach AI assistants about B2C Commerce development, C

### Plugin: b2c-cli

Skills for using the B2C CLI to manage your Commerce Cloud instances. Covers code deployment, job execution, site archive import/export, WebDAV file operations, On-Demand Sandbox management, and more.
Skills for using the B2C CLI to manage your B2C Commerce instances. Covers code deployment, job execution, site archive import/export, WebDAV file operations, On-Demand Sandbox management, and more.

Browse skills: [skills/b2c-cli/skills/](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/tree/main/skills/b2c-cli/skills)

Expand Down
18 changes: 9 additions & 9 deletions docs/guide/analytics-reports-cip-ccac.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description: User guide for running CIP/CCAC analytics reports and SQL queries w

The B2C CLI includes a `cip` command family for **B2C Commerce Intelligence (CIP)**, also known as **Commerce Cloud Analytics (CCAC)** reporting.

It is based on the **B2C Commerce Intelligence JDBC Driver** and gives you three practical workflows:
It’s based on the **B2C Commerce Intelligence JDBC Driver** and gives you three practical workflows.

- curated report commands (`b2c cip report <report-command>`) for common analytics use cases
- raw SQL (`b2c cip query`) for custom exploration
- metadata discovery (`b2c cip tables`, `b2c cip describe`) for schema/table inspection
- Curated report commands (`b2c cip report <report-command>`) for common analytics use cases
- Raw SQL (`b2c cip query`) for custom exploration
- Metadata discovery (`b2c cip tables`, `b2c cip describe`) for schema/table inspection

Official JDBC reference:

Expand Down Expand Up @@ -49,7 +49,7 @@ Starting with B2C Commerce release **26.1**, reports and dashboards data can als
- Staging instances
- Production instances in designated test realms (realms not serving live traffic)

To enable this, turn on **Enable Reports & Dashboards Data Tracking** in Business Manager feature switches.
To enable non-production support, turn on **Enable Reports & Dashboards Data Tracking** in Business Manager feature switches.

- Reference: [Set Feature Switches (Toggles) in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5)
- Provisioning can take up to **2 hours** after enabling
Expand Down Expand Up @@ -194,10 +194,10 @@ Always check the official documentation before designing high-volume workloads.

Practical guidance:

- prefer aggregate tables over large fact tables when possible
- avoid `SELECT *`; request only required columns
- keep date ranges narrow and run incremental windows
- test with smaller windows first, then scale up
- Prefer aggregate tables over large fact tables when possible.
- Avoid `SELECT *`; request only required columns.
- Keep date ranges narrow and run incremental windows.
- Test with smaller windows first, then scale up.

Reference source for limits and best practices:

Expand Down
26 changes: 13 additions & 13 deletions docs/guide/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ For Account Manager operations that require user-level roles (organization and A

### Creating an API Client

1. Log in to [Account Manager](https://account.demandware.com)
2. Navigate to **API Client** in the left menu
3. Click **Add API Client**
1. Log in to [Account Manager](https://account.demandware.com).
2. Navigate to **API Client** in the left menu.
3. Click **Add API Client**.
4. Fill in the required fields:
- **Display Name**: A descriptive name (e.g., "B2C CLI")
- **Password**: A strong client secret (save this securely for Client Credentials auth)
5. Configure the **Token Endpoint Auth Method**:
- `client_secret_basic` for client credentials flow

::: warning
The B2C CLI only supports `client_secret_basic` for the Token Endpoint Auth Method. `client_secret_post` and `private_key_jwt` are not currently supported.
The B2C CLI only supports `client_secret_basic` for the Token Endpoint Auth Method. `client_secret_post` and `private_key_jwt` aren't currently supported.
:::

### Assigning Roles
Expand All @@ -76,16 +76,16 @@ Most roles require a **tenant filter** that specifies which tenants/realms the r

| Role | Operations | Notes |
| --------------------------------- | ----------------------------------------- | ------------------------------------------- |
| `Salesforce Commerce API` | SCAPI commands and CIP analytics commands | API Clients only. Requires tenant filter. |
| `Salesforce Commerce API` | SCAPI commands and CIP analytics commands | API clients only. Requires a tenant filter. |
| `Sandbox API User` | ODS management, SLAS client management | Requires tenant filter with realm/org IDs. |
| `SLAS Organization Administrator` | SLAS client management (user auth only) | User accounts only. Requires tenant filter. |
| `SLAS Organization Administrator` | SLAS client management (user auth only) | User accounts only. Requires a tenant filter. |

#### For Client Credentials (roles on API Client)
#### For Client Credentials (Roles on API Client)

Under the API Client's **Roles** section:

1. Add roles needed for your operations
2. For each role, configure the **tenant filter** with the tenant IDs (e.g., `zzxy_prd`) or realm IDs you need to access
2. For each role, configure the **tenant filter** with the tenant IDs (for example, `zzxy_prd`) or realm IDs you need to access

**Important:** The `Salesforce Commerce API` role is currently only available for API Clients, not user accounts.

Expand Down Expand Up @@ -122,8 +122,8 @@ See the individual CLI command pages for complete scope requirements.
For ODS, SLAS, and SCAPI operations, your API client's roles must have a tenant filter configured:

1. In Account Manager, go to the API Client settings
2. Under each role (e.g., `Salesforce Commerce API`, `Sandbox API User`), find the **Tenant Filter**
3. Add the tenant IDs (e.g., `zzxy_prd`) or organization IDs you need to access
2. Under each role (for example, `Salesforce Commerce API`, `Sandbox API User`), find the **Tenant Filter**
3. Add the tenant IDs (for example, `zzxy_prd`) or organization IDs you need to access

The tenant filter restricts which tenants/realms the role applies to.

Expand Down Expand Up @@ -294,7 +294,7 @@ WebDAV is required for file upload operations (`code deploy`, `code watch`, `web

### Option A: Basic Authentication (Recommended)

Use your Business Manager username and a WebDAV access key. This provides better performance for file operations.
Use your Business Manager username and a WebDAV access key. These credentials provide better performance for file operations.

1. In Business Manager, go to **Administration** > **Organization** > **Users**
2. Select your user
Expand Down Expand Up @@ -340,7 +340,7 @@ Common paths for CLI operations:
| `/catalogs/<catalog-id>` | Catalog file access |
| `/libraries/<library-id>` | Content library access |

**Note:** This configuration is only needed when using OAuth for WebDAV. It is not required when using basic authentication with username/access key.
**Note:** This configuration is only needed when using OAuth for WebDAV. It isn’t required when using basic authentication with username/access key.

## Managed Runtime API Key

Expand Down Expand Up @@ -441,7 +441,7 @@ b2c scapi schemas list

- Add the required scopes to your API client's Default Scopes
- For SCAPI commands, ensure the relevant `sfcc.*` scopes are in Default Scopes
- Verify Default Scopes includes `mail roles tenantFilter openid`
- Verify that Default Scopes includes `mail roles tenantFilter openid`

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/ci-cd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CI/CD with GitHub Actions

The B2C Developer Tooling project provides official GitHub Actions for automating Commerce Cloud operations in your CI/CD pipelines.
The B2C Developer Tooling project provides official GitHub Actions for automating B2C Commerce operations in your CI/CD pipelines.

## Overview

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can configure the CLI using environment variables:

## .env File

The CLI automatically loads a `.env` file from the current working directory if present. Use the same `SFCC_*` variable names as environment variables.
The CLI automatically loads a `.env` file from the current project directory if present. Use the same `SFCC_*` variable names as environment variables.

```bash
# .env
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/ide-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This guide explains how to connect IDE extensions to your B2C CLI configuration.

## Prophet VS Code Extension

[Prophet](https://marketplace.visualstudio.com/items?itemName=SqrTT.prophet) can load `dw.json`-compatible configuration by executing a local `dw.js` script in your working directory.
[Prophet](https://marketplace.visualstudio.com/items?itemName=SqrTT.prophet) can load `dw.json`-compatible configuration by executing a local `dw.js` script in your project directory.

### Benefits

Expand Down Expand Up @@ -60,14 +60,14 @@ function toProphetConfig(config) {

function loadDwConfig() {
try {
var workingDirectory = process.env.SFCC_PROJECT_DIRECTORY || process.env.SFCC_WORKING_DIRECTORY || __dirname || process.cwd();
var projectDirectory = process.env.SFCC_PROJECT_DIRECTORY || process.env.SFCC_WORKING_DIRECTORY || __dirname || process.cwd();
var stdout = childProcess.execFileSync(
'b2c',
['setup', 'inspect', '--json', '--unmask', '--project-directory', workingDirectory],
['setup', 'inspect', '--json', '--unmask', '--project-directory', projectDirectory],
{
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
cwd: workingDirectory,
cwd: projectDirectory,
},
);

Expand Down
Loading
Loading