displayErrorNotification

displayErrorNotification

Description: The displayErrorNotification is a one-way message sent from the client application to the CRM Connector, without expecting any confirmation in return.

This message is triggered when the application needs to display an error message based on the custom implementation of various features. For instance, it might show "User not found" when the CRM attempts to perform a screenpop.

Implementation Example

const handleError = (error) => {
  if (!error) {
    return;
  }

  const errMsg = {
    type: 'transient',
    severity: 'ERROR',
    textArray: ['This is', 'an', 'error'],
    title: 'This is the error title',
    dialogId: 1,
    persist: false,
    store: true
  }

  publishMessage(clientIframe, crmConnectOrigin, 'ClientAppMessage', 'displayErrorNotification', errMsg);
}

Message formats

Client Application

{ "type": "ClientAppMessage", "action": "displayErrorNotification", <error> }

Generic error format

{
  "type": <string>, // The type of error
  "serverity": <string>, // The severity of the error
  "textArray": <array>, // The text of the error in an array format
  "title": <string>, // The title of the error
  "dialogId": <number>, // The Id of the error
  "persist": <boolean>, // Dictates whether or not the notification stays on the screen
  "store": <boolean>, // Dictates whether or not the notification gets stored in the exception center
}

Error types

TypeDescription
transientSnackbar notification
okDialogSimple dialog box with an Ok confirmation button
okCancelDialogDialog box with Ok and Cancel buttons
fixedDialogDialog box without buttons
htmlDesktop notification (The CRM must have notification permissions enabled on its domain)

Error Severities

Severity
EVENT
INFO
WARNING
ERROR
CRITICAL
SUCCESS