Events Methods

You can use the events methods to enable apps to react to events that occur in the user interface of a page. The events includes button clicks or changes and updates to field values. An app can register event listeners that are invoked when an event occurs.

Event Payload
When the callback method is invoked, an event payload is passed to it. The payload is a JavaScript object which 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();
Click Events

These events occur when a user clicks a button or link on the page. The helper event.helper.getData() method returns an empty JSON for most of these events, the only exception being timer events.

Change Events

These events occur when a user changes the value of a ticket property. The event is triggered even if the value is not submitted. The helper event.helper.getData() method returns a JSON that contains the old and new value of the changed field.

1
2
3
4
{ "old": <old_value>, "new": <new_value> }
Ticket Details Page

The following events are available to all apps that are located on the Ticket Details page:


ticket.propertiesLoaded

This event is triggered when ticket properties are loaded. This event is needed when the code uses ticket interface APIs 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 a user clicks 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 a user clicks 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 a user clicks 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 a 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 a user clicks the CLOSE button located 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 a user clicks 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 a user clicks 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 is triggered when a user changes the priority of a 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 is triggered when a user changes the status of a 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 is triggered when a user changes the group assigned to a 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 is triggered when a user changes the agent assigned to a 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 is triggered when a user changes the type of a 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 is triggered when a user changes the urgency of a 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 is triggered when a user changes the impact of a 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 is triggered when a user changes the department of a 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 is triggered when a user changes the category of a 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 is triggered when a user changes the sub-category of a 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 is triggered when a user changes the category item of a 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 is triggered when a user updates any ticket property and clicks the UPDATE button located on the Ticket Details page.

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 is triggered when a user associates an asset to a 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 is triggered when a user associates a problem to a 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 is triggered when a user associates a change to a 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 is triggered when a user clicks the 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 is triggered when a user adds a child ticket to a 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 a user clicks the Start Timer button to start the timer. It is also triggered when the user adds a time entry 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 event.helper.getData() method returns 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 a 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 event.helper.getData() method returns 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 a 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 event.helper.getData() method returns 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 a 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 event.helper.getData() method returns 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

The following events are available to all apps that are located on the Change Details page.


change.submitNote

This event is triggered when a user clicks 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 is triggered when a user changes the priority of a 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 is triggered when a user changes the status of a 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 is triggered when a user changes the group assigned to a 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 is triggered when a user changes the agent assigned to a 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 is triggered when a user changes the type of a 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 is triggered when a user changes the impact of a 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 is triggered when a user changes the risk of a 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 is triggered when a user changes the department of a 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 is triggered when a user changes the category of a 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 is triggered when a user changes the sub-category of a 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 is triggered when a user changes the category item of a 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 is triggered when a user updates any change property and clicks the UPDATE 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);

change.plannedStartDateChanged

This event is triggered when a user changes the planned start date of a change in the change properties.

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

change.plannedEndDateChanged

This event is triggered when a user changes the planned end date of a change in the change properties.

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

change.startTimer

This event is triggered when a user clicks on the Start Timer button to start the timer. It is also triggered when the user adds a time entry and clicks the Save button.

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

The helper event.helper.getData() method returns 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": { "id": 15, "start_time": "2019-06-10T17:48:59+05:30", "timer_running": true, "billable": true, "user_id": 1, "note": "", "created_at": "2019-06-10T17:48:59+05:30", "updated_at": "2019-06-10T17:49:13+05:30", "executed_at": "2019-06-10T00:00:00+05:30", "it_task_id": 42, "agent_name": "Support", "timespent": "0.00", "agent_email": "sample@freshservice.com", "change_id": 3 } }
EXPAND ↓

change.stopTimer

This event is triggered when a user stops a running timer.

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

The helper event.helper.getData() method returns the following JSON.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "id": 15, "start_time": "2019-06-10T17:48:59+05:30", "timer_running": false, "billable": true, "user_id": 1, "note": "", "created_at": "2019-06-10T17:48:59+05:30", "updated_at": "2019-06-10T17:49:13+05:30", "executed_at": "2019-06-10T00:00:00+05:30", "it_task_id": 42, "agent_name": "Support", "timespent": "0.00", "agent_email": "sample@freshservice.com", "change_id": 3 } }
EXPAND ↓

change.updateTimer

This event is triggered when a 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("change.updateTimer", eventCallback);

The helper event.helper.getData() method returns the following JSON.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "id": 15, "start_time": "2019-06-10T17:48:59+05:30", "timer_running": false, "billable": true, "user_id": 1, "note": "", "created_at": "2019-06-10T17:48:59+05:30", "updated_at": "2019-06-10T17:49:13+05:30", "executed_at": "2019-06-10T00:00:00+05:30", "it_task_id": 42, "agent_name": "Support", "timespent": "0.00", "agent_email": "sample@freshservice.com", "change_id": 3 } }
EXPAND ↓

change.deleteTimer

This event is triggered when a 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("change.deleteTimer", eventCallback);

The helper event.helper.getData() method returns the following JSON.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ "time_entry": { "id": 15, "start_time": "2019-06-10T17:48:59+05:30", "timer_running": false, "billable": true, "user_id": 1, "note": "", "created_at": "2019-06-10T17:48:59+05:30", "updated_at": "2019-06-10T17:49:13+05:30", "executed_at": "2019-06-10T00:00:00+05:30", "it_task_id": 42, "agent_name": "Support", "timespent": "0.00", "agent_email": "sample@freshservice.com", "change_id": 3 } }
EXPAND ↓
New Ticket Page

The following events are available to all apps that are located on the New Ticket page.


ticket.priorityChanged

This event is triggered when a user changes the priority of a 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 is triggered when a user changes the status of a 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 is triggered when a user changes the group assigned to a 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 is triggered when a user changes the agent assigned to a 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 is triggered when a user changes the urgency of a 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 is triggered when a user changes the impact of a 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 is triggered when a user changes the department of a 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 is triggered when a user changes the category of a 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 is triggered when a user changes the sub-category of a 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 is triggered when a user changes the category item of a 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 is triggered when a user changes/adds the requester to a 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 is triggered when a user changes the subject of a 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

The following events are available to all apps that are located on the New Change page.


change.priorityChanged

This event is triggered when a user changes the priority of a 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 is triggered when a user changes the status of a 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 is triggered when a user changes the group assigned to a 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 is triggered when a user changes the agent assigned to a 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 is triggered when a user changes the type of a 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 is triggered when a user changes the impact of a 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 is triggered when a user changes the risk of a 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 is triggered when a user changes the department of a 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 is triggered when a user changes the type of a 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 is triggered when a user changes the sub-category of a 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 is triggered when a user changes the category item of a 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.plannedStartDateChanged

This event is triggered when a user changes the planned start date of a change in the change properties.

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

change.plannedEndDateChanged

This event is triggered when a user changes the planned end date of a change in the change properties.

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