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

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

Function: toOrganizationId()

toOrganizationId(tenantId): string

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

Ensures a tenant ID has the required f_ecom_ prefix for use as an SCAPI organizationId. If the value already has the prefix, it's returned as-is.

Parameters

tenantId

string

The tenant ID (e.g., "zzxy_prd" or "f_ecom_zzxy_prd")

Returns

string

The organization ID with the f_ecom_ prefix (e.g., "f_ecom_zzxy_prd")

Example

ts
toOrganizationId('zzxy_prd')        // Returns 'f_ecom_zzxy_prd'
toOrganizationId('f_ecom_zzxy_prd') // Returns 'f_ecom_zzxy_prd' (unchanged)

All rights reserved.