LogoLogo
  • What is Itgrix
  • Contacts
  • Our story
  • Connector installation
    • System requirements
    • Itgrix for Bitrix24 and Asterisk
      • How to perform offline authorization
      • How to obtain a license offline
      • Configuring the connector to work in a closed network
      • Call tests
    • Itgrix for Kommo and Asterisk
      • Restricted mode setting features
      • Call card
      • Call tests
  • Additional functions
    • Automatic call transfer to responsible manager
    • Setting up click-to-call features
      • Features of customization after Bitrix24 23.300.0 update
    • Autoreplacement for phone numbers
    • How to view employee call statistics in Bx24
    • FMC number recognition
    • Configuring WebRTC in Asterisk (FreePBX)
    • Itgrix AsterPhone for Bitrix24
    • Itgrix AsterPhone for Kommo
  • For admins
    • Running an additional copy of the module
    • Deploying a module backup
    • Call processing for the period
    • Examples of the structure of registered calls from CEL
    • Wrong time in created cases in Bitrix24
    • SSH access
    • Useful commands
    • Script to test the module service
    • Changing login and password to enter the admin panel
    • Module files
    • Status monitoring
    • Application update
    • In the CEL table, there is no internal employee number in the cid_num column
    • How to fix click-to-call
    • Custom SSL certificates for https requests
    • Examples of configuring WSS connections
    • Converting recordings to MP3 before sending to Bitrix24
    • How to fix call recording problems
    • Install and configure CEL
    • B24 authorization bugfix
  • Useful customizations (any CRM)
    • Audio file name customization
    • Call data (call_full) in customizations
    • Change the number / context for calling to asterisk
    • Change phone number before sending data to CRM
    • Black and white lists
  • Useful customizations itgrix_bx (Bitrix24)
  • Useful customizations itgrix_kmo (Kommo)
  • FAQ
    • How to pay
    • How to check licence status
    • Differences in connection to B24 via SIP-connector and Itgrix
    • How to turn off the display of calls in the calendar
    • How to view statistics on employee calls
    • Updating the app
    • Offline install (only for Bitrix24)
    • Offline update
    • Reliable softphones for Asterisk
    • Detail-call-statuses
  • Changelog Itgrix_bx
  • Changelog Itgrix_kommo
  • Policy of interaction with Asterisk
Powered by GitBook
On this page
  • Call processing scheme by Itgrix integration module
  • Brief description of customizations
  • Input and output parameters of customizations
  • 1) need_registration
  • 2) process_call_params
  • 3) process_client_phone
  • 4) process_contact_creation_params
  • 5) process_lead_creation_params
  • 6) process_originate_params
  • 7) process_record_file_path
  • 8) process_task_creation_params
  • 9) customize_autodistribution
  • 10) post_registration
  • 11) process_contact_update_params
  • 12) process_lead_update_params
  • 13) process_unsorted_creation_params

Was this helpful?

Useful customizations itgrix_kmo (Kommo)

Since version 3.0.0.

PreviousUseful customizations itgrix_bx (Bitrix24)NextFAQ

Last updated 2 months ago

Was this helpful?

Call processing scheme by Itgrix integration module

(Scheme for versions starting from 3.0.0)

"Request a conversation" - when the phone rings at the employee / client. There can be several "conversations" in one "call" (in case of call transfer).

Brief description of customizations

â„–

Customization file (in alphabetical order)

Description

1

Is it necessary to register the call? It is possible to make black/white lists by internal number/trunk.

2

Change the call registration parameters.

3

Change your phone number before registering to CRM. You can change the format of your phone number (+7, 8...).

4

Change the settings for creating a contact.

5

Changing the parameters for creating a deal.

6

Changing parameters when initiating a call from CRM. You can call through another trunk, through another context, change the number format, and so on.

7

Customizing the path to the conversation recording file. Also in this file, converting from wav to mp3 format is configured.

8

9

Customization of autodistribution of incoming calls.

10

Actions after the call has been logged.

11

Change the contact's update settings.

12

Change the lead's update settings.

13

Changes the parameters for creating unsorted. Allows you to change the contact and lead fields.

Input and output parameters of customizations

1) need_registration

Used to implement black/white list functionality by numbers, trunks and other more complex conditions.

Basic black/white list configuration for internal numbers is available from the admin panel.

Examples: Black/white list for trunks.

Input:

