Interface Methods

You can use the interface methods to enable an app to trigger certain actions on the Freshdesk user interface.

Take a look at the Ticket Background app for a demonstration of this feature.

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 Copy
1
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 dialog box, add the data parameter as shown in the following code.

template.html

Copied Copy
1
2
3
4
5
6
7
8
9
client.interface.trigger("showModal", { title: "Sample Modal", template: "modal.html", data: {name: "James", email: "James@freshdesk.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 Copy
1
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@freshdesk.com"} } */ }.catch(function(error) { // error - error object }));

You can transfer data from the modal dialog box 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 Copy
1
<script src="https://static.freshdev.io/fdk/2.0/assets/fresh_client.js"></script>

Show Dialog

The method displays a dialog box with a title and template in an IFrame, to users. Events methods and interface methods are not supported within the Modal IFrame. You can transfer data from the dialog box to the app and vice versa by using the Instance method.

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.


Copied Copy
1
2
3
4
5
6
7
8
9
10
client.interface.trigger("showDialog", { title: "Sample Dialog", template: "dialog.html" /*"title" should be plain text.*/ /*"dialog.html" is the "template" within "<yourproject>/app" directory.*/ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Show Confirm

The method displays a confirmation dialog box with a title, a message, and the save and 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:
  • 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 title field is optional and supports a maximum of 30 characters; beyond that the title is truncated. The default title is Confirmation title.
  • The saveLabel and cancelLabel fields support a maximum of 11 characters.

Sample confirmation dialog box with default buttons

Copied Copy
1
2
3
4
5
6
7
8
9
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 box with saveLabel and cancelLabel

Copied Copy
1
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 types of notifications on the user interface.

Notes:
  • 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, danger, and alert. 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 Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.interface.trigger("showNotify", { type: "success", message: "sample notification" /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object });

    Sample notification with a title

    You can add a title to the notification by including the title parameter.
    Copied Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.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 Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.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 Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.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 });
  • Danger

    Sample danger notification

    Copied Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.interface.trigger("showNotify", { type: "danger", title: "Danger", message: "This is a sample danger notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object });
  • Alert

    Sample alert notification

    Copied Copy
    1
    2
    3
    4
    5
    6
    7
    8
    9
    client.interface.trigger("showNotify", { type: "alert", title: "Alert", message: "This is a sample alert notification." /* The "message" should be plain text */ }).then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Navigate to Ticket Details page

The methods allows users to navigate to the Ticket Details page of the specified ticket.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "ticket",value: 1 }) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Navigate to Contact Details page

The method allows users to navigate to the Contact Details page of the specified contact.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "contact",value: 1 }) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Global CTI

The following methods are available:

Show CTI

The method opens an IFrame to display content to users.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "softphone"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Hide CTI

The method hides the IFrame.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "softphone"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Show missed calls

The method displays the number of missed calls on the CTI widget.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "missedCall", value: '30'}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Note: If there are more than 99 missed calls, 99+ is displayed on the CTI widget.


Hide missed calls

The method hides the number of missed calls on the CTI widget.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "missedCall"}) .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.

Time Entry Modal
Note: For the following methods, ensure that the app location is time_entry_background.

Editor Window methods

Edit Contact Details Window and Contact Details Pane

Hide Attachments

The method hides attachments in conversations on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "attachments"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Attachments

The method displays attachments in conversations.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "attachments"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Attachment Delete Button

The method hides the Attachment Delete button.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "attachmentsDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Attachment Delete Button

The method displays the Attachment Delete button.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "attachmentsDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Mark as Spam Option

The method hides the Mark as Spam option.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "ticketSpam"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Edit Ticket Option

The method hides the Edit ticket option on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "ticketEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Edit Ticket Option

The method displays the Edit ticket option on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "ticketEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Disable Edit Ticket Option

The method disables the Edit ticket option on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "ticketEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Enable Edit Ticket Option

The method enables the Edit ticket option on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "ticketEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Ticket Delete Button

The method hides the ticket Delete button on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Ticket Delete Button

The method displays the ticket Delete button on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Disable Ticket Delete Button

The method disables the Ticket delete button on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Enable Ticket Delete Button

The method enables the Ticket delete button on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "ticketDelete"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Ticket Property Fields

