getContextProvider

Customer Service plataforma ororentzat plataforma oro har, Dynamics 365 Customer Service Enterpriseren boterea zabaltzen duten gaitasun-multzo bat eskaintzen du, erakundeek berehala beren bezeroekin konexioan eta interaktuatu ahal izateko, mezularitza digitaleko kanalen bidez. Baimen gehigarri bat behar da Customer Servicerako Plataforma omnikanalean sartzeko. Informazio gehiago lortzeko, kontsultatu Dynamics 365 Customer Serviceren prezioen deskribapen orokorra eta Dynamics 365 Customer Serviceren prezio planaren orriak.

Gaur egun ezarritako testuinguru pertsonalizatuaren hornitzailea berreskuratzen du, halakorik badago.

Oharra

Zuzeneko txat-aren SDK-aren metodoak lcw: ready ekitaldia sortu ondoren erabili behar dira. Ekitaldi hau entzun dezakezu, window objektuan egiten dituen ekitaldien detektagailua gehituz.

Sintaxia

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

Parametroak

Bat ere ez

Itzulitako balioa

Gaur egun ezarritako testuinguru pertsonalizatuko hornitzailea itzultzen du, halakorik badago. Erregistratutako testuinguru pertsonalizatuko hornitzailerik ez badago, itzuli null.

Example

window.addEventListener("lcw:ready", function handleLivechatReadyEvent(){
   // Setting 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
      };
   });

   // Retrieves the currently set custom context provider
   // If there is no registered custom context provider, then it returns null
   let registeredContextProvider = Microsoft.Omnichannel.LiveChatWidget.SDK.getContextProvider();
});

-->

JavaScript-en API-ren erreferentzia, zuzeneko txat-aren SDK-erako