When Selecting the Operator to Whom the Current Operator Wants to Transfer the Call BackgroundCallCard::transferButtonClick
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
placement— registration of the placement,telephony— registration of the call that raises the cardWho can subscribe: any user
The BackgroundCallCard::transferButtonClick event occurs when the recipient of the call transfer is selected.
The event operates within the application context in the PAGE_BACKGROUND_WORKER placement. This is a JS interface event, not a REST event: you cannot subscribe to it with a request to /rest/.
What the Handler Receives
Data is passed to the callback BX24.placement.bindEvent
callback({
"phoneNumber": "+19001234567",
"target": "12"
});
Event Handler Parameters
Required parameters are marked with *
|
Parameter |
Description |
|
phoneNumber |
The number of the current call |
|
target |
Where the call is being transferred to. The value depends on the item the operator selected:
The cases can be told apart by the format of the value. If the operator selected a department rather than an employee, the event does not occur |
Event Subscription Parameters
The handler is registered from the widget with the BX24.placement.bindEvent method.
Required parameters are marked with *
|
Name |
Description |
|
event* |
The name of the interface event. For this event — |
|
callback* |
The function Bitrix24 invokes when the event occurs. The handler arguments are described above |
Code Examples
How to Use Examples in Documentation
BX24.ready(function () {
BX24.init(function () {
BX24.placement.bindEvent('BackgroundCallCard::transferButtonClick', function (eventData) {
console.log(eventData);
});
});
});
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide)
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
await $b24.placement.bindEvent('BackgroundCallCard::transferButtonClick', (eventData: { phoneNumber: string; target: string }) => {
console.log(eventData.target)
})
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', async () => {
const $b24 = await B24Js.initializeB24Frame()
await $b24.placement.bindEvent('BackgroundCallCard::transferButtonClick', (eventData) => {
console.log(eventData)
})
})
</script>
Errors
Check the following conditions.
- The widget is open in the
PAGE_BACKGROUND_WORKERplacement. In other placements, theBackgroundCallCard::*events are not registered, and the subscription silently fails - The event name is passed without typos and with the correct capitalization. The list of events available in the current placement is returned by BX24.placement.getInterface
- The call was raised by the application with the telephony.externalCall.register method. For calls made by Bitrix24 itself, the
BackgroundCallCard::*events are not emitted at all