Useful customizations itgrix_kmo (Kommo)

Since version 2.0.0.

Call processing scheme by Itgrix integration module

(Scheme for versions starting from 2.9.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

need_registration.php

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

2

process_call_params.php

Change the call registration parameters.

3

process_client_phone.php

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

4

process_contact_creation_params.php

Change the settings for creating a contact.

5

process_lead_creation_params.php

Changing the parameters for creating a deal.

6

process_originate_params.php

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

process_record_file_path.php

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

Description Converting record to mp3 format.

8

process_task_creation_params.php

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

Input and output parameters of customizations

1) need_registration

It is used to implement the functionality of black / white lists by numbers, trunks and other complex conditions.

Detailed description with examples in the article Black and white lists. How to setup?

2) process_call_params

Change the call registration parameters.

Enter:

{
   params: {
     "phone_number": “<Customer phone number
                     (already customized via process_client_phone)>”,
     "direction": “<Call direction. Takes values:
                  "inbound" - incoming, "outbound" - outgoing>”,
     "call_result": " ",
     "call_status": “<Call status. Takes values:
                    4 - answered; 6 - skipped>”,
     "created_by": “<ID of responsible user>”,
     "responsible_user_id": “<responsible user ID>”,
     "duration": “<Duration (of last call)>”,
     "link": “<Link to get the recording (of the last conversation)>”,
     "call": {<Call data set>},
     "entity_type": <Entity type: 1-contact, 2-company, 3-deal>,
     "entity_id": “<entity ID string>”,
     "entity_new": <bool, is the entity created on this call>
   }
}

The call data set (call) is described in the article Call parameters (call) and conversation (conversation) in customizations.

Return:

{
   data: {
     "phone_number": “<Customer phone number>”,
     "direction": “<Call direction. Takes values:
                  "inbound" - incoming, "outbound" - outgoing>”,
     "call_result": " ",
     "call_status": “<Call status. Takes values:
                    4 - answered; 6 - skipped>”,
     "created_by": “<ID of responsible user>”,
     "responsible_user_id": “<responsible user ID>”,
     "duration": “<Duration>”,
     "link": “<Link to get record>”
   },
   "state": "success"
}

3) process_client_phone

Convert customer phone numbers.

A detailed description with examples in the article Changing the customer number before sending to CRM.

4) process_contact_creation_params

Change the settings for creating a contact.

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

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

Detailed description of custom fields in the amoCRM API documentation.

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

Enter:

{
   params: {
     "call": {<Call data set.
             See section “Call parameters (call)”>},
     "custom_fields": [{
       "id": “<ID of custom contact field in account
             (received automatically)>”,
       "values": [{
         "enum": “<Field value.
                 Itgrix works with the value "WORK">”,
         "value": “<Caller's phone number>”
       }]
     }],
     "name": “<Contact name. Default "Contact <Tel.number>">”,
     "responsible_user_id": “<responsible user ID>”,
     "tags": “<Tags. Default "Itgrix">”
   }
}

Return:

{
   data: {
     "custom_fields": [{
       "id": “<ID of custom contact field in account>”,
       "values": [{
         "enum": “<Field value>”,
         "value": “<Caller's phone number>”
       }]
     }],
     "name": “<Contact Name>”,
     "responsible_user_id": “<responsible user ID>”,
     "tags": “<Comma-separated tags>”,
   },
   "state": "success"
}

The call data set (call) is described in the article Call parameters (call) and conversation (conversation) in customizations.

5) process_lead_creation_params

Changing the parameters for creating a deal.

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

Enter:

{
   params: {
     "call": {<Call data set.
             See section “Call parameters (call)”>},
     "contacts_id": [“<ID of the contact the deal is associated with>”],
     "name": “<Deal name.
             By default "<Phone number> - incoming/outgoing call">”,
     "pipeline_id": “<deal funnel ID>”,
     "responsible_user_id": “<responsible user ID>”,
     "tags": “<Tags. Default "Itgrix">”
   }
}

Return:

{
   data: {
     "contacts_id": [“<Contact ID>”],
     "name": “<Deal name>,
     "pipeline_id": “<deal funnel ID>,
     "responsible_user_id": “<responsible user ID>,
     "tags": “<Comma-separated tags>
   }
   "state": "success"
}

The call data set (call) is described in the article Call parameters (call) and conversation (conversation) in customizations.

6) process_originate_params

Changing parameters when initializing a call from amoCRM.

A detailed description with examples in the article Changing settings on click-to-call.

7) process_record_file_path

Converting the path to the conversation recording file.

A detailed description with examples in the article Customizing the file name of an audio recording.

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

When installing Itgrix_amo, the conversion of conversation recording files to mp3 is already enabled by default.

8) process_task_creation_params

Changing the settings for creating tasks on missed calls.

Enter:

{
   params: {
     "complete_till_at": “<Date-time when the task should be completed
                         (in Unix Timestamp format)>”,
     "element_id": “<ID of the entity the task is bound to>”,
     "element_type": “<The type of the entity the task is bound to.
                     Numeric value: 1 - Contact, 2 - Deal>”,
     "is_completed": “<Whether the task was completed. Always false on creation>”,
     "responsible_user_id": “<responsible user ID>”,
     "task_type": “<Task type. Numeric value:
                  1 - Call, 2 - Meeting, 3 - Letter>”,
     "text": “<Description of the task. By default "Call back <Tel number>">”,
   }
}

Return:

{
   data: {
     "complete_till_at": “<Date-time when the task should be completed
                         (in Unix Timestamp format)>”,
     "element_id": “<ID of the entity the task is bound to>”,
     "element_type": “<The type of the entity the task is bound to.
                     Numeric value: 1 - Contact, 2 - Deal>”,
     "is_completed": “<Whether the task was completed. Always false on creation>”,
     "responsible_user_id": “<responsible user ID>”,
     "task_type": “<Task type. Numeric value:
                  1 - Call, 2 - Meeting, 3 - Letter>”,
     "text": “<Task Description>”,
   },
   "state": "success"
}

Last updated