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

مثال

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

مرجع واجهة برمجة تطبيقات JavaScript لحزمة تطوير البرامج (SDK) للدردشة المباشرة