---
title: "B24HelperManager"
description: "Aggregate manager that loads profile, app, payment, license, currency, and options data with one batched REST call, plus wires the Pull client."
canonical_url: "https://bitrix24.github.io/b24jssdk/docs/working-with-the-rest-api/helper"
last_updated: "2026-08-25"
---
# B24HelperManager

> Aggregate manager that loads profile, app, payment, license, currency, and options data with one batched REST call, plus wires the Pull client.

## Overview

`B24HelperManager`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} batches a single REST call (`profile`, `app.info`, `crm.currency.base.get`, `crm.currency.list`, `app.option.get`, `user.option.get`) and exposes the parsed result through specialised sub-managers. It also owns the [Pull client](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/pull.md) lifecycle — connect, subscribe, start, destroy.

You will normally interact with `B24HelperManager`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} indirectly, through the [`useB24Helper`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-use-b24-helper.md) composable. Direct construction is supported but rarely needed.

```ts
import { useB24Helper, LoadDataType, initializeB24Frame } from '@bitrix24/b24jssdk'

const { initB24Helper, getB24Helper } = useB24Helper()

const $b24 = await initializeB24Frame()
await initB24Helper($b24, [
  LoadDataType.Profile,
  LoadDataType.App,
  LoadDataType.Currency,
  LoadDataType.AppOptions,
  LoadDataType.UserOptions
])

const helper = getB24Helper()
console.log(helper.profileInfo.data, helper.appInfo.data)
```

## Constructor

```ts-type
constructor(b24: TypeB24)
```

Accepts any `TypeB24`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} instance — `B24Frame`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}, `B24Hook`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}, or `B24OAuth`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}. The helper does **not** call `init()` for you; the wrapped instance must already be initialized before `loadData()` runs.

## Methods

### `loadData`

```ts-type
loadData(
  dataTypes?: LoadDataType[],
  requestId?: string
): Promise<void>
```

Fetches the requested data slices via `actions.v2.batch.make({ isHaltOnError: true })`. After this resolves, the matching getters (`profileInfo`, `appInfo`, etc.) become available; before that they throw `'B24HelperManager not initialized'`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}.

On failure it rejects. An `Error`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} raised by the batch call — including `AjaxError`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} and `SdkError`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} — is rethrown untouched, so you keep its `code` / `status`. Only a thrown value that is not an `Error`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} at all gets wrapped, in `new Error('Failed to load data')`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} with that raw value attached as [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause){rel="[\"nofollow\"]"} so it is not lost.

`dataTypes` defaults to `[LoadDataType.App, LoadDataType.Profile]`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}.

`requestId` defaults to `'helper-load-data'`. Override it for traceability.

#### `LoadDataType` enum

| Value | REST methods invoked | Resulting manager |
| --- | --- | --- |
| `App` | `app.info` | [`appInfo`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-app-manager.md), [`paymentInfo`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-payment-manager.md), [`licenseInfo`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-license-manager.md) |
| `Profile` | `profile` | [`profileInfo`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-profile-manager.md) |
| `Currency` | `crm.currency.base.get` + `crm.currency.list` | [`currency`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-currency-manager.md) |
| `AppOptions` | `app.option.get` | [`appOptions`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-options-manager.md) |
| `UserOptions` | `user.option.get` | [`userOptions`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-options-manager.md) |

### `getLogger` / `setLogger`

```ts-type
getLogger(): LoggerInterface
setLogger(logger: LoggerInterface): void
```

`setLogger` propagates the logger into every parsed sub-manager. Defaults to `LoggerFactory.createNullLogger()`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}.

### `destroy`

```ts-type
destroy(): void
```

Tears down the Pull client (unsubscribe + disconnect). Idempotent.

### Pull client glue

```ts-type
usePullClient(prefix?: string, userId?: number): B24HelperManager
subscribePullClient(callback: (message: TypePullMessage) => void, moduleId?: string): B24HelperManager
startPullClient(): void
getModuleIdPullClient(): string
```

Order matters: `usePullClient()` → `subscribePullClient()` (one or more times) → `startPullClient()`. See [Pull client](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/pull.md) for the full flow. `getModuleIdPullClient()` returns the `moduleId` last passed to `subscribePullClient`, intended for `pull.application.event.add` payloads.

## Getters

> [!CAUTION]
> All getters listed below throw `'B24HelperManager not initialized'`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} until `loadData()` resolves. Each individual getter additionally throws when the relevant `LoadDataType` was not requested.

### `isInit`

```ts-type
get isInit(): boolean
```

`true`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} once `loadData()` has finished successfully.

### `profileInfo` / `appInfo` / `paymentInfo` / `licenseInfo` / `currency` / `appOptions` / `userOptions`

Return the parsed sub-manager. See:

- [ProfileManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-profile-manager.md)
- [AppManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-app-manager.md)
- [PaymentManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-payment-manager.md)
- [LicenseManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-license-manager.md)
- [CurrencyManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-currency-manager.md)
- [OptionsManager](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/helper-options-manager.md)

### `forB24Form`

```ts-type
get forB24Form(): TypeB24Form
```

Returns a flat object suitable for posting to a Bitrix24 [CRM feedback form](https://github.com/bitrix24/b24sdk-examples/blob/main/js/03-nuxt-frame/pages/feedback.client.vue){rel="[\"nofollow\"]"}. Requires both `LoadDataType.App` and `LoadDataType.Profile`.

| Field | Type | Description |
| --- | --- | --- |
| `app_code` | `string`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Application code in Bitrix24. |
| `app_status` | `string`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Application status (`F` / `D` / `T` / `P` / `L` / `S`). |
| `payment_expired` | `BoolString`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | `'Y'` if the paid/trial period is over, else `'N'`. |
| `days` | `number`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Days remaining until / since expiration. |
| `b24_plan` | `string`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Bitrix24 cloud tariff identifier. |
| `c_name` / `c_last_name` | `string`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Profile name / last name. |
| `hostname` | `string`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} | Portal address (e.g. `xxx.bitrix24.com`). |

### `hostName`

```ts-type
get hostName(): string
```

Portal origin (`https://xxx.bitrix24.com`). Backed by `b24.getTargetOrigin()`.

### `isSelfHosted`

```ts-type
get isSelfHosted(): boolean
```

`true`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} when the license string contains `selfhosted`. Requires `LoadDataType.App`.

### `primaryKeyIncrementValue`

```ts-type
get primaryKeyIncrementValue(): number
```

Returns the increment step for ID-typed fields: `1`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} on self-hosted, `2`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} on cloud.

### `b24SpecificUrl`

```ts-type
get b24SpecificUrl(): Record<keyof typeof TypeSpecificUrl, string>
```

Returns admin-area URLs that differ between cloud and self-hosted:

| Key | Cloud | Self-hosted |
| --- | --- | --- |
| `MainSettings` | `/settings/configs/` | `/configs/` |
| `UfList` | `/settings/configs/userfield_list.php` | `/configs/userfield_list.php` |
| `UfPage` | `/settings/configs/userfield.php` | `/configs/userfield.php` |

## Sitemap

See the full [sitemap](/b24jssdk/sitemap.md) for all pages.
