title | description | ms.date | ms.topic | author | ms.author | ms.custom | ||
---|---|---|---|---|---|---|---|---|
getPresence (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 2.0 | MicrosoftDocs |
Includes reference information such as description, syntax, and parameters for the getPresence method in JavaScript API Reference for Dynamics 365 Channel Integration Framework 2.0. |
04/04/2022 |
reference |
gandhamm |
mgandham |
|
Returns the presence text of the agent in the client session.
Microsoft.CIFramework.getPresence();
None.
Promise with the presence text of the current agent, as String.
function getPresence() {
return new Promise((resolve, reject) => {
Microsoft.CIFramework.getPresence().then(
function (result) {
if (result == "FAILED")
//your code handling for failure
else {
//your code for success
}
return result;
},
function (error) {
// code handling for promise failure
});
});
[!INCLUDEfooter-include]