Skip to content

Commit 8d56e2b

Browse files
committed
docs update
1 parent 1b26783 commit 8d56e2b

3 files changed

Lines changed: 62 additions & 21 deletions

File tree

docs/cli/account-manager.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,42 +191,34 @@ Create a new user in Account Manager.
191191
#### Usage
192192

193193
```bash
194-
b2c am users create --org <ORG_ID> --mail <EMAIL> [FLAGS]
194+
b2c am users create --org <ORG> --mail <EMAIL> --first-name <NAME> --last-name <NAME> [FLAGS]
195195
```
196196

197197
#### Required Flags
198198

199199
| Flag | Description |
200200
|------|-------------|
201-
| `--org` | Organization ID where the user will be created |
202-
| `--mail` | User email address (login) |
201+
| `--org`, `-o` | Organization ID or name |
202+
| `--mail`, `-m` | User email address (login) |
203+
| `--first-name` | User's first name |
204+
| `--last-name` | User's last name |
203205

204206
#### Optional Flags
205207

206208
| Flag | Description |
207209
|------|-------------|
208-
| `--first-name` | User's first name |
209-
| `--last-name` | User's last name |
210-
| `--display-name` | Display name |
211-
| `--preferred-locale` | Preferred locale (e.g., `en_US`) |
212-
| `--business-phone` | Business phone number |
213-
| `--home-phone` | Home phone number |
214-
| `--mobile-phone` | Mobile phone number |
215210
| `--json` | Output results as JSON |
216211

217212
#### Examples
218213

219214
```bash
220-
# Create a basic user
215+
# Create a user by org ID
221216
b2c am users create --org org-123 --mail user@example.com \
222217
--first-name John --last-name Doe
223218

224-
# Create a user with additional details
225-
b2c am users create --org org-123 --mail user@example.com \
226-
--first-name John --last-name Doe \
227-
--display-name "John Doe" \
228-
--preferred-locale en_US \
229-
--business-phone "+1-555-123-4567"
219+
# Create a user by org name
220+
b2c am users create --org "My Organization" --mail user@example.com \
221+
--first-name John --last-name Doe
230222

231223
# Output as JSON
232224
b2c am users create --org org-123 --mail user@example.com \
@@ -238,6 +230,7 @@ b2c am users create --org org-123 --mail user@example.com \
238230
- User will be created in INITIAL state
239231
- User must be assigned roles separately using `b2c am roles grant`
240232
- The user's primary organization is set to the specified `--org`
233+
- Organization can be specified by ID or friendly name
241234

242235
---
243236

@@ -852,7 +845,7 @@ b2c am clients create [FLAGS]
852845
| Flag | Description |
853846
|------|-------------|
854847
| `--name`, `-n` | API client name (max 200 characters) |
855-
| `--organizations`, `-o` | Comma-separated organization IDs |
848+
| `--orgs`, `-o` | Comma-separated organization IDs or names |
856849
| `--password`, `-p` | Password (12–128 characters) |
857850

858851
#### Optional Flags
@@ -874,8 +867,8 @@ b2c am clients create [FLAGS]
874867
#### Examples
875868

876869
```bash
877-
b2c am clients create --name my-client --organizations org-id-1 --password "SecureP@ss123"
878-
b2c am clients create -n my-client -o org-id-1 -p "SecureP@ss123" -r SALESFORCE_COMMERCE_API
870+
b2c am clients create --name my-client --orgs org-id-1 --password "SecureP@ss123"
871+
b2c am clients create -n my-client -o "My Organization" -p "SecureP@ss123" -r SALESFORCE_COMMERCE_API
879872
b2c am clients create -n my-client -o org-id-1 -p "SecureP@ss123" --scopes "mail,openid" --default-scopes "mail"
880873
```
881874

docs/guide/account-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Create and configure API clients for your team or automation:
164164
# Create an API client
165165
b2c am clients create \
166166
--name "CI/CD Pipeline" \
167-
--organizations $ORG_ID \
167+
--orgs $ORG_ID \
168168
--password "SecureP@ssword123" \
169169
--roles SALESFORCE_COMMERCE_API \
170170
--role-tenant-filter "SALESFORCE_COMMERCE_API:zzxy_prd"

docs/guide/configuration.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,54 @@ b2c code deploy -i staging
153153

154154
If no instance is specified, the config with `"active": true` is used.
155155

156+
### Managing Instances with the CLI
157+
158+
Instead of editing `dw.json` by hand, you can use `b2c setup instance` commands to create, list, remove, and switch between instance configurations.
159+
160+
#### Quick Setup
161+
162+
```bash
163+
# Interactive — prompts for hostname, auth, and code version
164+
b2c setup instance create staging
165+
166+
# Non-interactive
167+
b2c setup instance create staging \
168+
--hostname staging.example.com \
169+
--client-id my-client-id \
170+
--client-secret my-secret \
171+
--force
172+
```
173+
174+
The interactive mode auto-detects the active code version via OCAPI when OAuth credentials are provided, and the first instance you create is automatically set as active.
175+
176+
#### Switching Instances
177+
178+
```bash
179+
# Set a different instance as the default
180+
b2c setup instance set-active production
181+
182+
# Or pick interactively (shows a searchable list)
183+
b2c setup instance set-active
184+
185+
# Commands now use the active instance by default
186+
b2c code list # Uses production
187+
b2c code list -i staging # Override for one command
188+
```
189+
190+
#### Listing and Removing
191+
192+
```bash
193+
# See all configured instances
194+
b2c setup instance list
195+
196+
# Remove an instance
197+
b2c setup instance remove staging
198+
```
199+
200+
::: tip
201+
For the full command reference with all flags, see [Setup Commands](/cli/setup).
202+
:::
203+
156204
### Supported Fields
157205

158206
| Field | Description |

0 commit comments

Comments
 (0)