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

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

# Function: discoverExportableUnits()

> **discoverExportableUnits**(`instance`): `Promise`\<[`ExportableUnits`](../interfaces/ExportableUnits.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/jobs/discover.ts:98](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/jobs/discover.ts#L98)

Discovers the data units that can be exported from an instance.

Each category is read independently: a failure in one (e.g. the OCAPI client
lacks read permission for catalogs) records a warning and leaves that list
empty rather than failing the whole discovery, so the caller can still offer
the categories that succeeded.

## Parameters

### instance

[`B2CInstance`](../../../instance/classes/B2CInstance.md)

B2C instance to query

## Returns

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

Discovered IDs grouped by category, with per-category warnings

## Example

```typescript
const units = await discoverExportableUnits(instance);
console.log(units.catalogs); // ['storefront-catalog', 'master-catalog']
```