{
  "call_full": {<Full call data set>},
  "call_stage": "<Call Stage. For this customization one of the options is:
     conversation_requested - call request;
     conversation_accepted  - answer;
     conversation_ended     - end of conversation;
     call_ended             - call end>"
}

The full set of call data is described in the article Call data (call_full) in customizations.

Return:

{
  "data": {
    "result": <true - register; false - ignore>
  },
  "state": "success"
}

2) process_call_params

Changing call registration parameters.

Read more about call statuses (call_status and call_result fields) in the article Detailed call statuses.

Input:

{
  "call_full": {<Full call data set>},
  
  "call_result": "<Call result>",
  "call_status": <Call Status>,
  "created_at": <Date the call was created (in Unix Timestamp format)>,
  "created_by": <responsible user ID>,
  "direction": "<Call Direction. Values:
                "inbound" - incoming, "outbound" - outgoing>",
  "duration": <Duration (of the last call) in seconds>,
  "link": "<Link to get the recording (of the last conversation)>",
  "phone": "<Client's phone number
            (already customized via process_client_phone)>",
  "responsible_user_id": <responsible user ID>,
  "source": "itgrix_amo"
}

The full set of call data is described in the article Call data (call_full) in customizations.

Return:

{
  "data": {
    "call_result": "<Call result>",
    "call_status": <Call Status>,
    "created_at": <Date the call was created (in Unix Timestamp format)>,
    "created_by": <responsible user ID>,
    "direction": "<Call Direction. Values:
                    "inbound" - incoming, "outbound" - outgoing>",
    "duration": <Duration (of the last call) in seconds>,
    "link": "<Link to get the recording (of the last conversation)>",
    "phone": "<Client's phone number
                (already customized via process_client_phone)>",
    "responsible_user_id": <responsible user ID>,
    "source": "itgrix_amo"
  },
  "state": "success"
}

3) process_client_phone

Converting client phone numbers before sending requests to amoCRM.

Auto number change is available, it is started BEFORE customization is performed.

Examples in the article Changing customer number before sending to CRM.

Input:

{
  "phone": "<номер>",
  
  "call_full": {<Full call data set>},
  "call_stage": "<Call Stage. For this customization one of the options is:
     conversation_requested - call request;
     conversation_accepted  - answer;
     conversation_ended     - end of conversation;
     call_ended             - call end>"
}

Return:

{
  "data": {
    "phone": "<Customized number>"
  },
  "state": "success"
}

4) process_contact_creation_params

Changing contact creation parameters.

In Kommo, by default, there is no field for a phone number in a contact. Instead, custom contact fields are used.

Itgrix_kmo works with the contact field "code": "PHONE" at the available value "enum": "WORK". If there is no such field for contacts in the account, the module will not run.

Example: Changing the tag when creating a contact/deal.

Input:

{
  "call_full": {<Full call data set>},

  "custom_fields_values": [
    {
      "field_id": <ID of the custom contact field in the account
                   (retrieved automatically)>,
      "values": [
        {
          "enum_code": "<Field value.
                        Itgrix works with the value "WORK">",
          "value": "<Phone number of the caller>"
        }
      ]
    }
  ],
  "name": "<Contact Name. Default "Contact <Phone number>">",
  "responsible_user_id": <Responsible user ID>,
  "tags": [
    "Itgrix"
  ]
}

Return:

{
  "data": {
    "custom_fields_values": [
      {
        "field_id": <ID of the custom contact field in the account
                    (retrieved automatically)>,
        "values": [
          {
            "enum_code": "<Field value.
                          Itgrix works with the value "WORK">",
            "value": "<Phone number of the caller>"
          }
        ]
      }
    ],
    "name": "<Contact Name. Default "Contact <Phone number>">",
    "responsible_user_id": <Responsible user ID>,
    "tags": [
      "Itgrix"
    ]
    
    // Other fields can also be set
  },
  "state": "success"
}

5) process_lead_creation_params

Changing the parameters for lead creating.

Example: Changing the tag when creating a contact/lead.

Input:

{
  "call_full": {<Full call data set>},
  
  "_embedded": {
    "contacts": [
      {"id": <Contact ID to which the lead is linked>}
    ],
    "tags": [
      {"name": "Itgrix"}
    ]
  },
  "name": "<Lead title.
          By default "<Phone number> - [missed] incoming/outgoing">",
  "pipeline_id": <Lead funnel ID>,
  "responsible_user_id": <Responsible user ID>,
  "status_id": <ID of the status to which the lead is added>
}

