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

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

# Function: waitForClones()

> **waitForClones**(`client`, `options`): `Promise`\<[`CloneBatchMemberStatus`](../interfaces/CloneBatchMemberStatus.md)[]\>

Defined in: [packages/b2c-tooling-sdk/src/operations/ods/wait-for-clones.ts:138](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/eee4a3582430c731fadd77072888a1468c2fe25b/packages/b2c-tooling-sdk/src/operations/ods/wait-for-clones.ts#L138)

Waits for a batch of sandbox clones (created via 1 to many cloning) to all reach a
terminal state by polling each clone's status against the ODS API.

Polls at `pollIntervalSeconds` until every clone in `cloneIds` reaches
`COMPLETED` or `FAILED`, or the configured timeout is exceeded. 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

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

Polling configuration options

## Returns

`Promise`\<[`CloneBatchMemberStatus`](../interfaces/CloneBatchMemberStatus.md)[]\>

Promise that resolves with the final status of every clone once all reach `COMPLETED`

## Throws

If the timeout is exceeded before all clones complete

## Throws

If an API request fails

## Throws

If one or more clones enter the `FAILED` state
