Editar

Compartilhar via


lcw:error event (Omnichannel for Customer Service JavaScript API reference)

Omnichannel for Customer Service offers a suite of capabilities that extend the power of Dynamics 365 Customer Service Enterprise to enable organizations to instantly connect and engage with their customers across digital messaging channels. An additional license is required to access Omnichannel for Customer Service. For more information, see the Dynamics 365 Customer Service pricing overview and Dynamics 365 Customer Service pricing plan pages.

This event is raised in case an error occurs during the lifetime of a chat.

For information about error codes and error messages, see the Error code reference for Omnichannel for Customer Service.

Example

The sample code given below shows how the errorEvent is caught and how the error details are obtained.

window.addEventListener("lcw:error", function (errorEvent) {
    let errorDetail = errorEvent.detail; // Object containing details about the error event
    let errorCode = errorEvent.detail.errorCode; // Error code corresponding to the error event
    let errorDescription = errorEvent.detail.errorDescription; // Description of the error
});

lcw:ready
lcw:chatRetrieved
lcw:chatQueued
lcw:onClose
lcw:closeChat
lcw:startChat
lcw:onMinimize
lcw:onMaximize
lcw:onMessageReceived
lcw:onMessageSent
lcw:threadUpdate

JavaScript API reference for Live chat SDK