Configure onAgentActivityCreate

Agent activity is a metric that helps supervisors to assess how agents spend their business hours when they are unavailable in the Freshworks system. Your app can respond to changes in the availability of agents through the onAgentActivityCreate event.

The event is triggered and the registered callback method is executed, when:

  • In the Freshworks system, the general availability of an agent changes (from online to offline and vice versa).
  • The agent's Intelliassign status changes.

Subscribe to the onAgentActivityCreate event and register the callback by using the following sample manifest.json content.

manifest.json
"events": {
  "onAgentActivityCreate": {
    "handler": "onAgentActivityCreateCallback"
  }
}

Define the corresponding callback by using the following sample server.js content:

server.js
exports= {
  onAgentActivityCreateCallback: function(payload){
    console.log("Logging arguments from onAgentActivityCreate event: "+ JSON.stringify(payload);
  }
}

Attributes of the data object

  • actorobject

    Information pertaining to the entity who triggered the onAgentActivityCreate event in the Freshworks system.

  • agent_activityobject

    Information pertaining to the agent’s activity.