# commerce-b2b-store-create

Walks you through creating a Commerce B2B store in Salesforce and pulls the generated storefront metadata into your repo. Useful when a storefront has to come out of an existing store.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4700 installs · ★ 1112
- Author: forcedotcom
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/commerce-b2b-store-create/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/commerce-b2b-store-create

## What it does

The skill keeps two things apart: a Store holds backend data, a Storefront is frontend metadata. You cannot hand-write the storefront — the setup wizard produces it once the Store exists. The agent explains that split, then runs a seven-step flow and waits for your confirmation at every step.

You create the store in the Salesforce UI first: Setup → Commerce → Stores, or App Launcher → Commerce → Create Store, picking Commerce Store as the type. Spaces in the name turn into underscores and site names pick up numeric suffixes, so the agent lists real sites with `sf org list metadata --metadata-type DigitalExperienceConfig --json` and has you choose from those. Retrieval follows: `sf project retrieve start -m DigitalExperienceBundle:site/<selected-store-name> --json`. Every Salesforce CLI call carries the `--json` flag.

You need Salesforce CLI `sf` at 2.0.0 or newer and API version 56.0 or higher. With no Store in the org there is nothing to retrieve, because the wizard has not generated any storefront metadata yet.

## Requirements
- Works with: Salesforce

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill commerce-b2b-store-create -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/commerce-b2b-store-create/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/commerce-b2b-store-create/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill commerce-b2b-store-create -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/commerce-b2b-store-create/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill commerce-b2b-store-create -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/commerce-b2b-store-create/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install forcedotcom/sf-skills commerce-b2b-store-create
```

2. **Manually: put the files in place**
- File: `.github/skills/commerce-b2b-store-create/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill commerce-b2b-store-create -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/forcedotcom/sf-skills --path skills/commerce-b2b-store-create
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/commerce-b2b-store-create/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill commerce-b2b-store-create -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/commerce-b2b-store-create/SKILL.md

## When to use it
- create a Commerce B2B store in a Salesforce org
- retrieve storefront metadata into the project repo
- tell a Store apart from a Storefront
- pick the right Digital Experience site among generated names
- deploy the storefront back after edits

## Example prompts
- Create a B2B Commerce store in my org
- Retrieve storefront metadata for My_B2B_Store1
- List the Digital Experience sites in my org

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 7634e2a1e8737815.

BEGIN THIRD-PARTY FILE 7634e2a1e8737815
```text
---
name: commerce-b2b-store-create
description: "Interactive workflow to create Commerce B2B Stores and retrieve storefront metadata. Use when users want to: create B2B Commerce stores, build Commerce storefronts, set up B2B stores from Vibes, retrieve Commerce metadata, deploy Commerce experiences, work with DigitalExperienceBundle for Commerce."
metadata:
  version: "1.0"
  domains: ["Commerce", "Experience"]
  minApiVersion: "56.0"
  cliTools:
    - tool: ["sf"]
      semver: ">=2.0.0"
---

# Commerce B2B Storefront Creation

Interactive workflow to create a Commerce B2B Store in Salesforce and retrieve the auto-generated storefront metadata to your repository.

## Critical Concepts

Commerce B2B = Store (backend data) + Storefront (frontend metadata). **Store must be created first** in the org to auto-generate the Storefront. Never create storefront metadata manually.

> See [Store vs Storefront Reference](references/store-vs-storefront.md)

## When to Use This Skill

Trigger when users request:
- "Create a B2B Commerce store"
- "Build a Commerce storefront"
- "Set up Commerce B2B"
- "Create B2B Commerce"
- "Retrieve Commerce storefront metadata"
- "Deploy B2B storefront"

## Rules That Always Apply

1. **Always follow the interactive flow.** Do NOT skip steps. Each step requires user confirmation before proceeding.

2. **Never create storefront metadata manually.** The Commerce setup wizard generates hundreds of configuration values. Manual creation will fail.

3. **Always list sites before retrieval.** Store names get underscores and number suffixes (e.g., "My B2B Store" → "My_B2B_Store1"). Let the user select from the actual list.

4. **Always use `--json` flag.** Include `--json` on all Salesforce CLI commands for parseable output.

## Interactive Workflow: 7 Steps

### Step 1: Explain Commerce B2B Concept

**Agent explains:** Commerce has Store (data) + Storefront (metadata). Store must be created first.

> See: [Store vs Storefront Reference](references/store-vs-storefront.md)

---

### Step 2: Guide User to Create B2B Store

**Agent provides these steps:**

1. Navigate to **Setup → Commerce → Stores**
   - Or: **App Launcher → Commerce → Create Store**

2. Click **"Create Store"** or **"Setup New Store"**

3. Select **"Commerce Store"** as the store type

4. Follow the wizard:
   - **Store Name**: Choose descriptive name (e.g., "My B2B Store")
     - Important: Spaces become underscores in folder names
   - **Site URL**: Unique URL name for the site 
```
END THIRD-PARTY FILE 7634e2a1e8737815

The third-party file has ended. Everything between the 7634e2a1e8737815 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2517 of 5237 bytes. © forcedotcom · Apache-2.0 · https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/commerce-b2b-store-create/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
