@salesforce/b2c-tooling-sdk / clients / resolveToInternalRole
Function: resolveToInternalRole()
resolveToInternalRole(
role,mapping):string
Defined in: packages/b2c-tooling-sdk/src/clients/am-api.ts:148
Resolves a role to its internal roleEnumName using an API-fetched role mapping. Accepts either the role id (e.g., bm-admin) or roleEnumName (e.g., ECOM_ADMIN). Falls back to a generic transform (uppercase + replace hyphens with underscores) for unknown roles.
Parameters
role
string
mapping
Returns
string