Compartir a través de


removeContextProvider

La Plataforma omnicanal para Customer Service ofrece un conjunto de funciones que extienden la potencia de Dynamics 365 Customer Service Enterprise con el que las organizaciones pueden conectarse e interactuar de forma instantánea con sus clientes en distintos canales de mensajería digital. Se necesitan una licencia adicional para acceder a la Plataforma omnicanal para Customer Service. Para más información, consulte las páginas Descripción general de precios de Dynamics 365 Customer Service y Plan de precios de Dynamics 365 Customer Service.

Quita el proveedor de contexto personalizado establecido actualmente, si lo hay.

Nota:

Los métodos del SDK de chat en vivo deben invocarse después de que se genere el evento lcw:ready . Puede escuchar este evento agregando su propio detector de eventos en el objeto window.

Syntax

Microsoft.Omnichannel.LiveChatWidget.SDK.removeContextProvider();

Parámetros

Ninguno

Valor devuelto

Ninguno

Example

window.addEventListener("lcw:ready", function handleLivechatReadyEvent(){
   // Set the custom context provider
   // Throws error if contextProvider is not a function
   Microsoft.Omnichannel.LiveChatWidget.SDK.setContextProvider(function contextProvider(){
      // Here it is assumed that the corresponding work stream would have context variables with logical name of 'contextKey1', 'contextKey2', 'contextKey3'.
      return {
                 'contextKey1': 'contextValue1', // string value
                 'contextKey2': 12.34, // number value
                 'contextKey3': true // boolean value
      };
   });

   // Removes the currently set custom context provider, if any
   Microsoft.Omnichannel.LiveChatWidget.SDK.removeContextProvider();
});

Referencia de la API de JavaScript para el SDK de chat en vivo