onCannedResponseCreate
The Freshdesk system enables agents to create predefined responses (canned responses) to quickly respond to common customer queries that come in the form of tickets. When an agent creates a canned response and saves it to the Freshworks system, the onCannedResponseCreate event is triggered.
Subscribe to the onCannedResponseCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onCannedResponseCreate": {
"handler": "onCannedResponseCreateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onCannedResponseCreateCallback: function(payload) {
console.log("Logging arguments from onCannedResponseCreate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who created the canned response in the Freshdesk system.
- associationsobject
All associated objects of the article object, which specify additional information pertaining to the article created.
- canned_responseobject
Information pertaining to the canned response created in the Freshdesk system.
onCannedResponseUpdate
When an agent updates the canned response saved in the Freshworks system, the onCannedResponseUpdate event is triggered. Modifications to the following fields of a saved canned response triggers the onCannedResponseUpdate event:
- Response title
- Message
- Attachments
- Visibility
- Folder
Subscribe to the onCannedResponseUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onCannedResponseUpdate": {
"handler": "onCannedResponseUpdateCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onCannedResponseUpdateCallback: function(payload) {
console.log("Logging arguments from onCannedResponseUpdate event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who updated the canned response in the Freshdesk system.
- associationsobject
All associated objects of the canned response object, which specify additional information pertaining to the canned response updated.
- canned_responseobject
Information pertaining to the canned response that is modified in the Freshdesk system.
- changesobject
Changes that triggered the onCannedResponseUpdate event, specified as a JSON object of the following format:
"changes": { "misc_changes": {}, "model_changes": { //For non-array attributes "<canned_response.attribute that changed>": ["Old value", "New value"] }, "system_changes": {} }
onCannedResponseDelete
When a canned response is deleted from the Freshworks system, the onCannedResponseDelete event is triggered. Deleting the folder to which a canned response is saved also triggers the onCannedResponseDelete event.
Subscribe to the onCannedResponseDelete event and register the callback by using the following sample manifest.json content.
"events": {
"onCannedResponseDelete": {
"handler": "onCannedResponseDeleteCallback"
}
}
Define the corresponding callback by using the following sample server.js content:
exports = {
onCannedResponseDeleteCallback: function(payload) {
console.log("Logging arguments from onCannedResponseDelete event: " + JSON.stringify(payload));
}
}
Attributes of the data object
- actorobject
Information pertaining to the entity who deleted the canned response from the Freshdesk system.
- associationsobject
All associated objects of the canned response object, which specify additional information pertaining to the canned response deleted.
- canned_responseobject
Information pertaining to the canned response that is deleted from the Freshdesk system.