onTicketCreate
When a new ticket is created in the Freshdesk system, the onTicketCreate event is triggered.
Subscribe to the onTicketCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onTicketCreate": {
"handler": "onTicketCreateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onTicketCreateCallback: function(payload) {
console.log("Logging arguments from onTicketCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the system, agent, or requester who triggered the onTicketCreate event in the Freshdesk system.
- requesterobject
Information pertaining to the requester who raised the ticket in the Freshdesk system. Note:Any person using an organization’s Customer Support Portal is the end user. Any end user who raises a ticket in the Customer Support Portal is a requester.
- ticketobject
Information pertaining to the ticket raised in the Freshdesk system. Submitting a ticket triggers the onTicketCreate event.
onTicketUpdate
The onTicketUpdate event is triggered in the Freshdesk system when,
- The status, priority, type, or source of the ticket is modified.
- The agent or group associated with the ticket is modified.
- The ticket is marked as spam.
- The ticket is escalated for any reason.
Subscribe to the onTicketUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onTicketUpdate": {
"handler": "onTicketUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onTicketUpdateCallback: function(payload) {
console.log("Logging arguments from onTicketUpdate event: " + JSON.stringify(payload));
}
}
- The onTicketUpdate event is not triggered when:
- The tags associated with the ticket are modified.
- The custom fields configured for a ticket in the Freshdesk system are modified.
- When the agent assigned to the ticket replies or adds a note, the onConversationCreate event is triggered instead of the onTicketUpdate event.
Attributes of the data object
- actorobject
Information pertaining to the system, agent, or requester who triggered the onTicketUpdate event in the Freshdesk system.
- requesterobject
Information pertaining to the requester who raised the ticket in the Freshdesk system. Note:Any person using an organization’s Customer Support Portal is the end user. Any end user who raises a ticket in the Customer Support Portal is a requester.
- ticketobject
Information pertaining to the ticket raised in the Freshdesk system. Submitting a ticket triggers the onTicketUpdate event.
onTicketDelete
When a ticket is deleted from the Freshdesk system, the onTicketDelete event is triggered.
Subscribe to the onTicketDelete event and register the callback by using the following sample manifest.json content.
"events": {
"onTicketDelete": {
"handler": "onTicketDeleteCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onTicketDeleteCallback: function(payload) {
console.log("Logging arguments from onTicketDelete event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorstring
Information pertaining to the entity who deleted the ticket from the Freshdesk system.
- ticketobject
Information pertaining to the ticket that has been permanently deleted from the Freshdesk system.