Return:

{
  "data": {
    "_embedded": {
      "contacts": [
        {"id": <Contact ID to which the lead is linked>}
      ],
      "tags": [
        {"name": "Itgrix"}
      ]
    },
    "name": "<Lead title.
          By default "<Phone number> - [missed] incoming/outgoing">",
    "pipeline_id": <Lead funnel ID>,
    "responsible_user_id": <Responsible user ID>,
    "status_id": <ID of the status to which the lead is added>
    
    // Other fields can also be set
  },
  "state": "success"
}

6) process_originate_params

Changing parameters at call initialization from Kommo.

Detailed description with examples in the article Changing parameters during click-to-call.

7) process_record_file_path

Converting the path to a call recording file.

Detailed description with examples in the article Customizing audio file name.

When registering a call in amoCRM, a player will be added to the note to play a recording of that call (via a link that the Itgrix module adds automatically). But the player only supports mp3 format.

Conversion of call recording files to mp3 is already enabled by default when installing Itgrix_kmo.

Since conversion of records can take considerable time, this customization has an individual timeout of 10 seconds (can be changed in the connector configuration file - /etc/itgrix_amo/config.json).

If the record fails to convert before the timeout expires, the original file will be used.

8) process_task_creation_params

Customization of task creation parameters (on missed incoming call or unanswered outgoing call).

This customization works only if task creation is enabled in the Connector settings.

This customization is done after applying settings from the admin area..

Input:

{
  "call_full": {<Full call data set>},
  
  "complete_till": <Date-Time when the task is to be completed
                    (in Unix Timestamp format)>,
  "created_by": <ID of the user creating the task>,
  "entity_id": <ID of the entity to which the task is bound>,
  "entity_type": "<Type of entity to which the task is bound.
                  Takes values: "contacts", "leads">",
  "is_completed": <Whether the task is completed. When created, always false>,
  "responsible_user_id": <Responsible user ID>,
  "task_type": <Task Type. Numerical value:
                1 - Call, 2 - Meet, 3 - Email>,
  "text": "<Task Description. Default:
           "Call back <Entity name> on a missed call from a number <Phone number>">"
}

Return:

{
  "data": {
    "complete_till": <Date-Time when the task is to be completed
                      (in Unix Timestamp format)>,
    "created_by": <ID of the user creating the task>,
    "entity_id": <ID of the entity to which the task is bound>,
    "entity_type": "<Type of entity to which the task is bound.
                    Takes values: "contacts", "leads">",
    "is_completed": <Whether the task is completed. When created, always false>,
    "responsible_user_id": <Responsible user ID>,
    "task_type": <Task Type. Numerical value:
                  1 - Call, 2 - Meet, 3 - Email>,
    "text": "<Task Description. Default:
             "Call back <Entity name> on a missed call from a number <Phone number>">"

    // Other fields can also be set
  },
  "state": "success"
}

9) customize_autodistribution

Customization of autodistribution of incoming calls.

For the auto-distribution function to work, it is necessary to configure Asterisk, described in the article Auto-distribute a call to the responsible manager.

Input:

{
  "number": "<the number of the user to whom the call should be distributed>",
  "name":   "<the name of the user to whom the call should be distributed>",

  "from": "<Calling number>",
  "trunk": "<Trunk number>",
  "request_data": {<Parameters of autodistribution request as is>},
  "entity": {<Found entity data>},
  "error": "<error message>"
}

Return:

{
  "data": {
    "number": "<the number of the user to whom the call should be distributed>",
    "name":   "<the name of the user to whom the call should be distributed>"
  },
  "state": "success"
}

name - the text that will appear in CallerID and will be displayed in the operator's phone (or softphone).

Must be no more than 20 characters (Asterisk limitation)!

Fields from, trunk, entity and error - are read-only and only present when not empty.

These fields, as well as request_data will be automatically deleted even if you return them in the object data.

10) post_registration

This customization gives you the option to perform any actions after the call is registered.

Input:

{
  "call_full": {<Full call data set>}
}

Return:

The only thing that needs to be returned state, the other things are ignored.:

{
  "state": "success"
}

11) process_contact_update_params

Changing contact update settings.

Input:

{
  "call_full": {<Full call data set>},
  
  "id": <Contact ID>,
  "responsible_user_id": <Responsible user ID>
}

