---
updatedAt: 2026-02-10T16:13:11.000Z
---

# enableClickToDial

### enableClickToDial

<u>**Mandatory**: No</u>

**Description**: Depending on the isEnabled setting in the click-to-dial configuration, CRM Connector sends a request to the client application to enable or disable the click-to-dial feature, typically to control the call buttons in the CRM.

***Example***

```javascript
// For publishMessage method explanation see Getting started.
const sendCRMData = () => {
  // Your own implementation to toggle the CTD functionality based on your CRM
  publishMessage(clientIframe, CRM_CONNECT_ORIGIN, 'ClientAppMessage', 'enableClickToDial');
}
```

* ***clientIframe*** represents the iFrame where the application is embedded. usually we can set an id and access in this way

```javascript
// This is a dummy id. You can use another one if you see fit.
clientIframe = document.getElementById('crmConnectIframeId');
```

* ***CRM\_CONNECT\_ORIGIN*** represents the URL or origin of the CRM Connector application. For a more explicit documentation see ***Getting started***.

****Note:*** For each message sent by CRM Connector that needs to be intercepted by the client application, ensure there is a ***mechanism in place to verify and process the received messages.****

***Implementation example***

```javascript
const enableClickToDial = (data) => {
  if (data.isEnabled) {
    registerClickToDialListener(); // Bring your own implementation
  } else {
    destroyClickToDialListener(); // Bring your own implementation
  }
}
```

## Message formats

### CRM Connector

```json
{ "type": "CRMConnectMessage", "action": "enableClickToDial", "data": <crmConnectorDataObject> }
```

#### CRM Connector data object format

```json
{ 
  "isEnabled": <boolean> // Value that dictates if the CTD feature should be enabled on your CRM
}
```

### Client Application

```json
{ "type": "ClientAppMessage", "action": "enableClickToDial" }
```