Events API

Event APIs enable you to react to events that occur in the user interface of the page. This includes button clicks, changes and updates to field values. You can register event listeners which get invoked when the event occurs.


Event Payload
When the callback method is invoked, an event payload is passed to it. The payload is a JavaScript object that contains a type field and a data object.

1
2
3
4
5
// event_type contains the name of the event var event_type = event.type; // event_data is a JSON whose value depends on the type of event var event_data = event.helper.getData();

Ticket Details Page Events
The following events are available to all apps that are located in the ticket details page:

ticket.propertiesLoaded - This event is triggered when the ticket properties is loaded. This event is needed when the code uses ticket properties along with ticket_background location.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.propertiesLoaded", eventCallback);

ticket.replyClick - This event is triggered when the user clicks on the Reply button.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.replyClick", eventCallback);

ticket.forwardClick - This event is triggered when the user clicks on the Forward button.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.forwardClick", eventCallback);

ticket.notesClick - This event is triggered when the user clicks on the Add Note option from the conversations.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.notesClick", eventCallback);

ticket.submitClick - This event is triggered when the user clicks the SEND button after selecting one of these options - Reply/Forward/Add Note.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.submitClick", eventCallback);

ticket.closeTicketClick - This event is triggered when the user clicks the close button on the top navigation bar of the Ticket details page.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.closeTicketClick", eventCallback);

ticket.previousTicketClick - This event is triggered when the user clicks on the back icon at the top right of the ticket details page.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.previousTicketClick", eventCallback);

ticket.nextTicketClick - This event is triggered when the user clicks on the forward icon at the top right of the Ticket details page.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("ticket.nextTicketClick", eventCallback);

ticket.priorityChanged - This event will be triggered when the user changes the priority of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the priority of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.priorityChanged", propertyChangeCallback);

ticket.statusChanged - This event will be triggered when the user changes the status of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the status of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.statusChanged", propertyChangeCallback);

ticket.groupChanged - This event will be triggered when the user changes the group assigned to the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the group of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.groupChanged", propertyChangeCallback);

ticket.agentChanged - This event will be triggered when the user changes the agent assigned to the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the agent of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.agentChanged", propertyChangeCallback);

ticket.typeChanged - This event will be triggered when the user changes the type of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.typeChanged", propertyChangeCallback);

ticket.urgencyChanged - This event will be triggered when the user changes the urgency of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.urgencyChanged", propertyChangeCallback);

ticket.impactChanged - This event will be triggered when the user changes the impact of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.impactChanged", propertyChangeCallback);

ticket.departmentChanged - This event will be triggered when the user changes the department of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.departmentChanged", propertyChangeCallback);

ticket.categoryChanged - This event will be triggered when the user changes the category of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.categoryChanged", propertyChangeCallback);

ticket.subCategoryChanged - This event will be triggered when the user changes the sub-category of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.subCategoryChanged", propertyChangeCallback);

ticket.itemChanged - This event will be triggered when the user changes the category item of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.itemChanged", propertyChangeCallback);

ticket.propertiesUpdated - This event will be triggered when the user clicks the UPDATE PROPERTIES button.

Copied Copy
1
2
3
4
5
6
7
8
var propertyChangeCallback = function (event) // code to be executed when the properties of the ticket is changed. { console.log(event.type + " event occurred"); var event_data = event.helper.getData(); // Sample event_data: {priority: {…}, sample_custom_field: {…} }; client.events.on("ticket.propertiesUpdated", propertyChangeCallback);

ticket.assetAssociated - This event will be triggered when the user associates an asset to the ticket.

Copied Copy
1
2
3
4
5
6
var eventCallback = function (data) // code to be executed when the properties of the ticket is changed. { console.log(data.type + " event occurred"); }; client.events.on("ticket.assetAssociated", eventCallback);

ticket.problemAssociated - This event will be triggered when the user associates a problem to the ticket.

Copied Copy
1
2
3
4
5
6
var eventCallback = function (data) // code to be executed when the properties of the ticket is changed. { console.log(data.type + " event occurred"); }; client.events.on("ticket.problemAssociated", eventCallback);

ticket.changeAssociated - This event will be triggered when the user associates a change to the ticket.

Copied Copy
1
2
3
4
5
6
var eventCallback = function (data) // code to be executed when the properties of the ticket is changed. { console.log(data.type + " event occurred"); }; client.events.on("ticket.changeAssociated", eventCallback);

ticket.taskAdded - This event will be triggered when the user clicks add task button.

Copied Copy
1
2
3
4
5
6
var eventCallback = function (data) // code to be executed when the properties of the ticket is changed. { console.log(data.type + " event occurred"); }; client.events.on("ticket.taskAdded", eventCallback);

