getFocusedSession (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 only in Omnichannel for Customer Service app.
Returns the unique identifier of the session that is in focus, if it belongs to the channel provider else returns null.
Syntax
Microsoft.CIFramework.getFocusedSession().then(successCallback, errorCallback);
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| successCallback | Function | No | A function to call when the request for setting the panel state is successful |
| errorCallback | Function | No | A function to call when the request for setting the panel state fails |
Return value
Promise with the value as String
Example
Microsoft.CIFramework.getFocusedSession().then(
function success(result) {
console.log(result);
// perform operations on session id value
},
function (error) {
console.log(error.message);
// handle error conditions
}
);
Feedback
Submit and view feedback for