enableClickToDial
enableClickToDial
Mandatory: No
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
// 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
// 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
const enableClickToDial = (data) => {
if (data.isEnabled) {
registerClickToDialListener(); // Bring your own implementation
} else {
destroyClickToDialListener(); // Bring your own implementation
}
}
Message formats
CRM Connector
{ "type": "CRMConnectMessage", "action": "enableClickToDial", "data": <crmConnectorDataObject> }
CRM Connector data object format
{
"isEnabled": <boolean> // Value that dictates if the CTD feature should be enabled on your CRM
}
Client Application
{ "type": "ClientAppMessage", "action": "enableClickToDial" }
Updated 7 days ago