The method hides the selected ticket property field on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger ("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of property fields that can be hidden.

Element Syntax
Status

client.interface.trigger ("hide", {id: "status"})

Priority

client.interface.trigger ("hide", {id: "priority"})

Type

client.interface.trigger ("hide", {id: "ticket_type"})

Group

client.interface.trigger ("hide", {id: "group"})

Product

client.interface.trigger ("hide", {id: "product"})

Custom field

client.interface.trigger ("hide", {id: "cf_custom_field"})

Tags

client.interface.trigger ("hide", {id: "tag"})


Note: For the custom field, the name should be of the form cf_your_custom_field_name. For example, if your custom field name is "Agent Number", then your setValue call should be: client.interface.trigger("setValue", { id: "cf_agent_number", value:"121333"});


Show Ticket Property Fields

The method displays the selected ticket property field if hidden.

Copied Copy
1
2
3
4
5
6
client.interface.trigger ("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of the supported property fields.

Element Syntax
Status

client.interface.trigger ("show", {id: "status"})

Priority

client.interface.trigger ("show", {id: "priority"})

Type

client.interface.trigger ("show", {id: "ticket_type"})

Group

client.interface.trigger ("show", {id: "group"})

Product

client.interface.trigger ("show", {id: "product"})

Custom field

client.interface.trigger ("show", {id: "cf_custom_field"})

Tags

client.interface.trigger ("show", {id: "tag"})


Disable Ticket Property Fields

The method disables the selected ticket property field.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of the property fields that can be disabled.

Element Syntax
Status

client.interface.trigger ("disable", {id: "status"})
Note: When you disable the status property, users will not be able to edit the field.

Priority

client.interface.trigger ("disable", {id: "priority"})

Type

client.interface.trigger ("disable", {id: "ticket_type"})

Group

client.interface.trigger ("disable", {id: "group"})

Product

client.interface.trigger ("disable", {id: "product"})

Custom field

client.interface.trigger ("disable", {id: "cf_custom_field"})

Tags

client.interface.trigger ("disable", {id: "tag"})

Enable Ticket Property Fields

The method enables the selected ticket property field so that you can edit its value.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of the supported property fields.

Element Syntax
Status

client.interface.trigger ("enable", {id: "status"})

Priority

client.interface.trigger ("enable", {id: "priority"})

Type

client.interface.trigger ("enable", {id: "ticket_type"})

Group

client.interface.trigger ("enable", {id: "group"})

Product

client.interface.trigger ("enable", {id: "product"})

Custom field

client.interface.trigger ("enable", {id: "cf_custom_field_name"})

Tags

client.interface.trigger ("enable", {id: "tag"})


Set Options of Ticket Property Fields

The method allows users to display specific values in a drop-down list; all other values will be hidden.

Copied Copy
1
client.interface.trigger ("setOptions", {id: "property", value: [value1, value2]})

Here, property can be a default or custom drop-down field and value should be an array of comma separated values.

List of fields for which values can be set.

Property Syntax
Status

client.interface.trigger("setOptions", {id: "status", value: [2, 3, 4]})

Priority

client.interface.trigger("setOptions", {id: "priority", value: [3, 4, 5]})

Ticket type

client.interface.trigger("setOptions", {id: "ticket_type", value: ["incident", "problem", "question"]})

Group

client.interface.trigger("setOptions", {id: "group", value: [10, 11, 12]})

Agent

client.interface.trigger("setOptions", {id: "agent", value: [30, 40, 50]})

Product

client.interface.trigger("setOptions", {id: "product", value: [1, 2, 3]})

Custom field

client.interface.trigger("setOptions", {id: "cf_custom_field_name", value: [3, 4, 5]})


Set Value of Ticket Property Field

The method sets the ticket property field with a specified value.

Copied Copy
1
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 });

List of 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: "ticket_type", value: "Incident"})

Group

client.interface.trigger("setValue", {id: "group", value: 10})

Agent

client.interface.trigger("setValue", {id: "agent", value: 30})

Product

client.interface.trigger("setValue", {id: "product", value: 1})

Custom field

client.interface.trigger("setValue", {id: "cf_custom_field_name", value: 3})


Hide Ticket Due By Link

The menthod is used to hide the ticket due by edit link to prevent any updates to the existing value.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "ticketDueBy"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Ticket Due By Link

The method displays the ticket due by edit link to allow updates to the existing value.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "ticketDueBy"}) .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 Copy
1
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 });
Stop Timer

