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
}
);
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for