Agents can set their status to notify their availability for auto-assignment of conversation through IntelliAssign. The default statuses include Available, Unavailable, Ongoing call, and After call work. Agents can also create custom statuses such as In a meeting, Away from keyboard, and so on.
The event is triggered and the registered callback method is executed when:
- An agent’s existing default status is updated to a custom status or vice versa.
- An agent’s status is updated from one custom status to another.
Note:The agents can set custom statuses only if the custom status feature is enabled for the Freshchat account. For more information, see Setting up agent status in Freshchat.
Subscribe to the onAgentCustomStatusUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onAgentCustomStatusUpdate": {
"handler": "onAgentCustomStatusUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onAgentCustomStatusUpdateCallback: function(payload) {
console.log("Logging arguments from onAgentCustomStatusUpdate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onAgentCustomStatusUpdate event in the Freshchat system.
- agent_custom_statusobject
Details of the custom status set by the agent.
- associationsobject
All associated objects of the agent_custom_status object, that specify additional information pertaining to the updated custom status.
- changesobject
Changes that triggered the onAgentCustomStatusUpdate event, specified as a JSON object of the following format:
"changes": { //For non-array attributes "<agent_custom_status.attribute that changed>": ["New value", "Old value"] }
Example
"changes": { "status": [ "LUNCH", "UNAVAILABLE" ] }