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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應