@salesforce/b2c-tooling-sdk / clients / toTenantId
Function: toTenantId()
toTenantId(
value):string
Defined in: packages/b2c-tooling-sdk/src/clients/custom-apis.ts:173
Extracts the raw tenant ID by stripping the f_ecom_ prefix if present.
Parameters
value
string
The tenant ID or organization ID (e.g., "zzxy_prd" or "f_ecom_zzxy_prd")
Returns
string
The raw tenant ID without the prefix (e.g., "zzxy_prd")
Example
ts
toTenantId('f_ecom_zzxy_prd') // Returns 'zzxy_prd'
toTenantId('zzxy_prd') // Returns 'zzxy_prd' (unchanged)