---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/ods](../index.md) / waitForClone

# Function: waitForClone()

> **waitForClone**(`client`, `options`): `Promise`\<`void`\>

Defined in: [packages/b2c-tooling-sdk/src/operations/ods/wait-for-clone.ts:131](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/ods/wait-for-clone.ts#L131)

Waits for a sandbox clone to reach `COMPLETED` or `FAILED` state by polling
its status against the ODS API.

Polls at `pollIntervalSeconds` until the clone completes, the configured
timeout is exceeded, or the clone enters a failed state. An initial poll
delay equal to `pollIntervalSeconds` is applied before the first status
check.

## Parameters

### client

[`OdsClient`](../../../clients/type-aliases/OdsClient.md)

ODS client for API calls

### options

[`WaitForCloneOptions`](../interfaces/WaitForCloneOptions.md)

Polling configuration options

## Returns

`Promise`\<`void`\>

Promise that resolves when the clone reaches `COMPLETED`

## Throws

If the timeout is exceeded before completion

## Throws

If the API request fails

## Throws

If the clone enters the FAILED state
