telephony.externalcall.register
Method registers a call in Bitrix24. For this purpose, it searches an object that corresponds to the number in CRM. If the method finds it, it adds the call, connected to the object found. If the method didn't find it, it can create a lead automatically.
Simultaneously with the registration of a call, method optionally can show the user the call ID screen. The user, to whom the card is shown, is identified either by USER_ID, or by USER_PHONE_INNER. (That is, fields are marked as required, but actually, only one of two is required.)
Method is accessible to the owner of the access right for Call statistics - modification, if granted.
To create a call "activity", it is also necessary to call the telephony.externalcall.finish method
Function parameters
Parameter | Description | Type of value |
---|---|---|
USER_PHONE_INNER | Internal number of the user. Required. | string |
USER_ID | User ID. Required. | int |
PHONE_NUMBER | Telephone number. Required | string |
TYPE | Type of call: 1 - outbound, 2 - inbound. Required. | int |
CALL_START_DATE | Date/time of the call in the ISO8601 format. | string |
CRM_CREATE | [0/1] Option to create or not a new lead (if the number is not found in CRM), as well as a new activity for a call. When selecting 0 disabling of activity creation will not occur. | int |
CRM_SOURCE | STATUS_ID of the source from the source selection list. You can receive a list of sources by the crm.status.list method with filter by "ENTITY_ID": "SOURCE" . | string |
CRM_ENTITY_TYPE | Type of CRM object, from the details card of which the call is made - CONTACT | COMPANY | LEAD. | string |
CRM_ENTITY_ID | CRM object ID, type of which is specified in CRM_ENTITY_TYPE | int |
SHOW | [0/1] Option to display or not the call ID screen (by default is 1). | int |
CALL_LIST_ID | Call dialing list ID, to which the call should be connected. | int |
LINE_NUMBER | Number of external line, via which the call was made (see. telephony.externalLine.add). Optional. | string |
TYPE | Type of call: 1 - outbound 2 - inbound 3 - inbound with forwarding 4 - callback | integer |
Returned value
Method returns an array:
Parameter | Description | Type of value |
---|---|---|
CALL_ID | Call ID inside Bitrix24. | int |
CRM_CREATED_LEAD | Created lead ID (is created, if the object is not found in CRM by the incoming number) | int |
CRM_ENTITY_ID | ID of the object found in CRM. | int |
CRM_ENTITY_TYPE | Type of the object found in CRM by the incoming number CONTACT | COMPANY | LEAD. | string |