ticket.childticketAssociated - This event will be triggered when the user adds a child ticket to the ticket.

Copied Copy
1
2
3
4
5
6
var eventCallback = function (data) // code to be executed when the properties of the ticket is changed. { console.log(data.type + " event occurred"); }; client.events.on("ticket.childticketAssociated", eventCallback);

ticket.startTimer - This event is triggered when the user clicks on the start timer button to start the timer. It is also triggered when the user adds time and clicks the save button.

Copied Copy
1
2
3
4
var eventCallback = function (event) { console.log(event.type + " event occurred"); }; client.events.on("ticket.startTimer", eventCallback);

The helper method event.helper.getData() will return the following JSON. The timer_running attribute specifies if the timer is currently running or not.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "billable": true, "created_at": "2018-05-10T18:49:59+05:30", "executed_at": "2018-05-10T00:00:00+05:30", "id": 1, "it_task_id": null, "note": "", "start_time": "2018-05-10T18:49:59+05:30", "timer_running": true, "updated_at": "2018-05-10T18:49:59+05:30", "user_id": 1, "agent_name": "Support", "timespent": "0.00", "agent_email": "sample@freshservice.com", "ticket_id": 16 } }
EXPAND ↓

ticket.stopTimer - This event is triggered when the user stops a running timer.

Copied Copy
1
2
3
4
var eventCallback = function (event) { console.log(event.type + " event occurred"); }; client.events.on("ticket.stopTimer", eventCallback);

The helper method event.helper.getData() will return the following JSON.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "billable": true, "created_at": "2018-05-10T18:49:59+05:30", "executed_at": "2018-05-10T00:00:00+05:30", "id": 1, "it_task_id": null, "note": "", "start_time": "2018-05-10T18:49:59+05:30", "timer_running": false, "updated_at": "2018-05-10T18:51:22+05:30", "user_id": 1, "agent_name": "Support", "timespent": "0.02", "agent_email": "sample@freshservice.com", "ticket_id": 16 } }
EXPAND ↓

ticket.updateTimer - This event is triggered when the user updates an existing time entry by clicking the update button.

Copied Copy
1
2
3
4
var eventCallback = function (event) { console.log(event.type + " event occurred"); }; client.events.on("ticket.updateTimer", eventCallback);

The helper method event.helper.getData() will return the following JSON.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "billable": true, "created_at": "2018-05-10T18:49:59+05:30", "executed_at": "2018-05-10T00:00:00+05:30", "id": 1, "it_task_id": null, "note": "", "start_time": "2018-05-10T18:49:59+05:30", "timer_running": false, "updated_at": "2018-05-10T18:51:51+05:30", "user_id": 1, "agent_name": "Support", "timespent": "0.02", "agent_email": "sample@freshservice.com", "ticket_id": 16 } }
EXPAND ↓

ticket.deleteTimer - This event is triggered when the user deletes an existing time entry.

Copied Copy
1
2
3
4
var eventCallback = function (event) { console.log(event.type + " event occurred"); }; client.events.on("ticket.deleteTimer", eventCallback);

The helper method event.helper.getData() will return the following JSON.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "billable": true, "created_at": "2018-05-10T18:49:59+05:30", "executed_at": "2018-05-10T00:00:00+05:30", "id": 1, "it_task_id": null, "note": "", "start_time": "2018-05-10T18:49:59+05:30", "timer_running": false, "updated_at": "2018-05-10T18:51:51+05:30", "user_id": 1, "agent_name": "Support", "timespent": "0.02", "agent_email": "sample@freshservice.com", "ticket_id": 16 } }
EXPAND ↓

Change Details Page Events
The following events are available to all apps that are located in the change details page:


change.submitNote - This event is triggered when the user clicks on the Note Submit button.

Copied Copy
1
2
3
4
var eventCallback = function (data) { console.log(data.type + " event occurred"); }; client.events.on("change.submitNote", eventCallback);

change.priorityChanged - This event will be triggered when the user changes the priority of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the priority of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.priorityChanged", propertyChangeCallback);

change.statusChanged - This event will be triggered when the user changes the status of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the status of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.statusChanged", propertyChangeCallback);

change.groupChanged - This event will be triggered when the user changes the group assigned to the change.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the group of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.groupChanged", propertyChangeCallback);

change.agentChanged - This event will be triggered when the user changes the agent assigned to the change.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the agent of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.agentChanged", propertyChangeCallback);

change.typeChanged - This event will be triggered when the user changes the type of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.typeChanged", propertyChangeCallback);

change.impactChanged - This event will be triggered when the user changes the impact of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.impactChanged", propertyChangeCallback);

