requestOpenReports
requestOpenReports
Mandatory: no
Description: The requestOpenReports* feature is designed to display a comprehensive list of all interaction logs within the application. This feature allows users to request and view detailed logs of interactions, providing valuable insights and data for analysis.
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 === 'requestOpenReports') {
    processOpenReports(data);
  }
}
const processOpenReports = (data) => {
  // Open contact's page based on the received URL
  const recordId = data.url.replace('/', '');
  if (recordId) {
    // Use your CRM's API to pop on the contact page
  } else {
    // Use your CRM's API to pop on the interaction logs
  }
}
Message formats
CRM Connector
{ "type": "CRMConnectMessage", "action": "requestOpenReports", "data": <crmConnectorDataObject> }
CRM Connector data object format
{
  "url": <string> // this URL represents the contact page where the CRM must pop to
}
Updated about 1 year ago