removeContextProvider

Multicanle para Customer Service ofrece un conxunto de capacidades que amplían o poder de Dynamics 365 Customer Service Enterprise para permitir ás organizacións conectarse instantáneamente e interactuar cos seus clientes a través de canles como o chat en directo e SMS. Requírese unha licenza adicional para acceder á Multicanle para Customer Service. Para obter máis información, consulte as páxinas Visión xeral dos prezos de Dynamics 365 Customer Service e Plan de prezos de Dynamics 365 Customer Service .

Elimina o provedor de contexto personalizado configurado actualmente, se o hai.

Nota

Os métodos SDK de chat en directo deben ser invocados despois de que se levante o evento lcw:ready . Pode escoitar este evento engadindo o seu propio oínte de eventos no obxecto da xanela.

Sintaxe

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

Parámetros

Ningunha

Valor de devolución

Ningunha

Exemplo

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 da API JavaScript para o SDK de chat en directo