You can use data methods to retrieve information about different objects on a page. The data methods are available in the following locations:
Global Methods
You can use data methods to retrieve the following objects, in all locations.
loggedInUser
Returns information of an agent who is logged into the Freshdesk UI.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("loggedInUser").then ( function(data) { // success operation // "data" is {loggedInUser: {‘available’: “true”, ... }} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | { "loggedInUser" : { "available": false, "available_since": "2017-04-18T05:27:05.000Z", "abilities":["manage_canned_responses","view_admin",.......], "contact": { "active": true, "avatar": null, "email": "rachel @freshdesk.com", "id": "6", "job_title": "Investigator", "language": "en", "mobile": null, "name": "Rachel", "phone": null, "time_zone": "chennai" }, "created_at": "2017-03-06T07:53:08.000Z", "group_ids": [], "id": 6, "occasional": false, "role_ids": [], "signature": "<div dir="ltr"><p>rachel</p></div>", "ticket_scope": 1, "updated_at": "2017-05-10T05:56:20.000Z" } } |
Attributes of the loggedInUser object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
available | boolean | If an agent is in a group that has enabled Automatic Ticket Assignment, this attribute will be set to true if the agent is accepting new tickets. |
available_since | datetime | Timestamp (UTC format, YYYY-MM-DDTHH:MM:SSZ) indicating when an agent is available or unavailable depending on the value of the available attribute. |
abilities | array of strings | Abilities associated with the agent. |
contact | object | A customer or potential customer who has raised a support ticket through any channel. |
created_at | datetime | The contact creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
group_ids | array of strings | Group IDs associated with the agent. |
id | number | User ID of the agent. |
occasional | boolean | Set to true if this is an occasional agent (false denotes full-time). |
role_ids | array of strings | Role IDs associated with the agent. |
signature | string | Signature of the agent in HTML format. |
ticket_scope | number | Ticket permission of the agent: Global Access = 1 Group Access = 2 Restricted Access = 3 Logged in agents cannot update their ticket_scope. |
updated_at | datetime | Agent updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Attributes of the contact object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
active | boolean | Set to true if the contact has been verified. |
avatar | object | Avatar of the contact. |
created_at | datetime | Contact creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
string | Primary email address of the contact. If you want to associate additional email(s) with the contact, use the other_emails attribute. | |
id | number | ID of the contact. |
job_title | string | Job title of the contact. |
language | string | Language of the contact. |
mobile | string | Mobile number of the contact. |
name | string | Name of the contact. |
phone | string | Telephone number of the contact. |
time_zone | string | Time zone in which the contact resides. |
Attributes of the avatar object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
attachment_url | string | Avatar URL. |
content_type | string | Content type of the avatar - the supported file types are .jpg, .jpeg, .jpe, and .png. |
created_at | datetime | Avatar creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
id | number | Unique ID of the avatar. |
name | string | Name of the avatar. |
size | number | Maximum file size is 5 MB. |
thumb_url | string | Avatar’s thumbnail URL. |
updated_at | datetime | Avatar updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
domainName
Returns the domain name of the business account that uses Freshdesk. As Freshdesk v2 APIs do not support custom CNAMEs, we recommend that you use this method to obtain the Freshdesk domain name and to make calls.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("domainName").then ( function(data) { // success operation // "data" is {domainName: "sample.freshdesk.com"} }, function(error) { // failure operation } ); |
1 | https://sample.freshdesk.com |
Data returned by the domainName object
DATA TYPE | DESCRIPTION |
---|---|
string | Domain name assigned by Freshdesk, for a business account. |
Ticket Details Page
You can use data methods to retrieve the following objects:
ticket
Returns details of a ticket.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("ticket").then ( function(data) { // success output // data is {ticket: {"subject": "support needed for..",..}} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | { "ticket": { "attachments": [], "cc_emails": [], "company_id": 1, "created_at": "2017-04-12T06:05:56.000Z", "custom_fields": [{ "custom_number": null, "custom_line1": " " }], "description": "<div>Some details on the issue ..</div>", "description_text": "Some details on the issue ...", "due_by": "2017-04-15T06:05:56.000Z", "email_config_id": 3, "fr_due_by": "2017-04-13T06:05:56.000Z", "fr_escalated": true, "fwd_emails ": ["ram@freshdesk.com", "diana@freshdesk.com"], "group_id": null, "id": 25, "is_escalated": true, "priority": 1, "priority_type": "Low", "product_id": null, "reply_cc_emails": [], "requester_id": 12, "responder_id": null, "source": 1, "source_type": "email", "spam ": false, "stats": { "agent_responded_at": null, "closed_at": "2017-04-19T08:39:41.000Z", "first_responded_at": null, "pending_since": null, "requester_responded_at": null, "resolved_at": "2017-04-19T08:39:41.000Z", "status_updated_at": "2017-04-19T08:39:41.000Z" }, "status": 5, "status_type": " ", "subject": "Requesting refund", "survey_result": null, "tags": [], "to_emails": [], "type": null, "updated_at": "2017-04-19T08:39:41.000Z" } } |
Attributes of the ticket object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
attachments | array of objects | Ticket attachments. |
cc_emails | array of strings | Email address added in the 'cc' field of the incoming ticket email. |
company_id | number | ID of the company to which this ticket belongs. |
created_at | datetime | Ticket creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
custom_fields | object | Key value pairs containing the names and values of custom fields. |
description | string | HTML content of the ticket. |
description_text | string | Content of the ticket in plain text. |
due_by | datetime | Timestamp (in UTC format, YYYY-MM-DDTHH:MM:SSZ) indicating when the ticket is due to be resolved. |
email_config_id | number | ID of email config which is used for this ticket. |
fr_due_by | datetime | Timestamp (in UTC format, YYYY-MM-DDTHH:MM:SSZ) indicating when the first response is due. |
fr_escalated | boolean | Set to true if the ticket has been escalated as a result of the first response time being breached. |
fwd_emails | array of strings | Email address(es) added while forwarding a ticket. |
group_id | number | ID of the group to which the ticket has been assigned. |
id | number | ID of the ticket. |
is_escalated | boolean | Set to true if the ticket has been escalated for any reason. |
priority | number | Ticket priority value. |
priority_label | string | Ticket priority text. |
product_id | number | ID of the product to which the ticket is associated. |
reply_cc_emails | array of strings | Email address added while replying to a ticket. |
requester_id | number | User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email. |
responder_id | number | ID of the agent to whom the ticket has been assigned. |
source | number | The channel through which the ticket was created. This field contains the source value. |
source_label | string | This field contains the source text. |
spam | boolean | Set to true if the ticket has been marked as spam. |
stats | object | The stats objects contain fields listed in this table. |
status | number | Ticket status value. |
status_label | string | Ticket status text. |
subject | string | Subject of the ticket. |
survey_result | object | Contains survey information. |
tags | array of strings | Tags that have been associated with the ticket. |
to_emails | array of strings | Email addresses to which the ticket was originally sent. |
type | string | This field categorizes the ticket according to the different kinds of issues your support team deals with. |
updated_at | datetime | Ticket updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Tickets use certain numbers to denote source, status, and priority. These numbers and their values are listed.
Source | Value |
---|---|
1 | |
Portal | 2 |
Phone | 3 |
Forum | 4 |
5 | |
6 | |
Chat | 7 |
Feedback_widget | 9 |
Outbound_email | 10 |
Ecommerce | 11 |
Status | Value |
---|---|
Open | 2 |
Pending | 3 |
Resolved | 4 |
Closed | 5 |
Waiting on Customer | 6 |
Waiting on Third Party | 7 |
Priority | Value |
---|---|
Low | 1 |
Medium | 2 |
High | 3 |
Urgent | 4 |
Attributes of the attachments object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
attachment_url | string | URL of the attachment. |
content_type | string | Information on the type of the attachment, for example - image/png, text, zip, and so on. |
created_at | datetime | Attachment file creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
id | number | ID of the attachment. |
name | string | Attachment file name. |
size | number | Attached file size. |
updated_at | datetime | Attachment updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Attributes of the stats object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
agent_responded_at | datetime | Agent response timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
closed_at | datetime | Ticket closed timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
first_responded_at | datetime | Agent's first response timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
pending_since | datetime | Time from which the ticket is pending. |
requester_responded_at | datetime | Requester response timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
resolved_at | datetime | Ticket resolution timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
status_updated_at | datetime | Ticket status updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Attributes of the survey_result object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
rating | object | This object contains the default_questionfield which has the default rating for the survey in case of both custom and classic survey. |
survey_id | number | Survey ID of the satisfaction rating. |
contact
Returns details of the contact.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("contact").then ( function(data) { //Success output //data: {contact: {"active": true, ...}} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | { "contact": { "active": true, "address": "221 B, Baker Street, London.", "avatar": [{ "attachment_url": "<AVATAR_URL>", "content_type": "application/octet-stream", "created_at": "2015-08-28T10:27:58Z", "id": 9, "name": "lantern.png", "size": 13036, "thumb_url": "<THUMB_URL>", "updated_at": "2017-04-11T10:01:23Z" }], "description": "requesting refund", "email": "rachel @freshdesk.com", "id": 12, "is_agent": false, "job_title": "Investigator", "language": "en", "mobile": "999919191999999999", "name": "Rachel", "other_companies": [], "other_emails": ["Zoeybarn@freshdesk.com", "saul@freshdesk.com"], "phone": "", "tags": ["marketing", "sales"], "time_zone": "", "twitter_id": "1Ac345", "view_all_tickets": true } } |
Attributes of the contact object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
active | boolean | Set to true if the contact has been verified. |
address | string | Address of the contact. |
avatar | object | Avatar of the contact. |
description | string | A short description of the contact. |
string | Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute. | |
id | number | ID of the contact. |
is_agent | boolean | Set to true if the contact is an agent. |
job_title | string | Job title of the contact. |
language | string | Language of the contact. |
mobile | string | Mobile number of the contact. |
name | string | Name of the contact. |
other_companies | array of objects | Additional companies associated with the contact. |
other_emails | array of strings | Additional emails associated with the contact. |
phone | string | Telephone number of the contact. |
tags | array of strings | Tags associated with this contact. |
time_zone | string | Time zone in which the contact resides. |
twitter_id | string | Twitter ID of the contact. |
view_all_tickets | boolean | Set to true if the contact can see all tickets associated with the company to which the contact belongs. |
Note: When an unverified contact creates a ticket, the following attributes are not displayed: address, company_id, created_at, custom_fields, description, language, time_zone, updated_at.
Attributes of the avatar object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
attachment_url | string | Avatar URL. |
content_type | string | Content type of the Avatar, the supported file types are .jpg, .jpeg, .jpe, and .png. |
created_at | datetime | Avatar creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
id | number | ID of the avatar. |
name | string | Name of the avatar. |
size | number | Maximum file size is 5 MB. |
thumb_url | string | Avatar’s thumbnail URL. |
updated_at | datetime | Avatar updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Attributes of the other_companies object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
id | number | ID of the associated company to which the contact belongs. |
avatar | object | Avatar of the company. |
name | string | Name of the associate company. |
view_all_tickets | boolean | Set to true if the contact can see all tickets associated with the company to which the contact belongs. |
email_config
Returns a list of email configurations for a user.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("email_config").then ( function(data) { //Success output //data is {email_config : [{ }]} }, function(error) { // failure operation } ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | { "email_config": [ { "id":"43000026147", "replyEmail":"support@winterwolf.freshdesk.com", "name":"winterwolf", "toEmail":"support@winterwolf.freshdesk.com", "primaryRole":true, "groupId":3, "productId":6 }, { "id":"42000026147", "replyEmail":"support2@winterwolf.freshdesk.com", "name":"winterwolf2", "toEmail":"support2@winterwolf.freshdesk.com", "primaryRole":false, "groupId":2, "productId":4 }, { "id":"42000026148", "replyEmail":"support3@winterwolf.freshdesk.com", "name":"winterwolf3", "toEmail":"support3@winterwolf.freshdesk.com", "primaryRole":false, "groupId":7, "productId":9 } ] } |
Note: The above list is limited to 100 email configurations only.
Attributes of the email_config object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
id | number | ID of the email_config object. |
replyEmail | string | Email address used when replying to an email. |
name | string | Name of the email in Admin -> Email Settings. |
toEmail | string | Forwarding email address of the email_config object. |
primaryRole | boolean | Set to true if email in the email_config object is marked as primary in Admin -> Email Settings. |
groupId | number | ID of the group to which the email_config object has been assigned. |
productId | number | ID of the product to which the ticket is associated. |
Consider a use case where an admin wants to control the list of email configurations available to each agent. In this case, you can retrieve the email configurations and filter them by using the following code.
Copied Copy1 2 3 4 5 6 7 8 9 10 11 12 13 | client.data.get("email_config").then ( function(data) { //Success output //data is {email_config : [{ }]} // now setValue method can be called to set the //filtered activeEmailConfigs like below client.interface.trigger("setValue", {id: "activeEmailConfig", value: ["42000026147", "42000026147"]}); // where value array contains the list of filtered email config object ids }, function(error) { // failure operation } ); |
Note: You have to send an array of filtered email configuration IDs that are present in the initial email configuration list received from the data method call. Email configuration IDs that are not present in the initial response are omitted. If none of the email configuration IDs being sent with setValue method call are present in the original email configuration list, then the email configuration list in Freshdesk UI will not be updated.
Once the email configurations are filtered and sent to Freshdesk, the app can use the existing setValue method to update the from email address in the Ticket Details or New Email page as shown.
Copied Copy1 | client.interface.trigger("setValue", {id: "from", value: "rachel@freshdesk.com"}) |
requester
Returns details of the requester.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("requester").then ( function(data) { //Success output //data: {requester: {"active": true, ...}} }, function(error) { // failure operation } ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | { "requester": { "active": true, "address": "221 B, Baker Street, London.", "avatar": [{ "attachment_url": "<AVATAR_URL>", "content_type": "application/octet-stream", "created_at": "2015-08-28T10:27:58Z", "id": 9, "name": "lantern.png", "size": 13036, "thumb_url": "<THUMB_URL>", "updated_at": "2017-04-11T10:01:23Z" }], "created_at": "2017-03-21T09:29:28.000Z", "description": "requesting refund", "email": "rachel @freshdesk.com", "id": 12, "is_agent": false, "job_title": "Investigator", "language": "en", "mobile": "999919191999999999", "name": "Rachel", "other_companies": [], "other_emails": ["Zoeybarn@freshdesk.com", "saul@freshdesk.com"], "phone": "", "tags": ["marketing", "sales"], "time_zone": "", "twitter_id": "1Ac345", "updated_at": "2017 - 04 - 12 T06: 04: 52.000 Z", "view_all_tickets": true } } |
Both contact and requester object return the same payload. To view the list of attributes, see the contact table.
company
Returns details of the company.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("company").then ( function(data) { //Success output //data: {company: {"name": "supernova", ...}} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | { "company": { "avatar": [{ "attachment_url": "<AVATAR_URL>", "content_type": "application/octet-stream", "created_at": "2015-08-28T10:27:58Z", "id": 9, "name": "lantern.png", "size": 13036, "thumb_url": "<THUMB_URL>", "updated_at": "2017-04-11T10:01:23Z" }], "id": 12, "name": "Acme Corporation", "view_all_tickets": false } } |
Attributes of the company object.
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
name | string | Name of the company. |
avatar | object | Avatar of the company. |
view_all_tickets | boolean | Set to true if the contact can see all tickets associated with the company to which the contact belongs. |
id | number | ID of the company. |
group
Returns details of the agent group.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("group").then ( function(data) { //Success output //data: {group: {"id": 2, ...}} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 | { "group": { "agent_ids": [6, 8], "id": 7, "name": "Product Management" } } |
Attributes of the group object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
agent_ids | array of numbers | Array of agent user IDs separated by commas. |
id | number | ID of the group. |
name | string | Name of the group. |
options
Returns a list of values from a drop-down field on a page. For both custom and default drop-down fields, we can get values by adding the suffix '_options' to the field name. This returns an array of the field values.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("status_options").then ( function(data) { //Success output //data: {status_options: ["open","resolved","closed","pending"]} }, function(error) { // failure operation } ); |
Note: You can get the field values available on that page only.
Supported fields and their syntax
Field Name | Syntax |
---|---|
Status | client.data.get("status_options") |
Priority | client.data.get("priority_options") |
Type | client.data.get("ticket_type_options") |
Custom Field | client.data.get("customfield_options") |
time_entry
Returns the time entry details of an agent.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("time_entry").then ( function(data) { //Success output //data: {"time_entry": {"time_entries": [{ ...}] }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | { "time_entry": { "time_entries": [{ "billable": true, "note": "", "id": 48000097025, "timer_running": false, "agent_id": 48000013666, "ticket_id": 20, "company_id": 48000819888, "time_spent": 2, "executed_at": "2019-11-07T18:30:00Z", "start_time": "2019-11-07T19:06:39Z", "created_at": "2019-11-07T19:06:39Z", "updated_at": "2019-11-07T19:06:41Z" }] } } |
Attributes of the time_entry object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
agent_id | number | ID of the agent associated with this time entry. |
billable | boolean | Set to true if the time entry is billable. |
company_id | number | ID of the company. |
created_at | datetime | Time entry creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
executed_at | datetime | Time entry execution timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
id | number | ID of the timer. |
note | string | Description of the time entry. |
start_time | datetime | Time at which the entry is invoked (in UTC format, YYYY-MM-DDTHH:MM:SSZ). |
ticket_id | number | ID of the ticket associated with this time entry. |
time_spent | number | Amount of time spent. |
timer_running | boolean | Set to true if the timer is currently running. |
updated_at | datetime | Time entry updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
New Ticket Page
You can use data methods to retrieve the options object.
Contact Details Page
You can use data methods to retrieve the following objects:
contact
Returns details of the contact.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("contact").then ( function(data) { //Success output //data: {contact: {"active": true, ...}} }, function(error) { // failure operation } ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | { "contact": { "active": true, "address": "221 B, Baker Street, London.", "avatar": [{ "attachment_url": "<AVATAR_URL>", "content_type": "application/octet-stream", "created_at": "2015-08-28T10:27:58Z", "id": 9, "name": "lantern.png", "size": 13036, "thumb_url": "<THUMB_URL>", "updated_at": "2017-04-11T10:01:23Z" }], "created_at": "2017-03-21T09:29:28.000Z", "custom_fields": null, "description": "requesting refund", "email": "rachel @freshdesk.com", "id": 12, "is_agent": false, "job_title": "Investigator", "language": "en", "mobile": "999919191999999999", "name": "Rachel", "other_companies": [], "other_emails": ["Zoeybarn@freshdesk.com", "saul@freshdesk.com"], "phone": "", "tags": ["marketing", "sales"], "time_zone": "", "twitter_id": "1Ac345", "updated_at": "2017-04-12T06:04:52.000Z", "view_all_tickets": true } } |
Attributes of the contact object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
active | boolean | Set to true if the contact has been verified. |
address | string | Address of the contact. |
avatar | object | Avatar of the contact. |
company_id | number | ID of the primary company to which this contact belongs. |
created_at | datetime | Contact creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
custom_fields | object | Key value pair containing the name and value of the custom fields. |
description | string | A short description of the contact. |
string | Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute. | |
id | number | ID of the contact. |
is_agent | boolean | Set to true if the contact is an agent. |
job_title | string | Job title of the contact. |
language | string | Language of the contact. |
mobile | string | Mobile number of the contact. |
name | string | Name of the contact. |
other_companies | array of objects | Additional companies associated with the contact. |
other_emails | array of strings | Additional emails associated with the contact. |
phone | string | Telephone number of the contact. |
tags | array of strings | Tags associated with this contact. |
time_zone | string | Time zone in which the contact resides. |
twitter_id | string | Twitter ID of the contact. |
updated_at | datetime | Contact updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
view_all_tickets | boolean | Set to true if the contact can see all tickets that are associated with the company to which he belongs. |
Attributes of the avatar object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
attachment_url | string | Avatar URL. |
content_type | string | Content type of the Avatar, the supported file types are .jpg, .jpeg, .jpe, and .png. |
created_at | datetime | Avatar creation timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
id | number | ID of the avatar. |
name | string | Name of the avatar. |
size | number | Maximum file size is 5 MB. |
thumb_url | string | Avatar’s thumbnail URL. |
updated_at | datetime | Avatar updated timestamp in UTC format, YYYY-MM-DDTHH:MM:SSZ. |
Attributes of theother_companies object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
id | number | ID of the primary company to which this contact belongs. |
name | string | Name of the company. |
view_all_tickets | boolean | Set to true if the contact can see all tickets that are associated with the company to which he belongs. |
company
Returns details of the company.
Copied Copy1 2 3 4 5 6 7 8 9 | client.data.get("company").then ( function(data) { //Success output //data: {company: {"name": "Acme Corporation", ...}} }, function(error) { // failure operation } ); |
Sample Payload
1 2 3 4 5 6 | { "company": { "id": 12, "name": "Acme Corporation" } } |
Attributes of the company object
ATTRIBUTE | DATA TYPE | DESCRIPTION |
---|---|---|
id | number | ID of the company. |
name | string | Name of the company. |