@@ -7,46 +7,66 @@ description: Salesforce B2C Commerce Custom API endpoint management Skill
77
88Use the ` b2c ` CLI plugin to manage SCAPI Custom API endpoints and check their registration status.
99
10+ ## Required: Tenant ID
11+
12+ The ` --tenant-id ` flag is ** required** for all commands. The tenant ID identifies your B2C Commerce instance.
13+
14+ ** Important:** The tenant ID is NOT the same as the organization ID:
15+ - ** Tenant ID** : ` zzxy_prd ` (used with this command)
16+ - ** Organization ID** : ` zzxy_prd ` (used in SCAPI URLs, has ` f_ecom_ ` prefix)
17+
18+ ### Deriving Tenant ID from Hostname
19+
20+ For sandbox instances, you can derive the tenant ID from the hostname by replacing hyphens with underscores:
21+
22+ | Hostname | Tenant ID |
23+ | ----------| -----------|
24+ | ` zzpq-013.dx.commercecloud.salesforce.com ` | ` zzpq_013 ` |
25+ | ` zzxy-001.dx.commercecloud.salesforce.com ` | ` zzxy_001 ` |
26+ | ` abcd-dev.dx.commercecloud.salesforce.com ` | ` abcd_dev ` |
27+
28+ For production instances, use your realm and instance identifier (e.g., ` zzxy_prd ` ).
29+
1030## Examples
1131
1232### Get Custom API Endpoint Status
1333
1434``` bash
1535# list all Custom API endpoints for an organization
16- b2c scapi custom status --tenant-id f_ecom_zzxy_prd
36+ b2c scapi custom status --tenant-id zzxy_prd
1737
1838# list with JSON output
19- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --json
39+ b2c scapi custom status --tenant-id zzxy_prd --json
2040```
2141
2242### Filter by Status
2343
2444``` bash
2545# list only active endpoints
26- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --status active
46+ b2c scapi custom status --tenant-id zzxy_prd --status active
2747
2848# list only endpoints that failed to register
29- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --status not_registered
49+ b2c scapi custom status --tenant-id zzxy_prd --status not_registered
3050```
3151
3252### Group by Type or Site
3353
3454``` bash
3555# group endpoints by API type (Admin vs Shopper)
36- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --group-by type
56+ b2c scapi custom status --tenant-id zzxy_prd --group-by type
3757
3858# group endpoints by site
39- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --group-by site
59+ b2c scapi custom status --tenant-id zzxy_prd --group-by site
4060```
4161
4262### Customize Output Columns
4363
4464``` bash
4565# show extended columns (includes error reasons, sites, etc.)
46- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --extended
66+ b2c scapi custom status --tenant-id zzxy_prd --extended
4767
4868# select specific columns to display
49- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --columns type,apiName,status,sites
69+ b2c scapi custom status --tenant-id zzxy_prd --columns type,apiName,status,sites
5070
5171# available columns: type, apiName, apiVersion, cartridgeName, endpointPath, httpMethod, status, sites, securityScheme, operationId, schemaFile, implementationScript, errorReason, id
5272```
@@ -55,13 +75,13 @@ b2c scapi custom status --tenant-id f_ecom_zzxy_prd --columns type,apiName,statu
5575
5676``` bash
5777# quickly find and diagnose failed Custom API registrations
58- b2c scapi custom status --tenant-id f_ecom_zzxy_prd --status not_registered --columns type,apiName,endpointPath,errorReason
78+ b2c scapi custom status --tenant-id zzxy_prd --status not_registered --columns type,apiName,endpointPath,errorReason
5979```
6080
6181### Configuration
6282
6383The tenant ID and short code can be set via environment variables:
64- - ` SFCC_TENANT_ID ` : Organization/tenant ID
84+ - ` SFCC_TENANT_ID ` : Tenant ID (e.g., ` zzxy_prd ` , not the organization ID)
6585- ` SFCC_SHORTCODE ` : SCAPI short code
6686
6787### More Commands
0 commit comments