Skip to content

@salesforce/b2c-tooling-sdk / operations/ods / resolveSandboxId

Function: resolveSandboxId() ​

resolveSandboxId(client, identifier): Promise<string>

Defined in: packages/b2c-tooling-sdk/src/operations/ods/sandbox-lookup.ts:120

Resolves a sandbox identifier to a UUID.

If the identifier is already a UUID, it is returned directly without making an API call. If the identifier is a friendly format (realm-instance), it queries the ODS API to find the matching sandbox and returns its UUID.

Parameters ​

client ​

OdsClient

The ODS API client

identifier ​

string

Sandbox identifier (UUID or friendly format like "abcd-123")

Returns ​

Promise<string>

The sandbox UUID

Throws ​

If the sandbox cannot be found

Example ​

typescript
// UUID is returned directly
const uuid = await resolveSandboxId(client, 'abc12345-1234-1234-1234-abc123456789');
// => 'abc12345-1234-1234-1234-abc123456789'

// Friendly ID is looked up
const uuid = await resolveSandboxId(client, 'zzzv-123');
// => 'abc12345-1234-1234-1234-abc123456789' (actual UUID from API)

Released under the Apache-2.0 License.