onConversationCreate
The onConversationCreate event is triggered,
- When an agent/requester/end user replies to a ticket.
- When an agent adds a public/private note to the ticket.
- When an agent replies to a forwarded ticket.
- When a requestor/end user replies to a ticket.
The requestor refers to a contact or an end user who used the Customer support portal to raise a ticket. A requester/end user can only reply to a ticket; an agent can reply and add public/private notes. Replies and public notes are considered as responses.
Subscribe to the onConversationCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onConversationCreate": {
"handler": "onConversationCreateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onConversationCreateCallback: function(payload) {
console.log("Logging arguments from onConversationCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity (agent/requestor) who initiated the conversation in the Freshdesk system or the Customer support portal.
- conversationobject
Information pertaining to the ticket that has been permanently deleted from the Freshdesk system.
onConversationUpdate
The onConversationUpdate event is triggered,
- When an agent modifies the private/public note added to a ticket (first response) or conversation.
- When an agent replies to the conversation created.
- When an agent forwards a conversation.
- When a requestor/end user replies to a conversation created.
- When an agent deletes a response added to the conversation.
- When an agent deletes a forwarded conversation.
A conversation is created when the agent/requester/end user adds the first response to a ticket raised in the Freshdesk system.
Subscribe to the onConversationUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onConversationUpdate": {
"handler": "onConversationUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onConversationUpdateCallback: function(payload) {
console.log("Logging arguments from onConversationUpdate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the conversation updated in the Freshdesk system, as a result of editing an existing note or forwarding a response.
- conversationobject
Information pertaining to the ticket that has been permanently deleted from the Freshdesk system.
onConversationDelete
The onConversationDelete event is triggered when an agent deletes the ticket to which a conversation is associated. Deleting the ticket also deletes the entire conversation.
Note:Deleting a response triggers only the onConversationUpdate event and not the onConversationDelete event as the conversation thread is still associated with the ticket.
Subscribe to the onConversationDelete event and register the callback by using the following sample manifest.json content.
"events": {
"onConversationDelete": {
"handler": "onConversationDeleteCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onConversationDeleteCallback: function(payload) {
console.log("Logging arguments from onConversationDelete event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the conversation updated in the Freshdesk system, as a result of editing an existing note or forwarding a response.
- conversationobject
Identifier of the conversation that is deleted from the Freshdesk system.