requestResizeSoftphoneWidth
requestResizeSoftphoneWidth
Mandatory: No
Description: Under certain circumstances, the CRM Connector application will change its dimensions in both height and width.
To facilitate this, whenever the CRM Connector application requires a size change, it will issue a requestResizeSoftphoneWidth message. This message must be intercepted by the client application to execute the resizing action, as it is necessary for the client application.
Example
// For publishMessage method explanation see Getting started.
const sendCRMData = () => {
// Your own implementation to resize the softphone based on the CRM.
publishMessage(clientIframe, CRM_CONNECT_ORIGIN, 'ClientAppMessage', 'shoftphoneWidthResized', <data>);
}
- 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.
-
data represents the updated width after which the resizing was done
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.
Message formats
CRM Connector
{ "type": "CRMConnectMessage", "action": "requestResizeSoftphoneWidth", "data": <crmConnectorDataObject> }
CRM Connector data object format
{
"width": <number> // Numerical value representing the width
}
Client Application
{ "type": "ClientAppMessage", "action": "shoftphoneWidthResized", "data": "<width>" }
Updated 7 days ago