onPresenceChange event (JavaScript API reference) for Dynamics 365 Channel Integration Framework 2.0
Invoked when the presence status of an agent has changed manually or programmatically.
eventData
The onPresenceChange
event takes the following eventData:
eventData | Example |
---|---|
{"presenceId": <guid>} |
{"presenceId": "efdeb843-c07a-e811-8162-000d3aa11f50"} |
{"presenceInfo":{"basePresenceStatus":<string>, "presenceColor":<string>, "presenceId":<string>,"presenceText":<string>}} |
{"presenceInfo":{"basePresenceStatus: "BUSY", "presenceColor": "#ff0000", "presenceId":"efdeb843-c07a-e811-8162-000d3aa11f50", "presenceText": "Busy"}} |
Example
handlerFunction = function (eventData) {
var obj = JSON.parse(eventData);
var presence = obj.presenceInfo.presenceText;
}
window.Microsoft.CIFramework.addHandler("onPresenceChange", handlerFunction);
See also
setClickToAct method
addHandler method
removeHandler method
getPresence method
setPresence method
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