Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / clients / buildTenantScope

Function: buildTenantScope()

buildTenantScope(tenantId): string

Defined in: packages/b2c-tooling-sdk/src/clients/custom-apis.ts:190

Builds the tenant-specific OAuth scope required for SCAPI APIs.

Parameters

tenantId

string

The tenant ID (with or without f_ecom_ prefix)

Returns

string

The tenant-specific scope (e.g., "SALESFORCE_COMMERCE_API:zzxy_prd")

Example

ts
buildTenantScope('zzxy_prd')        // Returns 'SALESFORCE_COMMERCE_API:zzxy_prd'
buildTenantScope('f_ecom_zzxy_prd') // Returns 'SALESFORCE_COMMERCE_API:zzxy_prd'

All rights reserved.