You can use Interface APIs to trigger user interface actions on a page. With these APIs, 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 API to automatically open a note with default text whenever a user changes the status of a ticket.
Global Interface APIs
The following APIs can be used in all locations:Show Modal - Opens a Modal dialog box in an IFrame to display HTML content to users.
Note: Events API and Interface API are not allowed within the Modal IFrame.
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 }); |

Note:
1) The template field is mandatory, if left empty an error message is displayed.
2) The title field is optional and supports only 30 characters, the rest is truncated. The default title is Modal dialog.
To send data from template.html to the modal, add an additional parameter data 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 }); |
The data can be retrieved inside the modal by using the context API.
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 API.
If the modal includes features, such as Data API, Request API, Installation Parameters, and Data Storage, you need to include the following Freshclient link in the Modal IFrame.
modal.html
Copied Copy1 | <script src="https://static.freshdev.io/fdk/2.0/assets/fresh_client.js"></script> |
Show Confirm - Shows a confirmation dialog with title, message, saveLabel, cancelLabel to users. By default, the dialog shows Save and Cancel buttons and you can use saveLabel and cancelLabel to modify the button labels.
Note: Timeout for confirmation dialog is 10 seconds.
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; }); |

Note:
1) The template field is mandatory, if left empty an error message is displayed.
2) The title field is optional and supports only 30 characters, the rest are truncated. The default title is Modal dialog.
3) The message field supports a maximum of 100 characters.
4) The saveLabel and cancelLabel fields support a maximum of 11 characters.
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; }); |
Note:
1) The message field is mandatory, if left empty an error message is displayed.
2) The type field is mandatory, if left empty an error message is displayed.
3) The title field is optional and supports only 30 characters, the rest are truncated. The default title is Confirmation title.
4) The message field supports a maximum of 100 characters.
5) For an invalid type, an error message, "Unsupported notification type", will be displayed.
Show Notifications - Shows various types of notifications.
- 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 APIs
- 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 APIs
Expand Conversations - If there are more than three conversations, the older ones are collapsed and only the most recent ones are shown. This API 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 - 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 - 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 - 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 - 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 - Opens the Reply editor and adds specified text in the textbox. Using this API also invokes any callback function if specified using ticket.replyClick Event API.
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 - Opens the Note editor and replaces the existing text with the specified text. Using this API also invokes any callback function if specified using the ticket.notesClick Event API.
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 - 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 - 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 - Shows 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 - Hides the Add note option in all the locations such as 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 - Shows the Add note option from all the locations such as top navigation and bottom conversation bar
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 - 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 all 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 - Shows 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 - 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 all 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 - 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 all 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 - 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 - 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 - Is used to start a timer. If a timer is already running, the API 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 APIs
- 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 - 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 - Shows 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 - 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 - Shows 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 - 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 - 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 - 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 - Shows 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 - 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 all 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 - 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 all 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 - 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 all 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 APIs
The following APIs are available to all apps that are located 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 - 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 all 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 - Shows 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"}) |
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 - 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 all 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 - 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 all 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 - 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 all 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 APIs
- 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 - 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 - Shows 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 - 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 - 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 - 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 all 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 - Shows 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 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 - 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 all 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 - 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 all 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 - 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 all 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}) |