Uredi

Deli z drugimi prek


getSession (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 2.0

Note

This content applies only to Dynamics 365 Channel Integration Framework version 2.0.

Note

Session management APIs allow you to integrate multisession experiences in Customer Service workspace app only.

Returns an object containing the unique identifier of the session, unique identifier of the conversation, context and the value of isFocused parameter, in case the session belongs to the channel provider.

Syntax

Microsoft.CIFramework.getSession(sessionId).then(successCallback, errorCallback);

Parameters

Name Type Required Description
sessionId String Yes Id of the current session
successCallback Function No Call when the request for the current width value is successful
errorCallback Function No Call when the request for the current width value fails

Return value

Object containing session Id, conversation Id, context and isFocused parameter

Example

Microsoft.CIFramework.getSession("session-id-1").then(
    function success(result) {
        console.log(result);
        // perform operations on session info
    },
    function (error) {
        console.log(error.message);
        // handle error conditions
    }
);