requestResizeSoftphoneHeight
requestResizeSoftphoneHeight
Mandatory: No
Description: The CRM Connector application may change its dimensions in both height and width under certain circumstances.
To facilitate this, whenever the CRM Connector application needs to change its size, it will issue a requestResizeSoftphoneHeight 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', 'shoftphoneHeightResized', <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 height 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": "requestResizeSoftphoneHeight", "data": <crmConnectorDataObject> }
CRM Connector data object format
{
"height": <number> // Numerical value representing the height
}
Client Application
{ "type": "ClientAppMessage", "action": "shoftphoneHeightResized", "data": "<height>" }
Updated 3 months ago