removeContextProvider

Multisaluran untuk Customer Service menawarkan serangkaian kemampuan yang memperluas kekuatan Dynamics 365 Customer Service Enterprise untuk memungkinkan organisasi terhubung dan berinteraksi secara instan dengan pelanggan mereka di seluruh saluran olahpesan digital. Lisensi tambahan diperlukan untuk mengakses Multisaluran untuk Customer Service. Untuk informasi selengkapnya, lihat Ikhtisar harga Dynamics 365 Customer Service dan halaman Paket harga Dynamics 365 Customer Service.

Menghapus penyedia konteks kustom yang saat ini ditetapkan, jika ada.

Nota

Metode SDK obrolan langsung harus dipanggil setelah peristiwa lcw:ready diangkat. Anda dapat mendengarkan peristiwa ini dengan menambahkan pemroses peristiwa Anda sendiri pada objek jendela.

Syntax

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

Parameter-parameternya

None

Mengembalikan nilai

None

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();
});

Referensi API JavaScript untuk SDK live chat