The method is used to stop a running timer.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("stop", {id: "timer"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Expand Conversation

When the number of notes and replies in a ticket exceeds a certain limit, the older ones are collapsed and only the most recent ones are shown. This method enables you to expand and view all of them.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "expandConversation"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Editor window methods
Open Reply and Insert Text

The method opens the Reply editor and replaces the existing text with the specified text. The method also invokes any callback function if used along with the ticket.replyClick event method.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "reply", text: "Text to be inserted"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Open Note and Insert Text

The method opens the Note editor and replaces the existing text with the specified text. The method also invokes any callback function if used along with the ticket.notesClick event method.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "note", text: "Text to be inserted", isPublic: true}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Insert Text in Editor window

The method inserts text and attachments in an already open conversation editor window. It works for notes, replies, and forwards. The method should be used for apps in the "ticket_conversation_editor" location as it requires the editor window to be already open.

Copied Copy
1
2
3
4
5
6
7
8
client.interface.trigger( "setValue", {id: "editor", text: "Text to be inserted", attachments: [attachment ID1, attachment ID2...]}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

By default, the text is appended at the current cursor position. The optional replace parameter, which is boolean, can be used to replace the existing content or add to it. The optional position parameter, which accepts a value of start or end, can be used to decide if the text is to be added to the start or end of existing content. By default, this value is set to start.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("setValue", {id: "editor", text: "Text to be inserted", replace: false, position: "end"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Field

The method hides the specified field (To, From, Cc, Bcc) in the reply editor.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be hidden.

Field Syntax
To

client.interface.trigger("hide", {id: "to"})

From

client.interface.trigger("hide", {id: "from"})

Cc

client.interface.trigger("hide", {id: "cc"})

Bcc

client.interface.trigger("hide", {id: "bcc"})


Show Field

The method displays the specified field (To, From, Cc, Bcc) in the reply editor.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be displayed.

Field Syntax
To

client.interface.trigger("show", {id: "to"})

From

client.interface.trigger("show", {id: "from"})

Cc

client.interface.trigger("show", {id: "cc"})

Bcc

client.interface.trigger("show", {id: "bcc"})


Disable Field

The method disables the specified field (To, From, Cc, Bcc) in the reply editor to prevent any updates to the existing value.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be disabled.

Field Syntax
To

client.interface.trigger("disable", {id: "to"})

From

client.interface.trigger("disable", {id: "from"})

Cc

client.interface.trigger("disable", {id: "cc"})

Bcc

client.interface.trigger("disable", {id: "bcc"})


Enable Field

The method enables the specified field (To, From, Cc, Bcc) in the reply editor.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be enabled.

Field Syntax
To

client.interface.trigger("enable", {id: "to"})

From

client.interface.trigger("enable", {id: "from"})

Cc

client.interface.trigger("enable", {id: "cc"})

Bcc

client.interface.trigger("enable", {id: "bcc"})


Set Value of Editor Window Fields

The method sets the editor window field (To, From, Cc, Bcc) with the specified value.

Copied Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
client.interface.trigger("setValue", {id: "property", value: ["value"]}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); // For multiple values client.interface.trigger("setValue", {id: "property", value: ["value_1", "value_2"..]}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
EXPAND ↓

List of fields for which values can be set.

Field Syntax
To

client.interface.trigger("setValue", {id: "to", value: ["tom@customer.com"]})

From

client.interface.trigger("setValue", {id: "from", value: "rachel@freshdesk.com"})

Cc

client.interface.trigger("setValue", {id: "cc", value: ["rachel@freshdesk.com"]})

Bcc

client.interface.trigger("setValue", {id: "bcc", value: ["rachel@freshdesk.com"]})


Hide Note Button

The method hides the Add note button in the top navigation and bottom coversation bars.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Note Button

The method displays the Add note button in the top navigation and bottom conversation bars.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Disable Note Button

The method disables the note option in the top navigation bar and hides the note option in the bottom conversation bar.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Enable Note Button

The method enables the note option in the top navigation and bottom conversation bars.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "note"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Hide Edit Option in Notes

The method hides the Edit option in Notes.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "noteEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show Edit Option in Notes

The method displays the Edit option in Notes.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "noteEdit"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Set Note Options

The method sets either the public or private note option as default and hides the other one.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("setOptions", {id: "note", value: ["value"]}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

Example

Copied Copy
1
2
3
4
5
6
client.interface.trigger("setOptions", {id: "note", value: ["Public"]}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Set Note Type

The method sets the note type to either private or public.

Copied Copy
1
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 });
Sample Copied Copy
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 });
Set Notify to Field

The method sets or clears the Notify to field in Notes.

Copied Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
client.interface.trigger("setValue", {id: "note", toAddress: "value"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); // For multiple values client.interface.trigger("setValue", {id: "note", toAddress: "value_1, value_2"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object }); // To clear the field client.interface.trigger("setValue", {id: "note", toAddress: ""}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
EXPAND ↓
Hide Reply Button

The method hides the reply option in the top navigation and bottom coversation bars.

Copied Copy
1
client.interface.trigger("hide", {id: "reply"})
Show Reply Button

The method displays the reply option in the top navigation and bottom conversation bars.

Copied Copy
1
client.interface.trigger("show", {id: "reply"})
Hide Forward Button

The method hides the forward option in the top navigation and bottom coversation bars.

Copied Copy
1
client.interface.trigger("hide", {id: "forward"})
Show Forward Button

The method displays the forward option in the top navigation and bottom conversation bars.

Copied Copy
1
client.interface.trigger("show", {id: "forward"})
Remove Quoted Text in Ticket Reply Editor

The method allows an app to remove quoted text when you click the Reply button on the Ticket Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("click", {id: "deleteQuotedText"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Time Entry Modal

For these apps, the location should be time_entry_background.

Hide

The method hides the specified field. In the following code, element can be replaced with the given fields:

  • timerBillable
  • timerAgentId
  • timerNote
  • timerSetTime
  • timerExecuteAt
Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Show

The method displays the specified field. In the following code, element can be replaced with the given fields:

  • timerBillable
  • timerAgentId
  • timerNote
  • timerSetTime
  • timerExecuteAt
Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Enable

The method enables the specified field. In the following code, element can be replaced with the given fields:

  • timerBillable
  • timerAgentId
  • timerNote
  • timerSetTime
  • timerExecuteAt
Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Disable

The method disables the specified field. In the following code, element can be replaced with the given fields:

  • timerBillable
  • timerAgentId
  • timerNote
  • timerSetTime
  • timerExecuteAt
Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
Set Value

The method sets a particular field (timerBillable, timerAgentId, timerNote, timerSetTime, timerExecuteAt) with a specified value.

Copied Copy
1
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 });

In the given code, property can be replaced with the given fields:

  • timerBillable - value can be either true or false.
  • client.interface.trigger("setValue", {id: "timerBillable", value: false})
  • timerAgentId - value is an integer and should be the agent's user_id.
  • client.interface.trigger("setValue", {id: "timerAgentId", value: 147})
  • timerNote - value is a string.
  • client.interface.trigger("setValue", {id: "timerNote", value: "time sheet value"})
  • timerSetTime - value is a string (ie.) "1" or "1:30" or "1.5".
  • client.interface.trigger("setValue", {id: "timerSetTime", value: "1:15"})
  • timerExecuteAt - value is in date format "DD/MMM/YYYY" or "DD-MMM-YYYY".
  • client.interface.trigger("setValue", {id: "timerExecuteAt", value: "24/june/2018"})

    Note:
    If the timerSetTime field is blank, the timerExecutedAt field is set to the current date even if an app tries to set a value for the same.


Edit Contact Details Window and Contact Details Pane

An app, whose location is ticket_background, can use the following interface methods on fields of the Edit contact details window and CONTACT DETAILS pane (requestor widget) on the Ticket Details page.

Hide Field

The method hides a particular field on the Ticket Details page > Edit contact details window.

The specified field is also hidden from the Ticket Details page > CONTACT DETAILS pane.

The CONTACT DETAILS pane contains fields with contact information and company information. To identify the appropriate field, specify the context when defining the interface methods. The field context can be contact.<element_name> or company.<element_name>. If no context is passed and only <element_name> is used in the interface method definition, the method acts on the fields with the same name on the Ticket Details page > PROPERTIES pane.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "contact.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of contact information fields that can be hidden.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("hide", {id: "contact.tags"})

Unique external ID

client.interface.trigger ("hide", {id: "contact.unique_external_id"})

Mobile Phone

client.interface.trigger ("hide", {id: "contact.mobile"})

Email

client.interface.trigger ("hide", {id: "contact.email"})

Twitter

client.interface.trigger ("hide", {id: "contact.twitter_id"})

Address

client.interface.trigger ("hide", {id: "contact.address"})

Phone Number

client.interface.trigger ("hide", {id: "contact.phone"})

Language

client.interface.trigger ("hide", {id: "contact.language"})

About

client.interface.trigger ("hide", {id: "contact.description"})

Time zone

client.interface.trigger ("hide", {id: "contact.time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "contact.element_name"})


Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "company.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of company information fields that can be hidden.

Field Name Syntax
Description

client.interface.trigger ("hide", {id: "company.description"})

Notes

client.interface.trigger ("hide", {id: "company.note"})

Domains for this company

client.interface.trigger ("hide", {id: "company.domains"})

Health Score

client.interface.trigger ("hide", {id: "company.health_score"})

Account Tier

client.interface.trigger ("hide", {id: "company.account_tier"})

Renewal Date

client.interface.trigger ("hide", {id: "company.renewal_date"})

Industry

client.interface.trigger ("hide", {id: "company.industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "company.element_name"})


Show Field

The method displays a particular field on the Ticket Details page > Edit contact details window. The specified field is also displayed on the Ticket Details page > CONTACT DETAILS pane.

The CONTACT DETAILS pane contains fields with contact information and company information. To identify the appropriate field, specify the context when defining the interface methods. The field context can be contact.<element_name> or company.<element_name>. If no context is passed and only <element_name> is used in the interface method definition, the method acts on the fields with the same name on the Ticket Details page > PROPERTIES pane.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "contact.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of contact information fields that can be displayed.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("show", {id: "contact.tags"})

Unique external ID

client.interface.trigger ("show", {id: "contact.unique_external_id"})

Mobile Phone

client.interface.trigger ("show", {id: "contact.mobile"})

Email

client.interface.trigger ("show", {id: "contact.email"})

Twitter

client.interface.trigger ("show", {id: "contact.twitter_id"})

Address

client.interface.trigger ("show", {id: "contact.address"})

Phone Number

client.interface.trigger ("show", {id: "contact.phone"})

Language

client.interface.trigger ("show", {id: "contact.language"})

About

client.interface.trigger ("show", {id: "contact.description"})

Time zone

client.interface.trigger ("show", {id: "contact.time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "contact.element_name"})


Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "company.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of company information fields that can be displayed.

Field Name Syntax
Description

client.interface.trigger ("show", {id: "company.description"})

Notes

client.interface.trigger ("show", {id: "company.note"})

Domains for this company

client.interface.trigger ("show", {id: "company.domains"})

Health Score

client.interface.trigger ("show", {id: "company.health_score"})

Account Tier

client.interface.trigger ("show", {id: "company.account_tier"})

Renewal Date

client.interface.trigger ("show", {id: "company.renewal_date"})

Industry

client.interface.trigger ("show", {id: "company.industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "company.element_name"})


Disable Field

The method disables a particular field on the Ticket Details page > Edit contact details window. The specified field is also disabled on the Ticket Details page > CONTACT DETAILS pane.

The CONTACT DETAILS pane contains fields with contact information and company information. To identify the appropriate field, specify the context when defining the interface methods. The field context can be contact.<element_name> or company.<element_name>. If no context is passed and only <element_name> is used in the interface method definition, the method acts on the fields with the same name on the Ticket Details page > PROPERTIES pane.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "contact.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of contact information fields that can be disabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("disable", {id: "contact.tags"})

Unique external ID

client.interface.trigger ("disable", {id: "contact.unique_external_id"})

Mobile Phone

client.interface.trigger ("disable", {id: "contact.mobile"})

Email

client.interface.trigger ("disable", {id: "contact.email"})

Twitter

client.interface.trigger ("disable", {id: "contact.twitter_id"})

Address

client.interface.trigger ("disable", {id: "contact.address"})

Phone Number

client.interface.trigger ("disable", {id: "contact.phone"})

Language

client.interface.trigger ("disable", {id: "contact.language"})

About

client.interface.trigger ("disable", {id: "contact.description"})

Time zone

client.interface.trigger ("disable", {id: "contact.time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("disable", {id: "contact.element_name"})


Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "company.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of company information fields that can be disabled.

Field Name Syntax
Description

client.interface.trigger ("disable", {id: "company.description"})

Notes

client.interface.trigger ("disable", {id: "company.note"})

Domains for this company

client.interface.trigger ("disable", {id: "company.domains"})

Health Score

client.interface.trigger ("disable", {id: "company.health_score"})

Account Tier

client.interface.trigger ("disable", {id: "company.account_tier"})

Renewal Date

client.interface.trigger ("disable", {id: "company.renewal_date"})

Industry

client.interface.trigger ("disable", {id: "company.industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("disable", {id: "company.element_name"})


Enable Field

The method enables a particular field on the Ticket Details page > Edit contact details window. The specified field is also enabled on the Ticket Details page > CONTACT DETAILS pane.

The CONTACT DETAILS pane contains fields with contact information and company information. To identify the appropriate field, specify the context when defining the interface methods. The field context can be contact.<element_name> or company.<element_name>. If no context is passed and only <element_name> is used in the interface method definition, the method acts on the fields with the same name on the Ticket Details page > PROPERTIES pane.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "contact.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of contact information fields that can be enabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("enable", {id: "contact.tags"})

Unique external ID

client.interface.trigger ("enable", {id: "contact.unique_external_id"})

Mobile Phone

client.interface.trigger ("enable", {id: "contact.mobile"})

Email

client.interface.trigger ("enable", {id: "contact.email"})

Twitter

client.interface.trigger ("enable", {id: "contact.twitter_id"})

Address

client.interface.trigger ("enable", {id: "contact.address"})

Phone Number

client.interface.trigger ("enable", {id: "contact.phone"})

Language

client.interface.trigger ("enable", {id: "contact.language"})

About

client.interface.trigger ("enable", {id: "contact.description"})

Time zone

client.interface.trigger ("enable", {id: "contact.time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "contact.element_name"})


Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "company.element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of company information fields that can be enabled.

Field Name Syntax
Description

client.interface.trigger ("enable", {id: "company.description"})

Notes

client.interface.trigger ("enable", {id: "company.note"})

Domains for this company

client.interface.trigger ("enable", {id: "company.domains"})

Health Score

client.interface.trigger ("enable", {id: "company.health_score"})

Account Tier

client.interface.trigger ("enable", {id: "company.account_tier"})

Renewal Date

client.interface.trigger ("enable", {id: "company.renewal_date"})

Industry

client.interface.trigger ("enable", {id: "company.industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "company.element_name"})

Contact Details Page

The following methods are available to apps that are installed on the Contact Details page.

Hide Field

The menthod hides a particular field on the Contact Details page > Edit contact window or the Edit button on the Contact Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

The specified field is also hidden from the Contact Details page > DETAILS pane.

List of fields that can be hidden.

Field Syntax with the corresponding element name
Edit button

client.interface.trigger ("hide", {id: "contactEdit"})

Tags

client.interface.trigger ("hide", {id: "tags"})

Unique external ID

client.interface.trigger ("hide", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("hide", {id: "mobile"})

Email

client.interface.trigger ("hide", {id: "email"})

Twitter

client.interface.trigger ("hide", {id: "twitter_id"})

Address

client.interface.trigger ("hide", {id: "address"})

Phone Number

client.interface.trigger ("hide", {id: "phone"})

Language

client.interface.trigger ("hide", {id: "language"})

About

client.interface.trigger ("hide", {id: "description"})

Time zone

client.interface.trigger ("hide", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "element_name"})


Show Field

the menthod displays a particular field on the Contact Details page > Edit contact window or the Edit button on the Contact Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

The specified field is also displayed on the Contact Details page > DETAILS pane.

List of fields that can be displayed.

Field Syntax with the corresponding element name
Edit button

client.interface.trigger ("show", {id: "contactEdit"})

Tags

client.interface.trigger ("show", {id: "tags"})

Unique external ID

client.interface.trigger ("show", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("show", {id: "mobile"})

Email

client.interface.trigger ("show", {id: "email"})

Twitter

client.interface.trigger ("show", {id: "twitter_id"})

Address

client.interface.trigger ("show", {id: "address"})

Phone Number

client.interface.trigger ("show", {id: "phone"})

Language

client.interface.trigger ("show", {id: "language"})

About

client.interface.trigger ("show", {id: "description"})

Time zone

client.interface.trigger ("show", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Disable Field

The method disables a particular field on the Contact Details page > Edit contact window.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

The specified field is also disabled on the Contact Details page > DETAILS pane.

List of fields that can be disabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("disable", {id: "tags"})

Unique external ID

client.interface.trigger ("disable", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("disable", {id: "mobile"})

Email

client.interface.trigger ("disable", {id: "email"})

Twitter

client.interface.trigger ("disable", {id: "twitter_id"})

Address

client.interface.trigger ("disable", {id: "address"})

Phone Number

client.interface.trigger ("disable", {id: "phone"})

Language

client.interface.trigger ("disable", {id: "language"})

About

client.interface.trigger ("disable", {id: "description"})

Time zone

client.interface.trigger ("disable", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("disable", {id: "element_name"})


Enable Field

the menthod enables a particular field on the Contact Details page > Edit contact window.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

The specified field is also enabled on the Contact Details page > DETAILS pane.

List of fields that can be enabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("enable", {id: "tags"})

Unique external ID

client.interface.trigger ("enable", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("enable", {id: "mobile"})

Email

client.interface.trigger ("enable", {id: "email"})

Twitter

client.interface.trigger ("enable", {id: "twitter_id"})

Address

client.interface.trigger ("enable", {id: "address"})

Phone Number

client.interface.trigger ("enable", {id: "phone"})

Language

client.interface.trigger ("enable", {id: "language"})

About

client.interface.trigger ("enable", {id: "description"})

Time zone

client.interface.trigger ("enable", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "element_name"})

Contact List Page

The following methods are available to apps that are installed on the Contact List page.

Hide Field

The method hides a particular field on the Contact List page > Edit contact window or the Edit button on the Contact List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be hidden.

Field Syntax with the corresponding element name
Edit button

client.interface.trigger ("hide", {id: "contactEdit"})

Tags

client.interface.trigger ("hide", {id: "tags"})

Unique external ID

client.interface.trigger ("hide", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("hide", {id: "mobile"})

Email

client.interface.trigger ("hide", {id: "email"})

Twitter

client.interface.trigger ("hide", {id: "twitter_id"})

Address

client.interface.trigger ("hide", {id: "address"})

Phone Number

client.interface.trigger ("hide", {id: "phone"})

Language

client.interface.trigger ("hide", {id: "language"})

About

client.interface.trigger ("hide", {id: "description"})

Time zone

client.interface.trigger ("hide", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "element_name"})


Show Field

The method displays a particular field on the Contact List page > Edit contact window or the Edit button on the Contact List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be displayed.

Field Syntax with the corresponding element name
Edit button

client.interface.trigger ("show", {id: "contactEdit"})

Tags

client.interface.trigger ("show", {id: "tags"})

Unique external ID

client.interface.trigger ("show", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("show", {id: "mobile"})

Email

client.interface.trigger ("show", {id: "email"})

Twitter

client.interface.trigger ("show", {id: "twitter_id"})

Address

client.interface.trigger ("show", {id: "address"})

Phone Number

client.interface.trigger ("show", {id: "phone"})

Language

client.interface.trigger ("show", {id: "language"})

About

client.interface.trigger ("show", {id: "description"})

Time zone

client.interface.trigger ("show", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Disable Field

The method disables a particular field on the Contact List page > Edit contact window.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be disabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("disable", {id: "tags"})

Unique external ID

client.interface.trigger ("disable", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("disable", {id: "mobile"})

Email

client.interface.trigger ("disable", {id: "email"})

Twitter

client.interface.trigger ("disable", {id: "twitter_id"})

Address

client.interface.trigger ("disable", {id: "address"})

Phone Number

client.interface.trigger ("disable", {id: "phone"})

Language

client.interface.trigger ("disable", {id: "language"})

About

client.interface.trigger ("disable", {id: "description"})

Time zone

client.interface.trigger ("disable", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("disable", {id: "element_name"})


Enable Field

The method enables a particular field on the Contact List page > Edit contact window.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be enabled.

Field Syntax with the corresponding element name
Tags

client.interface.trigger ("enable", {id: "tags"})

Unique external ID

client.interface.trigger ("enable", {id: "unique_external_id"})

Mobile Phone

client.interface.trigger ("enable", {id: "mobile"})

Email

client.interface.trigger ("enable", {id: "email"})

Twitter

client.interface.trigger ("enable", {id: "twitter_id"})

Address

client.interface.trigger ("enable", {id: "address"})

Phone Number

client.interface.trigger ("enable", {id: "phone"})

Language

client.interface.trigger ("enable", {id: "language"})

About

client.interface.trigger ("enable", {id: "description"})

Time zone

client.interface.trigger ("enable", {id: "time_zone"})

Any custom field
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "element_name"})

Company Details Page

The following methods are available to apps that are installed on the Company Details page.

Hide Field

The method hides a particular field on the Company Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be hidden.

Field Name Syntax
About

client.interface.trigger ("hide", {id: "description"})

Notes

client.interface.trigger ("hide", {id: "note"})

Domains for this company

client.interface.trigger ("hide", {id: "domains"})

Health Score

client.interface.trigger ("hide", {id: "health_score"})

Account Tier

client.interface.trigger ("hide", {id: "account_tier"})

Renewal Date

client.interface.trigger ("hide", {id: "renewal_date"})

Industry

client.interface.trigger ("hide", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "element_name"})


Show Field

The method displays a particular field on the Company Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be displayed.

Field Name Syntax
About

client.interface.trigger ("show", {id: "description"})

Notes

client.interface.trigger ("show", {id: "note"})

Domains for this company

client.interface.trigger ("show", {id: "domains"})

Health Score

client.interface.trigger ("show", {id: "health_score"})

Account Tier

client.interface.trigger ("show", {id: "account_tier"})

Renewal Date

client.interface.trigger ("show", {id: "renewal_date"})

Industry

client.interface.trigger ("show", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Disable Field

The method disables a particular field on the Company Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be disabled.

Field Name Syntax
About

client.interface.trigger ("disable", {id: "description"})

Notes

client.interface.trigger ("disable", {id: "note"})

Domains for this company

client.interface.trigger ("disable", {id: "domains"})

Health Score

client.interface.trigger ("disable", {id: "health_score"})

Account Tier

client.interface.trigger ("disable", {id: "account_tier"})

Renewal Date

client.interface.trigger ("disable", {id: "renewal_date"})

Industry

client.interface.trigger ("disable", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Show Field

The method enables a particular field on the Company Details page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be enabled.

Field Name Syntax
About

client.interface.trigger ("enable", {id: "description"})

Notes

client.interface.trigger ("enable", {id: "note"})

Domains for this company

client.interface.trigger ("enable", {id: "domains"})

Health Score

client.interface.trigger ("enable", {id: "health_score"})

Account Tier

client.interface.trigger ("enable", {id: "account_tier"})

Renewal Date

client.interface.trigger ("enable", {id: "renewal_date"})

Industry

client.interface.trigger ("enable", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "element_name"})

Company List Page

The following methods are available to apps that are installed on the Company List page.

Hide Field

The method hides a particular field on the Edit company window which you can navigate to from the Company List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("hide", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });
List of fields that can be hidden.

Field Name Syntax
Description

client.interface.trigger ("hide", {id: "description"})

Notes

client.interface.trigger ("hide", {id: "note"})

Domains for this company

client.interface.trigger ("hide", {id: "domains"})

Health Score

client.interface.trigger ("hide", {id: "health_score"})

Account Tier

client.interface.trigger ("hide", {id: "account_tier"})

Renewal Date

client.interface.trigger ("hide", {id: "renewal_date"})

Industry

client.interface.trigger ("hide", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("hide", {id: "element_name"})


Show Field

The method displays a particular field on the Edit company window which you can navigate to from the Company List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("show", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be displayed.

Field Name Syntax
Description

client.interface.trigger ("show", {id: "description"})

Notes

client.interface.trigger ("show", {id: "note"})

Domains for this company

client.interface.trigger ("show", {id: "domains"})

Health Score

client.interface.trigger ("show", {id: "health_score"})

Account Tier

client.interface.trigger ("show", {id: "account_tier"})

Renewal Date

client.interface.trigger ("show", {id: "renewal_date"})

Industry

client.interface.trigger ("show", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Disable Field

The method disables a particular field on the Edit company window which you can navigate to from the Company List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("disable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be disabled.

Field Name Syntax
Description

client.interface.trigger ("disable", {id: "description"})

Notes

client.interface.trigger ("disable", {id: "note"})

Domains for this company

client.interface.trigger ("disable", {id: "domains"})

Health Score

client.interface.trigger ("disable", {id: "health_score"})

Account Tier

client.interface.trigger ("disable", {id: "account_tier"})

Renewal Date

client.interface.trigger ("disable", {id: "renewal_date"})

Industry

client.interface.trigger ("disable", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("show", {id: "element_name"})


Enable Field

The method enables a particular field on the Edit company window which you can navigate to from the Company List page.

Copied Copy
1
2
3
4
5
6
client.interface.trigger("enable", {id: "element"}) .then(function(data) { // data - success message }).catch(function(error) { // error - error object });

List of fields that can be enabled.

Field Name Syntax
Description

client.interface.trigger ("enable", {id: "description"})

Notes

client.interface.trigger ("enable", {id: "note"})

Domains for this company

client.interface.trigger ("enable", {id: "domains"})

Health Score

client.interface.trigger ("enable", {id: "health_score"})

Account Tier

client.interface.trigger ("enable", {id: "account_tier"})

Renewal Date

client.interface.trigger ("enable", {id: "renewal_date"})

Industry

client.interface.trigger ("enable", {id: "industry"})

Any Custom Fields
(Corresponding element name: element_name)

client.interface.trigger ("enable", {id: "element_name"})

New Ticket Page

The following methods are available to apps that are installed on the New Ticket page.

Actions supported by the requester field

Action Syntax
Hide

requesterclient.interface.trigger ("hide", {id: "requester"})

Show

requesterclient.interface.trigger ("show", {id: "requester"})

Set Value

requesterclient.interface.trigger ("setValue", {id: "requester", value: "James@freshdesk.com"})

Disable

requesterclient.interface.trigger ("disable", {id: "requester"})

Enable

requesterclient.interface.trigger ("enable", {id: "requester"})

New Email Page

The following methods are available to apps that are installed on the New Email page.

Actions supported by the requester field

Action Syntax
Hide

requesterclient.interface.trigger ("hide", {id: "requester"})

Show

requesterclient.interface.trigger ("show", {id: "requester"})

Set Value

requesterclient.interface.trigger ("setValue", {id: "requester", value: "James@freshdesk.com"})

Disable

requesterclient.interface.trigger ("disable", {id: "requester"})

Enable

requesterclient.interface.trigger ("enable", {id: "requester"})