You can use the interface methods to enable an app to trigger certain actions on the Freshservice user interface. With these methods, an app can control the visibility of ticket properties, hide or disable buttons, and show dialog boxes and notifications.
For example, you can include the openNote method to automatically open a note with default text whenever a user changes the status of a ticket.
Global Interface Methods
You can use the following methods in all locations:
Show Modal
The method opens a Modal dialog box in an IFrame to display HTML content to users. Events methods and Interface methods are not supported within the Modal IFrame.
Notes:
1) In the following code, the template field is mandatory. If no value is specified, an error message is displayed when the method is run.
2) The title field is optional and supports 30 characters; beyond that the title is truncated. The default title is Modal dialog.
template.html
Copied Copy1 2 3 4 5 6 7 8 | client.interface.trigger("showModal", { title: "Sample Modal", template: "modal.html" }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

To send data from template.html to the modal, add the parameter data parameter as shown in the following code.
template.html
Copied Copy1 2 3 4 5 6 7 8 9 | client.interface.trigger("showModal", { title: "Sample Modal", template: "modal.html", data: {name: "James", email: "James@freshservice.com"} }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
To retrieve the data within the modal dialog box, in the modal.html file, use the context method as shown in the following code.
modal.html
Copied Copy1 2 3 4 5 6 | client.instance.context().then(function(context){ console.log(context) /* Output: { instanceId: "modalinstanceID", location: "location", parentId: "parentinstanceID", data: {name: "James", email: "James@freshservice.com"} } */ }.catch(function(error) { // error - error object })); |
You can transfer data from the modal back to the parent window (or any other location of the same app) by using the Instance method.
If the modal dialog box includes Data methods, Request method, Installation Parameters, and Data Storage, in the modal.html file, include the following fresh_client link.
modal.html
Copied Copy1 | <script src="https://static.freshdev.io/fdk/2.0/assets/fresh_client.js"></script> |
Show Confirm
The method displays a confirmation dialog with a title, a message, and the save, cancel buttons to users. By default, the dialog box displays the Save and Cancel buttons. You can use saveLabel and cancelLabel to modify the button labels.
Timeout for confirmation dialog is 10 seconds.
Notes:
1) In the following code, the message field is mandatory and supports a maximum of 100 characters; beyond that the message is truncated. If no value is specified, an error message is displayed when the method is run.
2) The title field is optional and supports only 30 characters; beyond that the title is truncated. The default title is Confirmation title.
3) The saveLabel and cancelLabel fields support a maximum of 11 characters.
Sample confirmation dialog with default buttons
Copied Copy1 2 3 4 5 6 7 | client.interface.trigger("showConfirm", {title: "Sample Confirm", message: "Are you sure you want to close this ticket?"}) /*"title" and "message" should be plain text.*/ }).then(function(result) { /* "result" will be either "Save" or "Cancel" */ }).catch(function(error) { // error - error object; }); |

Sample confirmation dialog with saveLabel and cancelLabel
Copied Copy1 2 3 4 5 6 7 8 9 | client.interface.trigger("showConfirm", { title: "Sample Confirm", message: "Do you want to save the changes?", saveLabel: "save", cancelLabel: "ignore" /*"title" and "message" should be plain text.*/ }).then(function(result) { /* "result" will be either "save" or "ignore" */ }).catch(function(error) { // error - error object; }); |
Show Notifications
The method displays various various types of notifications.
- In the following code, the message field is mandatory and supports a maximum of 100 characters; beyond that the message is truncated. If no value is specified, an error message is displayed when the method is run.
- The type field is mandatory. If no value is specified, an error message is displayed when the method is run. The supported values for the type field are, success, info, warning, and error. If any other value is specified, an error message is displayed.
- The title field is optional and supports a maximum of 30 characters; beyond that the message is truncated.
- Success
Sample notification with message
Copied Copy123456789client.interface.trigger("showNotify", { type: "success", message: "This is a sample success notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); Sample notification with an optional title
Copied Copy
You can add a title to the notification by including the optional title parameter.123456789client.interface.trigger("showNotify", { type: "success", title: "Success", message: "This is a sample success notification." /* "title" and "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); - Info
Sample notification with information
Copied Copy123456789client.interface.trigger("showNotify", { type: "info", title: "Info", message: "This is a sample information notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); - Warning
Sample warning notification
Copied Copy123456789client.interface.trigger("showNotify", { type: "warning", title: "Warning", message: "This is a sample warning notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object }); - Error
Sample error notification
Copied Copy123456789client.interface.trigger("showNotify", { type: "error", title: "Error", message: "This is a sample error notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Ticket Details Page
The following methods are available to apps that are installed on the Ticket Details page.
- Expand Conversations
- Hide Attachments
- Show Attachments
- Hide Ticket Delete
- Show Ticket Delete
- Open Reply
- Open Note
- Add Task
- Hide Due Date Edit
- Show Due Date Edit
- Hide Note
- Show Note
- Hide Ticket Property Fields
- Show Ticket Property Fields
- Set Value for Ticket Property Fields
- Disable Ticket Property Fields
- Enable Ticket Property Fields
- Set Note Type
- Start Timer
- Toggle Timer
- Update Ticket Properties
Editor Window Methods
Expand Conversations
If there are more than three conversations, the older ones are collapsed and only the most recent ones are shown. This method enables you to expand and display all the conversations.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("click", {id: "expandConversations"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Hide Attachments
The method hides attachments in conversations on the Ticket Details page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "attachments"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Attachments
The method shows attachments in conversations if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "attachments"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Hide Ticket Delete
The method hides the ticket Delete option on the Ticket Details page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Ticket Delete
The method shows the ticket Delete icon on the Ticket Details page if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Open Reply
The method opens the Reply editor and adds specified text in the textbox. Using this method also invokes any callback function if specified using ticket.replyClick Event method.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("click", {id: "openReply", text: "Text to be inserted"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Open Note
The method opens the Note editor and replaces the existing text with the specified text. Using this method also invokes any callback function if specified using the ticket.notesClick Event method.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("click", {id: "openNote", text: "Text to be inserted"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Add Task
The method opens the Add Task form and adds the text specified in the Note section.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("click", {id: "addTask", text: "text to be inserted"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Hide Due Date Edit
The method hides the Change button in the Due by field.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "dueDateEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Due Date Edit
The method displays the Change button if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "dueDateEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Hide Note
The method hides the Add note button in the Ticket top navigation and bottom coversation bars.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Note
The method displays the Add note button in the top navigation and bottom conversation bars.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Hide Ticket Property Fields
The method hides the selected ticket properties field on the Ticket Details page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("hideElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields that can be hidden.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("hideElement", {id: "status"}) |
Priority |
client.interface.trigger ("hideElement", {id: "priority"}) |
Source |
client.interface.trigger ("hideElement", {id: "source"}) |
Impact |
client.interface.trigger ("hideElement", {id: "impact"}) |
Urgency |
client.interface.trigger ("hideElement", {id: "urgency"}) |
Type |
client.interface.trigger ("hideElement", {id: "type"}) |
Agent |
client.interface.trigger ("hideElement", {id: "agent"}) |
Department |
client.interface.trigger ("hideElement", {id: "department"}) |
Category |
client.interface.trigger ("hideElement", {id: "category"}) |
Group |
client.interface.trigger ("hideElement", {id: "group"}) |
custom field |
client.interface.trigger ("hideElement", {id: "customfield name"}) |
Show Ticket Property Fields
The method displays the selected ticket property field if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("showElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

The following table lists all the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("showElement", {id: "status"}) |
Priority |
client.interface.trigger ("showElement", {id: "priority"}) |
Source |
client.interface.trigger ("showElement", {id: "source"}) |
Type |
client.interface.trigger ("showElement", {id: "type"}) |
Impact |
client.interface.trigger ("showElement", {id: "impact"}) |
Urgency |
client.interface.trigger ("showElement", {id: "urgency"}) |
Agent |
client.interface.trigger ("showElement", {id: "agent"}) |
Department |
client.interface.trigger ("showElement", {id: "department"}) |
Category |
client.interface.trigger ("showElement", {id: "category"}) |
Group |
client.interface.trigger ("showElement", {id: "group"}) |
custom field |
client.interface.trigger ("showElement", {id: "customfield name"}) |
Set Value for Ticket Property Fields
The method sets the selected ticket property field with a specified value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "property", value: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields for which values can be set.
Element | Syntax |
---|---|
Status |
client.interface.trigger("setValue", {id: "status", value: 3}) |
Priority |
client.interface.trigger("setValue", {id: "priority", value: 3}) |
Source |
client.interface.trigger("setValue", {id: "source", value: 2}) |
Ticket |
client.interface.trigger("setValue", {id: "type", value: "Incident"}) |
Group |
client.interface.trigger("setValue", {id: "group", value: 10}) |
Agent |
client.interface.trigger("setValue", {id: "agent", value: 30}) |
Department |
client.interface.trigger("setValue", {id: "department", value: 1}) |
Category |
client.interface.trigger("setValue", {id: "category", value: "Hardware"}) |
SubCategory |
client.interface.trigger("setValue", {id: "subCategory", value: "Computer"}) |
Item |
client.interface.trigger("setValue", {id: "item", value: "MAC"}) |
custom field |
client.interface.trigger("setValue", {id: "customfield name", value: 3}) |
Disable Ticket Property Fields
The method disables the specified ticket property field so its value cannot be edited.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields that can be disabled.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("disableElement", {id: "status"}) |
Priority |
client.interface.trigger ("disableElement", {id: "priority"}) |
Source |
client.interface.trigger ("disableElement", {id: "source"}) |
Impact |
client.interface.trigger ("disableElement", {id: "impact"}) |
Urgency |
client.interface.trigger ("disableElement", {id: "urgency"}) |
Type |
client.interface.trigger ("disableElement", {id: "type"}) |
Agent |
client.interface.trigger ("disableElement", {id: "agent"}) |
Deparment |
client.interface.trigger ("disableElement", {id: "department"}) |
Category |
client.interface.trigger ("disableElement", {id: "category"}) |
Group |
client.interface.trigger ("disableElement", {id: "group"}) |
custom field |
client.interface.trigger ("disableElement", {id: "customfield name"}) |
Enable Ticket Property Fields
The method enables the specified ticket property field so you can edit its value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists all the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("enableElement", {id: "status"}) |
Priority |
client.interface.trigger ("enableElement", {id: "priority"}) |
Source |
client.interface.trigger ("enableElement", {id: "source"}) |
Type |
client.interface.trigger ("enableElement", {id: "type"}) |
Agent |
client.interface.trigger ("enableElement", {id: "agent"}) |
Deparment |
client.interface.trigger ("enableElement", {id: "department"}) |
Category |
client.interface.trigger ("enableElement", {id: "category"}) |
Group |
client.interface.trigger ("enableElement", {id: "group"}) |
custom field |
client.interface.trigger ("enableElement", {id: "customfield name"}) |
Set Note type
The method enables you to set the note type to either private or public.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "noteType", value: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "noteType", value: "private"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Start Timer
The method is used to start a timer. If a timer is already running, the method will stop the timer and create a new timer.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("start", {id: "timer", value: {agent: user_id, billable: true, note: "text"}}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Toggle Timer
The method is used to toggle a running/stopped timer.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("toggle", {id: "timer", value:"value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Update Ticket Properties
The method is used to submit updated Ticket Properties.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("click", {id: "updateProperties"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
setValue
The method sets the value of the from field, on the Forward window, to the specified value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "forward", field: "from", value: "tom@customer.com"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
disableElement
The method disables the from field, on the Forward window, to prevent any updates to the existing value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "forward", field: "from"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
enableElement
The method enables the from field, on the Forward window.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "forward", field: "from"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
setValue
The method sets the value of the from field, on the Reply to window, to the specified value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "reply", field: "from", value: "tom@customer.com"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
disableElement
The method disables the from field, on the Reply to window, to prevent any updates to the existing value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "reply", field: "from"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
enableElement
The method enables the from field, on the Reply to window.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "reply", field: "from"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Change Details Page
The following methods are available to apps that are installed on the Change Details page.
- Hide Default Fields
- Show Default Fields
- Hide Planning Section
- Show Planning Section
- Disable Planning Section
- Enable Planning Section
- Hide Change Property Fields
- Show Change Property Fields
- Disable Change Property Fields
- Enable Change Property Fields
- Set Value for Change Property Fields
Hide Default Fields
The methods hides the status, priority, and impact fields.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "defaultFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Default Fields
The method displays the status, priority, and impact fields.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "defaultFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Hide Planning Section
The method hides the Planning section on the Change View page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Planning Section
The method dispalys the Planning section on the Change View page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |

Disable Planning Section
The method disables the Planning section on the Change View page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Enable Planning Section
The method enables the Planning section on the Change View page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Hide Change Property Fields
The method hides the selected change property field on the Change Details page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("hideElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("hideElement", {id: "status"}) |
Priority |
client.interface.trigger ("hideElement", {id: "priority"}) |
Impact |
client.interface.trigger ("hideElement", {id: "impact"}) |
Risk |
client.interface.trigger ("hideElement", {id: "risk"}) |
Type |
client.interface.trigger ("hideElement", {id: "type"}) |
Agent |
client.interface.trigger ("hideElement", {id: "agent"}) |
Department |
client.interface.trigger ("hideElement", {id: "department"}) |
Category |
client.interface.trigger ("hideElement", {id: "category"}) |
Group |
client.interface.trigger ("hideElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("hideElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("hideElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("hideElement", {id: "customfield name"}) |
Show Change Property Fields
The method displays the selected change property field on the Change Details page if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("showElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists all the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("showElement", {id: "status"}) |
Priority |
client.interface.trigger ("showElement", {id: "priority"}) |
Type |
client.interface.trigger ("showElement", {id: "type"}) |
Impact |
client.interface.trigger ("showElement", {id: "impact"}) |
Risk |
client.interface.trigger ("showElement", {id: "risk"}) |
Agent |
client.interface.trigger ("showElement", {id: "agent"}) |
Department |
client.interface.trigger ("showElement", {id: "department"}) |
Category |
client.interface.trigger ("showElement", {id: "category"}) |
Group |
client.interface.trigger ("showElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("showElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("showElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("showElement", {id: "customfield name"}) |
Disable Change Property Fields
The method disables the selected change property field so its value cannot be edited.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("disableElement", {id: "status"}) |
Priority |
client.interface.trigger ("disableElement", {id: "priority"}) |
Impact |
client.interface.trigger ("disableElement", {id: "impact"}) |
Risk |
client.interface.trigger ("disableElement", {id: "risk"}) |
Type |
client.interface.trigger ("disableElement", {id: "type"}) |
Agent |
client.interface.trigger ("disableElement", {id: "agent"}) |
Department |
client.interface.trigger ("disableElement", {id: "department"}) |
Category |
client.interface.trigger ("disableElement", {id: "category"}) |
Group |
client.interface.trigger ("disableElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("disableElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("disableElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("disableElement", {id: "customfield name"}) |
Enable Change Property Fields
The method enables the selected change property field so you can edit its value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("enableElement", {id: "status"}) |
Priority |
client.interface.trigger ("enableElement", {id: "priority"}) |
Impact |
client.interface.trigger ("enableElement", {id: "impact"}) |
Risk |
client.interface.trigger ("enableElement", {id: "risk"}) |
Type |
client.interface.trigger ("enableElement", {id: "type"}) |
Agent |
client.interface.trigger ("enableElement", {id: "agent"}) |
Department |
client.interface.trigger ("enableElement", {id: "department"}) |
Category |
client.interface.trigger ("enableElement", {id: "category"}) |
Group |
client.interface.trigger ("enableElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("enableElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("enableElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("enableElement", {id: "customfield name"}) |
Set Value for Change Property Fields
The method sets a specified value in the selected change property field.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "property", value: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger("setValue", {id: "status", value: 3}) |
Priority |
client.interface.trigger("setValue", {id: "priority", value: 3}) |
Impact |
client.interface.trigger("setValue", {id: "impact", value: 2}) |
Risk |
client.interface.trigger("setValue", {id: "risk", value: 2}) |
Type |
client.interface.trigger("setValue", {id: "type", value: "2"}) |
Group |
client.interface.trigger("setValue", {id: "group", value: "10"}) |
Agent |
client.interface.trigger("setValue", {id: "agent", value: "30"}) |
Department |
client.interface.trigger("setValue", {id: "department", value: "15"}) |
Planned Start Date |
client.interface.trigger("setValue", {id: "plannedStartDate", value: "YYYY-MM-DDTHH:MM:SS±hh:mm"}) |
Planned End Date |
client.interface.trigger("setValue", {id: "plannedEndDate", value: "YYYY-MM-DDTHH:MM:SS±hh:mm"}) |
Category |
client.interface.trigger("setValue", {id: "category", value: "Hardware"}) |
SubCategory |
client.interface.trigger("setValue", {id: "subCategory", value: "Computer"}) |
Item |
client.interface.trigger("setValue", {id: "item", value: "MAC"}) |
custom field |
client.interface.trigger("setValue", {id: "customfield name", value: 3}) |
New Ticket Page
The following methods are available to all apps that are installed on the New Ticket page:
- Hide Ticket Property Fields
- Show Ticket Property Fields
- Set Value for Ticket Property Fields
- Disable Ticket Property Fields
- Enable Ticket Property Fields
Hide Ticket Property Fields
The method hides the selected ticket properties field on the New Ticket page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("hideElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields that can be hidden.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("hideElement", {id: "status"}) |
Priority |
client.interface.trigger ("hideElement", {id: "priority"}) |
Impact |
client.interface.trigger ("hideElement", {id: "impact"}) |
Urgency |
client.interface.trigger ("hideElement", {id: "urgency"}) |
Type |
client.interface.trigger ("hideElement", {id: "type"}) |
Agent |
client.interface.trigger ("hideElement", {id: "agent"}) |
Department |
client.interface.trigger ("hideElement", {id: "department"}) |
Category |
client.interface.trigger ("hideElement", {id: "category"}) |
Group |
client.interface.trigger ("hideElement", {id: "group"}) |
custom field |
client.interface.trigger ("hideElement", {id: "customfield name"}) |
Show Ticket Property Fields
The method displays the selected ticket property field if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("showElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("showElement", {id: "status"}) |
Priority |
client.interface.trigger ("showElement", {id: "priority"}) |
Type |
client.interface.trigger ("showElement", {id: "type"}) |
Agent |
client.interface.trigger ("showElement", {id: "agent"}) |
Department |
client.interface.trigger ("showElement", {id: "department"}) |
Category |
client.interface.trigger ("showElement", {id: "category"}) |
Group |
client.interface.trigger ("showElement", {id: "group"}) |
custom field |
client.interface.trigger ("showElement", {id: "customfield name"}) |
Set Value for Ticket Property Fields
The method sets a specified value in the selected ticket property field.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "property", value: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields for which values can be set.
Element | Syntax |
---|---|
Status |
client.interface.trigger("setValue", {id: "status", value: 3}) |
Priority |
client.interface.trigger("setValue", {id: "priority", value: 3}) |
Ticket |
client.interface.trigger("setValue", {id: "type", value: "Incident"}) |
Group |
client.interface.trigger("setValue", {id: "group", value: 10}) |
Agent |
client.interface.trigger("setValue", {id: "agent", value: 30}) |
Department |
client.interface.trigger("setValue", {id: "department", value: 1}) |
Category |
client.interface.trigger("setValue", {id: "category", value: "Hardware"}) |
SubCategory |
client.interface.trigger("setValue", {id: "subCategory", value: "Computer"}) |
Item |
client.interface.trigger("setValue", {id: "item", value: "MAC"}) |
custom field |
client.interface.trigger("setValue", {id: "customfield name", value: 3}) |
Disable Ticket Property Fields
The method disables the selected ticket property field, so its value cannot be edited.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields that can be disabled.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("disableElement", {id: "status"}) |
Priority |
client.interface.trigger ("disableElement", {id: "priority"}) |
Impact |
client.interface.trigger ("disableElement", {id: "impact"}) |
Urgency |
client.interface.trigger ("disableElement", {id: "urgency"}) |
Type |
client.interface.trigger ("disableElement", {id: "type"}) |
Agent |
client.interface.trigger ("disableElement", {id: "agent"}) |
Deparment |
client.interface.trigger ("disableElement", {id: "department"}) |
Category |
client.interface.trigger ("disableElement", {id: "category"}) |
Group |
client.interface.trigger ("disableElement", {id: "group"}) |
custom field |
client.interface.trigger ("disableElement", {id: "customfield name"}) |
Enable Ticket Property Fields
The method enables the selected ticket property field so you can edit its value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("enableElement", {id: "status"}) |
Priority |
client.interface.trigger ("enableElement", {id: "priority"}) |
Type |
client.interface.trigger ("enableElement", {id: "type"}) |
Agent |
client.interface.trigger ("enableElement", {id: "agent"}) |
Deparment |
client.interface.trigger ("enableElement", {id: "department"}) |
Category |
client.interface.trigger ("enableElement", {id: "category"}) |
Group |
client.interface.trigger ("enableElement", {id: "group"}) |
custom field |
client.interface.trigger ("enableElement", {id: "customfield name"}) |
New Change Page
- Hide Planning Section
- Show Planning Section
- Disable Planning Section
- Enable Planning Section
- Hide Change Property Fields
- Show Change Property Fields
- Disable Change Property Fields
- Enable Change Property Fields
- Set Value for Change Property Fields
Hide Planning Section
The method hides the Planning section on the New Change page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("hideElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Show Planning Section
The method displays the Planning section on the New Change page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("showElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Disable Planning Section
The method disables the Planning section on the New Change page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Enable Planning Section
The method enables the Planning section on the New Change page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "planningFields"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
Hide Change Property Fields
The method hides the selected change property field on the New Change page.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("hideElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the property fields that can be hidden.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("hideElement", {id: "status"}) |
Priority |
client.interface.trigger ("hideElement", {id: "priority"}) |
Impact |
client.interface.trigger ("hideElement", {id: "impact"}) |
Risk |
client.interface.trigger ("hideElement", {id: "risk"}) |
Type |
client.interface.trigger ("hideElement", {id: "type"}) |
Agent |
client.interface.trigger ("hideElement", {id: "agent"}) |
Department |
client.interface.trigger ("hideElement", {id: "department"}) |
Category |
client.interface.trigger ("hideElement", {id: "category"}) |
Group |
client.interface.trigger ("hideElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("hideElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("hideElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("hideElement", {id: "customfield name"}) |
Show Change Property Fields
The method displays the selected change property field on the New Change page if hidden.
Copied Copy1 2 3 4 5 6 | client.interface.trigger ("showElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("showElement", {id: "status"}) |
Priority |
client.interface.trigger ("showElement", {id: "priority"}) |
Type |
client.interface.trigger ("showElement", {id: "type"}) |
Impact |
client.interface.trigger ("showElement", {id: "impact"}) |
Risk |
client.interface.trigger ("showElement", {id: "risk"}) |
Agent |
client.interface.trigger ("showElement", {id: "agent"}) |
Department |
client.interface.trigger ("showElement", {id: "department"}) |
Category |
client.interface.trigger ("showElement", {id: "category"}) |
Group |
client.interface.trigger ("showElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("showElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("showElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("showElement", {id: "customfield name"}) |
Disable Change Property Fields
The method disables the selected change property field so its value cannot be edited.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("disableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("disableElement", {id: "status"}) |
Priority |
client.interface.trigger ("disableElement", {id: "priority"}) |
Impact |
client.interface.trigger ("disableElement", {id: "impact"}) |
Risk |
client.interface.trigger ("disableElement", {id: "risk"}) |
Type |
client.interface.trigger ("disableElement", {id: "type"}) |
Agent |
client.interface.trigger ("disableElement", {id: "agent"}) |
Department |
client.interface.trigger ("disableElement", {id: "department"}) |
Category |
client.interface.trigger ("disableElement", {id: "category"}) |
Group |
client.interface.trigger ("disableElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("disableElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("disableElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("disableElement", {id: "customfield name"}) |
Enable Change Property Fields
The method enables the selected change property field so you can edit its value.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("enableElement", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger ("enableElement", {id: "status"}) |
Priority |
client.interface.trigger ("enableElement", {id: "priority"}) |
Impact |
client.interface.trigger ("enableElement", {id: "impact"}) |
Risk |
client.interface.trigger ("enableElement", {id: "risk"}) |
Type |
client.interface.trigger ("enableElement", {id: "type"}) |
Agent |
client.interface.trigger ("enableElement", {id: "agent"}) |
Department |
client.interface.trigger ("enableElement", {id: "department"}) |
Category |
client.interface.trigger ("enableElement", {id: "category"}) |
Group |
client.interface.trigger ("enableElement", {id: "group"}) |
Planned Start Date |
client.interface.trigger ("enableElement", {id: "plannedStartDate"}) |
Planned End Date |
client.interface.trigger ("enableElement", {id: "plannedEndDate"}) |
custom field |
client.interface.trigger ("enableElement", {id: "customfield name"}) |
Set Value for Change Property Fields
The method sets a specified value in the selected change property field.
Copied Copy1 2 3 4 5 6 | client.interface.trigger("setValue", {id: "property", value: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); |
The following table lists the supported property fields.
Element | Syntax |
---|---|
Status |
client.interface.trigger("setValue", {id: "status", value: 3}) |
Priority |
client.interface.trigger("setValue", {id: "priority", value: 3}) |
Impact |
client.interface.trigger("setValue", {id: "impact", value: 2}) |
Risk |
client.interface.trigger("setValue", {id: "risk", value: 2}) |
Type |
client.interface.trigger("setValue", {id: "type", value: "2"}) |
Group |
client.interface.trigger("setValue", {id: "group", value: "10"}) |
Agent |
client.interface.trigger("setValue", {id: "agent", value: "30"}) |
Department |
client.interface.trigger("setValue", {id: "department", value: "15"}) |
Planned Start Date |
client.interface.trigger("setValue", {id: "plannedStartDate", value: "YYYY-MM-DDTHH:MM:SS±hh:mm"}) |
Planned End Date |
client.interface.trigger("setValue", {id: "plannedEndDate", value: "YYYY-MM-DDTHH:MM:SS±hh:mm"}) |
Category |
client.interface.trigger("setValue", {id: "category", value: "Hardware"}) |
SubCategory |
client.interface.trigger("setValue", {id: "subCategory", value: "Computer"}) |
Item |
client.interface.trigger("setValue", {id: "item", value: "MAC"}) |
custom field |
client.interface.trigger("setValue", {id: "customfield name", value: 3}) |