onAgentStatusCreate FreshdeskFreshdesk Omni
The onAgentStatusCreate event is triggered and the registered callback method is executed, when a custom agent status is created in the Freshworks system.
Subscribe to the onAgentStatusCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onAgentStatusCreate": {
"handler": "onAgentStatusCreateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onAgentStatusCreateCallback: function(payload) {
console.log("Logging arguments from onAgentStatusCreate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onAgentStatusCreate event in the Freshdesk system.
- idstring
Identifier of the actor who triggered the product event.
If the actor is an agent, the id value is the agent’s id that is auto-generated when the agent’s information is configured in the Freshdesk system.
If the actor is the Freshdesk system, the id value is null. - namestring
Full name of the actor.
If the actor is the Freshdesk system, this attribute value is null. - typestring
Specifies if it is an agent or the Freshdesk system that triggered the product event.
Possible values: agent, system
- agent_statusobject
Information pertaining to the agent status created in the Freshdesk system.
- account_idstring
Identifier of the Freshdesk account, auto-generated when the account is configured for an organization.
- created_atstring
Timestamp of when the agent status is created in the Freshdesk system, specified in the UTC format.
- defaultboolean
Specifies whether the status is a default agent status configured in the Freshdesk system.
Possible values: true, false Note:Default statuses available in the Freshdesk system are available, unavailable, ongoing call, and after call work. - iconinteger
Identifier of the icon (emoji) associated with the agent status.
- idinteger
Identifier of the agent status object, auto-generated when an agent status is configured in the Freshdesk system.
- namestring
Descriptive name of the agent status.
- statestring
Specifies whether the agent status is enabled for an agent. If an agent status is enabled, the agent can select the status through the agent’s profile.
Possible values: on, off - typestring
Category of the agent status created.
Possible values:
busy: Agent is engaged in work-related activities such as meetings, trainings, and so on.
away: Agent is away on activities such as lunch, personal work, and so on that hinder the online availability of the agent. - updated_atstring
Timestamp of when the agent status is last updated in the Freshdesk system, specified in the UTC format.
- associationsobject
All associated objects of the agent status object, which specify additional information pertaining to the agent status created.
onAgentStatusUpdate FreshdeskFreshdesk Omni
The onAgentStatusUpdate event is triggered when there are modifications to the following attributes of an agent’s status:
- Status name
- Emoji (icon associated with the status)
- State
Note:Only an agent with admin level permissions can modify the state of a custom status.
Subscribe to the onAgentStatusUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onAgentStatusUpdate": {
"handler": "onAgentStatusUpdateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onAgentStatusUpdateCallback: function(payload) {
console.log("Logging arguments from onAgentStatusUpdate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onAgentStatusUpdate event in the Freshdesk system.
- idstring
Identifier of the agent who triggered the product event.
- namestring
Full name of the actor.
- typestring
Specifies if that it is an agent who triggered the product event.
Possible values: agent
- agent_statusobject
Updated information pertaining to the agent status that is modified in the Freshdesk system.
- account_idstring
Identifier of the Freshdesk account, auto-generated when the account is configured for an organization.
- created_atstring
Timestamp of when the agent status is created in the Freshdesk system, specified in the UTC format.
- defaultboolean
Specifies whether the status is a default agent status configured in the Freshdesk system.
Possible values: true, false Note:Default statuses available in the Freshdesk system are available, unavailable, ongoing call, and after call work. - iconinteger
Identifier of the icon (emoji) associated with the agent status.
- idinteger
Identifier of the agent status object, auto-generated when an agent status is configured in the Freshdesk system.
- namestring
Descriptive name of the agent status.
- statestring
Specifies whether the agent status is enabled for an agent. If an agent status is enabled, the agent can select the status through the agent’s profile.
Possible values: on, off - typestring
Category of the agent status created.
Possible values:
busy: Agent is engaged in work-related activities such as meetings, trainings, and so on.
away: Agent is away on activities such as lunch, personal work, and so on that hinder the online availability of the agent. - updated_atstring
Timestamp of when the agent status is last updated in the Freshdesk system, specified in the UTC format.
- associationsobject
All associated objects of the agent status object, which specify additional information pertaining to the agent status created.
- changesobject
Changes that triggered the onAgentStatusUpdate specified as a JSON object of the following format:
{ "model_changes": { "<agent_status.attribute that changed>": ["Old value", "New value"] } }Example
{ "misc_changes": {}, "model_changes": { "name": [ "Test One", "Test Changed" ], "updated_at": [ "2022-06-09T04:15:32Z", "2022-06-09T04:18:40Z" ] }, "system_changes": {} }- misc_changesobject
List of all miscellaneous database parameters whose values have changed, along with the old and modified values.
- model_changesobject
List of all attributes whose values have changed along with the old and modified values of the attributes.
- system_changesobject
List of all system-level parameters whose values have changed, along with the old and modified values.
onAgentStatusDelete FreshdeskFreshdesk Omni
The onAgentStatusDelete event is triggered when:
- An admin deletes the custom statuses configured in the Freshworks system.
- Account deletion or moving the account to a plan that does not support custom statuses causes the Freshworks system to automatically delete the custom statuses.
Subscribe to the onAgentStatusDelete event and register the callback by using the following sample manifest.json content.
"events": {
"onAgentStatusDelete": {
"handler": "onAgentStatusDeleteCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onAgentStatusDeleteCallback: function(payload) {
console.log("Logging arguments from onAgentStatusDelete event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the entity who triggered the onAgentStatusDelete event in the Freshdesk system.
- idstring
Identifier of the actor who triggered the product event.
If the actor is an agent, the id value is the agent’s id that is auto-generated when the agent’s information is configured in the Freshdesk system.
If the actor is the Freshdesk system, the id value is null. - namestring
Full name of the actor.
If the actor is the Freshdesk system, this attribute value is null. - typestring
Specifies if it is an agent or the Freshdesk system that triggered the product event.
Possible values: agent, system
- agent_statusobject
nformation pertaining to the agent status deleted from the Freshdesk system.
- account_idstring
Identifier of the Freshdesk account, auto-generated when the account is configured for an organization.
- created_atstring
Timestamp of when the agent status is created in the Freshdesk system, specified in the UTC format.
- defaultboolean
Specifies whether the status is a default agent status configured in the Freshdesk system.
Possible values: true, false Note:Default statuses available in the Freshdesk system are available, unavailable, ongoing call, and after call work. - iconinteger
Identifier of the icon (emoji) associated with the agent status.
- idinteger
Identifier of the agent status object, auto-generated when an agent status is configured in the Freshdesk system.
- namestring
Descriptive name of the agent status.
- statestring
Specifies whether the agent status is enabled for an agent. If an agent status is enabled, the agent can select the status through the agent’s profile.
Possible values: on, off - typestring
Category of the agent status created.
Possible values:
busy: Agent is engaged in work-related activities such as meetings, trainings, and so on.
away: Agent is away on activities such as lunch, personal work, and so on that hinder the online availability of the agent. - updated_atstring
Timestamp of when the agent status is last updated in the Freshdesk system, specified in the UTC format.
- associationsobject
All associated objects of the agent status object, which specify additional information pertaining to the agent status deleted.