Вернуть:

{
  "data": {
    "id": <Contact ID>,
    "responsible_user_id": <Responsible user ID>

    // Other fields can also be set
  },
  "state": "success"
}

12) process_lead_update_params

Changing the parameters of lead update.

Input:

{
  "call_full": {<Full call data set>},
  
  "id": <Lead ID>,
  "responsible_user_id": <Responsible user ID>
}

Return:

{
  "data": {
    "id": <Lead ID>,
    "responsible_user_id": <Responsible user ID>

    // Other fields can also be set
  },
  "state": "success"
}

13) process_unsorted_creation_params

Changes the parameters for creating an unassembled. Allows you to change the contact and transaction fields.

Input:

{
  "call_full": {<Full call data set>},

  "_embedded": {
    "contacts": [{
      "custom_fields_values": [{
        "field_id": <ID of the custom contact field in the account
                    (retrieved automatically)>,
        "values": [{
          "enum_code": "<Field value.
                        Itgrix works with the value "WORK">",
          "value": "<Phone number of the caller>"
        }]
      }],
      "name": "<Contact Name. Default "Contact <Phone number>">",
      "tags": [
        "Itgrix"
      ]
    }],
    "leads": [{
      "name": "<Lead title.
               By default "<Phone number> - [missed] incoming/outgoing">",
      "pipeline_id": <Lead funnel ID>,
      "tags": [
        {"name": "Itgrix"},
      ]
    }]
  },
  "created_at": <Date of unsorted creation (in Unix Timestamp format)>,
  "metadata": {
    "called_at": <When the call was made (in Unix Timestamp format)>,
    "duration": <Call duration in seconds>,
    "from": "<Calling number>",
    "is_call_event_needed": false,
    "link": "<Call recording link>",
    "phone": "<The phone number that was called>",
    "service_code": "itgrix_amo",
    "uniq": "<Unique call ID.
              Itgrix is sending linkedid>"
  },
  "pipeline_id": <Lead funnel ID>,
  "source_name": "itgrix_amo",
  "source_uid": "<UID of request source.
                  Itgrix is sending linkedid>"
}

Return:

{
  "data": {
    "_embedded": {
      "contacts": [{
        "custom_fields_values": [{
          "field_id": <ID of the custom contact field in the account
                      (retrieved automatically)>,
          "values": [{
            "enum_code": "<Field value.
                          Itgrix works with the value "WORK">",
            "value": "<Phone number of the caller>"
          }]
        }],
        "name": "<Contact Name. Default "Contact <Phone number>">",
        "tags": [
          "Itgrix"
        ]
      }],
      "leads": [{
        "name": "<Lead title.
                By default "<Phone number> - [missed] incoming/outgoing">",
        "pipeline_id": <Lead funnel ID>,
        "tags": [
          {"name": "Itgrix"},
        ]
      }]
    },
    "created_at": <Date of unsorted creation (in Unix Timestamp format>,
    "metadata": {
      "called_at": <When the call was made (in Unix Timestamp format)>,
      "duration": <Call duration in seconds>,
      "from": "<Calling number>",
      "is_call_event_needed": false,
      "link": "<Call recording link>",
      "phone": "<The phone number that was called>",
      "service_code": "itgrix_amo",
      "uniq": "<Unique call ID.
                Itgrix is sending linkedid>"
    },
    "pipeline_id": <Lead funnel ID>,
    "source_name": "itgrix_amo",
    "source_uid": "<UID of request source.
                    Itgrix is sending linkedid>"

    // Other fields can also be set
  },
  "state": "success"
}

Description .

Changing the settings for creating tasks on missed calls. Changing the task name can interfere with the .

Detailed description of custom fields in .

The parameters of the contact creation request are described in the .

The parameters of the transaction creation request are described in the .

Parameters of the task creation request are described in the .

The parameters of the contact update request are described in the .

Parameters of transaction update request are described in .

Kommo API documentation
Kommo API documentation
Kommo API documentation
Kommo API documentation
Kommo API documentation
Kommo API documentation
need_registration.php
process_call_params.php
process_client_phone.php
process_contact_creation_params.php
process_lead_creation_params.php
process_originate_params.php
process_record_file_path.php
Converting record to mp3 format
process_task_creation_params.php
automatic task completion option
customize_autodistribution.php
post_registration.php
process_contact_update_params.php
process_lead_update_params.php
process_unsorted_creation_params.php