requestToggleSoftphone
requestToggleSoftphone
Mandatory: no
Descriptiopn: The requestToggleSoftphone feature is used to open the connector application (if it is minimized) when a new interaction arrives. This ensures that the user is immediately notified and can respond promptly to the new interaction.
Implementation Example
// This is a part of the mandatory in-place event message handler
const processCRMConnectMessageData = async (event) => {
if (event.origin !== CRM_CONNECT_ORIGIN) {
return;
}
const { action, data } = event.data;
if (action === 'requestToggleSoftphone') {
processToggleSoftphone(data.visible)
}
}
const processToggleSoftphone(visible) {
// Implement your own toggle mechanism based on the CRM you're using (if it is supported)
}
Message formats
CRM Connector
{ "type": "CRMConnectMessage", "action": "requestToggleSoftphone", "data": <crmConnectorDataObject> }
CRM Connector data object format
{
"visible": <boolean> // Dictates whether the connector should be minimized or maximized
}
Updated about 1 month ago