change.riskChanged - This event will be triggered when the user changes the risk of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.riskChanged", propertyChangeCallback);

change.departmentChanged - This event will be triggered when the user changes the department of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.departmentChanged", propertyChangeCallback);

change.categoryChanged - This event will be triggered when the user changes the type of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.categoryChanged", propertyChangeCallback);

change.subCategoryChanged - This event will be triggered when the user changes the sub category of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.subCategoryChanged", propertyChangeCallback);

change.itemChanged - This event will be triggered when the user changes the category item of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.itemChanged", propertyChangeCallback);

change.propertiesUpdated - This event will be triggered when the user clicks the UPDATE PROPERTIES button.

Copied Copy
1
2
3
4
5
6
var propertyChangeCallback = function (data) // code to be executed when the properties of the change is changed. { console.log(data.type + " event occurred"); }; client.events.on("change.propertiesUpdated", propertyChangeCallback);

New Ticket Page Events
The following events are available to all apps that are located in the new ticket page:

ticket.priorityChanged - This event will be triggered when the user changes the priority of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the priority of the ticket is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.priorityChanged", propertyChangeCallback);

ticket.statusChanged - This event will be triggered when the user changes the status of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the status of the ticket is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.statusChanged", propertyChangeCallback);

ticket.groupChanged - This event will be triggered when the user changes the group assigned to the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the group of the ticket is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.groupChanged", propertyChangeCallback);

ticket.agentChanged - This event will be triggered when the user changes the agent assigned to the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the agent of the ticket is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.agentChanged", propertyChangeCallback);

ticket.urgencyChanged - This event will be triggered when the user changes the urgency of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.urgencyChanged", propertyChangeCallback);

ticket.impactChanged - This event will be triggered when the user changes the impact of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.impactChanged", propertyChangeCallback);

ticket.departmentChanged - This event will be triggered when the user changes the department of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.departmentChanged", propertyChangeCallback);

ticket.categoryChanged - This event will be triggered when the user changes the category of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.categoryChanged", propertyChangeCallback);

ticket.subCategoryChanged - This event will be triggered when the user changes the sub-category of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.subCategoryChanged", propertyChangeCallback);

ticket.itemChanged - This event will be triggered when the user changes the category item of the ticket in the ticket properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the type of the ticket is changed. { var event_data = event.helper.getData(); console.log(event.type + " changed from " + event_data.old + " to " + event_data.new); }; client.events.on("ticket.itemChanged", propertyChangeCallback);

ticket.requesterChanged - This event will be triggered when the user changes/adds the requester to the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (event) // code to be executed when the agent of the ticket is changed. { var detail = event.data; console.log(event.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.requesterChanged", propertyChangeCallback);

ticket.subjectChanged - This event will be triggered when the user changes the subject of the ticket.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the agent of the ticket is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("ticket.subjectChanged", propertyChangeCallback);

New Change Page Events
The following events are available to all apps that are located in the new change page:


change.priorityChanged - This event will be triggered when the user changes the priority of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the priority of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.priorityChanged", propertyChangeCallback);

change.statusChanged - This event will be triggered when the user changes the status of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the status of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.statusChanged", propertyChangeCallback);

change.groupChanged - This event will be triggered when the user changes the group assigned to the change.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the group of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.groupChanged", propertyChangeCallback);

change.agentChanged - This event will be triggered when the user changes the agent assigned to the change.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the agent of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.agentChanged", propertyChangeCallback);

change.typeChanged - This event will be triggered when the user changes the type of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.typeChanged", propertyChangeCallback);

change.impactChanged - This event will be triggered when the user changes the impact of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.impactChanged", propertyChangeCallback);

change.riskChanged - This event will be triggered when the user changes the risk of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.riskChanged", propertyChangeCallback);

change.departmentChanged - This event will be triggered when the user changes the department of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.departmentChanged", propertyChangeCallback);

change.categoryChanged - This event will be triggered when the user changes the type of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.categoryChanged", propertyChangeCallback);

change.subCategoryChanged - This event will be triggered when the user changes the sub category of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.subCategoryChanged", propertyChangeCallback);

change.itemChanged - This event will be triggered when the user changes the category item of the change in the change properties.

Copied Copy
1
2
3
4
5
6
7
var propertyChangeCallback = function (data) // code to be executed when the type of the change is changed. { var detail = data.detail; console.log(data.type + " changed from " + detail.old + " to " + detail.new); }; client.events.on("change.itemChanged", propertyChangeCallback);

Log in with your Freshservice account

Enter your helpdesk URL to proceed to login

Proceed

By clicking "Proceed", you agree to our Terms of Use.