ready

Mandatory: Yes

Description: To establish a connection between the client application and CRM Connector when an agent is activated, the CRM Connector application continuously sends ready messages.

Once the client application intercepts these messages and sends a ready confirmation back to CRM Connector, the application can start operating under normal conditions.

Example

// For publishMessage method explanation see Getting started.
const sendReadyPing = () => {
  publishMessage(clientIframe, CRM_CONNECT_ORIGIN, 'ClientAppMessage', 'ready');
}
  • 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.

Message formats

CRM Connector

{ "type": "CRMConnectMessage", "action": "ready" }

Client Application

{ "type": "ClientAppMessage", "action": "ready" }