removeContextProvider

Customer Service 用オムニチャネルには、Dynamics 365 Customer Service Enterprise の機能を拡張する一連の機能が用意されていて、組織はデジタル メッセージング チャネルを通して顧客と即座につながり、やり取りできるようになります。 Customer Service 用オムニチャネルにアクセスする際は、追加のライセンスが必要です。 詳細については、Dynamics 365 Customer Service 価格の概要Dynamics 365 Customer Service 価格プラン ページを参照してください。

現在設定されているカスタムコンテキストプロバイダ(存在する場合)を削除します。

ライブ チャット SDK メソッドは、 lcw:ready イベント が発生した後に呼び出す必要があります。 このイベントをリッスンするには、ウィンドウオブジェクトに独自のイベントリスナーを追加します。

構文

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

パラメーター

None

戻り値

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

ライブチャットSDKのJavaScript APIリファレンス