---
updatedAt: 2026-01-26T16:28:38.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Click-to-call 

Kommo allows managers to make calls from any contact, company, or lead card by simply clicking on the phone number in the card.

<Image align="center" border={false} width="600px" src="https://files.readme.io/6cfd5b7ff3a7f46f06a7be170bc35b2c2cde822b4e391003252ea6b013f5c736-image.png" />

This functionality is implemented using the `add_action(type, action)` function:

| Parameter | Data type | Description                                                                       |
| :-------- | :-------- | :-------------------------------------------------------------------------------- |
| `type`    | string    | The type of the passed parameter (`email` or `phone`)                             |
| `action`  | function  | The function that will be called when clicking on a phone number or email address |

For example, you can use the `add_action(type, action)` function by placing it in the `init` callback function, which is a part of the **script.js** structure.

```javascript
init: function(self){
 /*
 * add call_to action
 * type: phone
 * Value of field phone
 */
 self.add_action('phone', function(data){
  self.crm_post (
   /* Send the request to your voip service
   * to perform dialing the number
   * The method crm_post (url, data, callback, type, error)
   */
   'http://yourservice.com/dealmethod.php',
  {
   call_to: data.value
  },
  function(msg){
   alert('Call is performed');
  },
  'text',
  function(){
    alert ('Error');
  }
  );
 });
}
```

<Callout icon="📘" theme="info">
  You need to declare the <Anchor label="widget locations" target="_blank" href="https://kommo.readme.io/docs/widget-locations">widget locations</Anchor> in the **manifest.json** in order to execute the `add_action(type, action)` function. You must set those locations where phone numbers are displayed
</Callout>

The following example specifies all the widget locations where phone numbers can be found

```json
{
  ...
    "locations": [
        "ccard-1",
        "clist-1",
        "lcard-1",
        "llist-1",
        "comcard-1",
        "everywhere"
    ],
  ...
}
```

If you want to change the label on the button that appears when you click on a phone number or email address, you will need to make the necessary changes in the **.json** localization file located in the **i18n** directory of your widget structure.

**i18n files**

```json i18n/en
{
    "widget": {
        "call_action": "Call"
    }
}
```
```json i18n/es
{
    "widget": {
        "call_action": "Llamar"
    }
}
```
```json i18n/pt
{
    "widget": {
        "call_action": "Chamar"
    }
}
```

If the `call_action` parameter is not specified, the button label will default to the name of your widget, which is a required parameter in **manifest.json**. The value of `call_action"` will be automatically inserted into the button when the widget is initialized.