Documentation

Call ID Screen

CALL_CARD placement is intended for the work with a call ID screen in CRM. Interface returns to the BX24.placement.getInterface call.

Functions

Function Description
getStatus()
Return information about the current call. Returns an object with fields:
  • CALL_ID {string}: current call ID
  • PHONE_NUMBER {string}: client phone number
  • CRM_ENTITY_TYPE {string}: Type of CRM entity, connected with a call (CONTACT|LEAD|COMPANY)
  • CRM_ENTITY_ID {int}: ID of CRM entity, connected with a call
  • CRM_ACTIVITY_ID {int}: ID of CRM activity, connected with a call
  • CALL_DIRECTION {string}: direction of a call (inbound | outbound | inboundTransfer | callback)
  • CALL_LIST_MODE {bool}: attribute of operating in call list dialing mode
  • CRM_BINDINGS - array of CRM entities binded a call.
disableAutoClose()
Disables automatic closure of call ID screen upon completion of the call

Events

Method Description
CallCard::EntityChanged Resolves when the current client is changed in the call dialling mode. The following object with fields is passed to the event handler:
  • PHONE_NUMBER {string}: client phone number
  • CRM_ENTITY_TYPE {string}: Type of RM entity, connected with a call (CONTACT|LEAD|COMPANY)
  • CRM_ENTITY_ID {int}: ID of CRM entity, connected with a call
CallCard::BeforeClose Resolves prior to closure of call ID screen. Nothing is passed the handler.
CallCard::CallStateChanged Resolves when the current call status is changed. The following arguments are passed to the handler:
  • callState {string}: current call status (idle | connecting | connected)
  • additionalParams [object]: optional, object with fields:
    • failedCode [string]: optional, call failure code (passed only during unsuccessful termination of a call, when transitioning to idle state)

Example

Calling placement method (it is important for the result to return in a callback):

BX24.placement.call('getStatus', {}, function (result) {
    console.log(result);
});

Subscription to a placement event (it's common for event subscription):
BX24.placement.bindEvent("CallCard::CallStateChanged", function (callState) {
   console.log(callState);
});


© «Bitrix24», 2001-2022
Up