# Freshdesk

> Run customer support from workflows with Freshdesk: raise, update, find, merge and reply to tickets, add notes, manage contacts and companies, and search your knowledge base.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/freshdesk

## Actions

### Add note

Add a note to a ticket: private for your team by default, or public for the requester to see.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.
- Note (`body`, text, required): The note. Line breaks are kept.
- Private (`private`, true/false): Only agents see a private note. On by default. Default: `true`.
- Notify (`notify_emails`, list): Agents' email addresses to tell about the note.

**Outputs**

- `conversation` (object): The reply or note

**Example output**

```json
{
  "conversation": {
    "body": "<div>Hi tom, Still Angry</div>",
    "body_text": "Hi tom, Still Angry",
    "cc_emails": [],
    "created_at": "2015-08-24T13:49:37Z",
    "from_email": "",
    "id": "5",
    "incoming": false,
    "kind": "note",
    "private": false,
    "ticket_id": "3",
    "to_emails": [],
    "updated_at": "2015-08-24T13:49:37Z",
    "user_id": "1"
  }
}
```

### Create company

Add a company, so its contacts and their tickets are grouped together.

**Inputs**

- Name (`name`, text, required): The company's name. It must be unique.
- Email domains (`domains`, list): Domains such as acme.com. Contacts with an email address there join the company.
- Description (`description`, text): What the company does.
- Note (`note`, text): A note for your team.
- Health score (`health_score`, text): One of your account's health scores, such as Happy or At risk.
- Account tier (`account_tier`, text): One of your account's tiers, such as Basic, Premium or Enterprise.
- Industry (`industry`, text): One of your account's industries, such as Retail.
- Renewal date (`renewal_date`, date): When their contract renews.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "account_tier": "Premium",
    "created_at": "2014-01-08T09:08:53+05:30",
    "description": "Spaceship Manufacturing Company",
    "domains": [
      "supernova",
      "nova"
    ],
    "health_score": "Happy",
    "id": "8",
    "industry": "",
    "name": "SuperNova",
    "note": "",
    "renewal_date": "2020-12-31",
    "updated_at": "2014-01-08T09:08:53+05:30"
  }
}
```

### Create contact

Add a customer as a contact. Give an email address, a phone number or an external ID with the name.

**Inputs**

- Name (`name`, text, required): Their full name.
- Email (`email`, text): Their main email address.
- Phone (`phone`, text): Phone number.
- Mobile (`mobile`, text): Mobile number.
- Company (`company_id`, text): The company they work for.
- Job title (`job_title`, text): Job title.
- Address (`address`, text): Postal address.
- About (`description`, text): A short description of them.
- External ID (`unique_external_id`, text): Your own id for them, such as their id in your CRM.
- Tags (`tags`, list): Tags to put on the contact.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "address": "",
    "company_id": "23",
    "created_at": "2015-08-28T09:08:16Z",
    "deleted": false,
    "description": "",
    "email": "superman@freshdesk.com",
    "id": "432",
    "job_title": "",
    "language": "en",
    "mobile": "",
    "name": "Super Man",
    "other_emails": [
      "lex@freshdesk.com",
      "louis@freshdesk.com"
    ],
    "phone": "",
    "tags": [],
    "time_zone": "Chennai",
    "unique_external_id": "",
    "updated_at": "2015-08-28T09:08:16Z",
    "verified": false
  }
}
```

### Create ticket

Raise a ticket for a customer, by their email address or contact.

**Inputs**

- Subject (`subject`, text, required): The ticket's subject line.
- Description (`description`, text, required): What the ticket is about. Line breaks are kept.
- Requester email (`requester_email`, text): Who the ticket is for. A new email address becomes a new contact. Fill in this or 'Requester contact'.
- Requester contact (`requester_id`, text): Or the id of an existing contact, from 'Create contact' or 'Find contacts'.
- Requester name (`requester_name`, text): The requester's name, used when a new contact is made.
- Status (`status`, text): Defaults to Open.
- Priority (`priority`, text): Defaults to Low. One of: `1` (Low), `2` (Medium), `3` (High), `4` (Urgent). Default: `1`.
- Channel (`source`, text): Where the request came from. Defaults to Portal. One of: `1` (Email), `2` (Portal), `3` (Phone), `7` (Chat), `9` (Feedback widget). Default: `2`.
- Type (`ticket_type`, text): The kind of request, such as Question or Incident.
- Group (`group_id`, text): The group to route it to.
- Agent (`responder_id`, text): The agent to assign it to.
- Company (`company_id`, text): The requester's company, if they belong to several.
- Tags (`tags`, list): Tags to put on the ticket.
- CC (`cc_emails`, list): Email addresses to copy on the ticket's emails.
- Due by (`due_by`, date and time): When the ticket must be resolved. Leave empty to follow your SLA.
- First response due by (`fr_due_by`, date and time): When the first reply is due. Must be before 'Due by'. Leave empty to follow your SLA.
- Custom fields (`custom_fields`, object): Values for your own ticket fields. Fields left blank are not changed.

**Outputs**

- `ticket` (object): The ticket

**Example output**

```json
{
  "ticket": {
    "cc_emails": [
      "ram@freshdesk.com",
      "diana@freshdesk.com"
    ],
    "company_id": "1",
    "created_at": "2015-07-09T13:08:06Z",
    "custom_fields": {},
    "description": "<div>Some details on the issue ..</div>",
    "description_text": "Some details on the issue ...",
    "due_by": "2015-07-14T13:08:06Z",
    "fr_due_by": "2015-07-10T13:08:06Z",
    "group_id": "",
    "id": "1",
    "is_escalated": false,
    "priority": 1,
    "priority_name": "Low",
    "requester_email": "",
    "requester_id": "129",
    "requester_name": "",
    "responder_id": "",
    "source": 2,
    "source_name": "Portal",
    "spam": false,
    "status": 2,
    "status_name": "Open",
    "subject": "Support needed..",
    "tags": [],
    "type": "Question",
    "updated_at": "2015-07-23T04:41:12Z",
    "url": "https://acme.freshdesk.com/a/tickets/1"
  }
}
```

### Delete company

Delete a company for good. Its contacts stay, no longer linked to it.

**Inputs**

- Company (`company_id`, text, required): Pick a company, or give its id from an earlier step.

**Outputs**

- `company_id` (text): The company deleted
- `deleted` (true/false): Always true

**Example output**

```json
{
  "company_id": "8",
  "deleted": true
}
```

### Delete contact

Delete a contact. Freshdesk keeps it among deleted contacts, where it can be restored.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id, from 'Find contacts', 'Create contact' or a trigger.

**Outputs**

- `contact_id` (text): The contact deleted
- `deleted` (true/false): Always true

**Example output**

```json
{
  "contact_id": "432",
  "deleted": true
}
```

### Delete ticket

Move a ticket to Freshdesk's Trash, where it can be restored.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.

**Outputs**

- `deleted` (true/false): Always true
- `ticket_id` (text): The ticket moved to Trash

**Example output**

```json
{
  "deleted": true,
  "ticket_id": "20"
}
```

### Find contacts

Find contacts by email address, phone, company or state, or those changed since a time.

**Inputs**

- Email (`email`, text): Only the contact with this email address.
- Phone (`phone`, text): Only contacts with this phone number.
- Mobile (`mobile`, text): Only contacts with this mobile number.
- Company (`company_id`, text): Only contacts of this company.
- State (`state`, text): Only verified, unverified, blocked or deleted contacts. Leave empty for all but blocked and deleted ones. One of: `verified`, `unverified`, `blocked`, `deleted`.
- Updated since (`updated_since`, date and time): Only those created or changed at or after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `contacts` (list): The contacts
- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none

**Example output**

```json
{
  "contacts": [
    {
      "address": "",
      "company_id": "23",
      "created_at": "2015-08-28T09:08:16Z",
      "deleted": false,
      "description": "",
      "email": "superman@freshdesk.com",
      "id": "432",
      "job_title": "",
      "language": "en",
      "mobile": "",
      "name": "Super Man",
      "other_emails": [
        "lex@freshdesk.com",
        "louis@freshdesk.com"
      ],
      "phone": "",
      "tags": [],
      "time_zone": "Chennai",
      "unique_external_id": "",
      "updated_at": "2015-08-28T09:08:16Z",
      "verified": false
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": 0
}
```

### Find tickets

Find tickets by status, open or resolved, priority, group, agent, type, tag, creation date or the day they last changed. Each ticket says how many days it has been open. New changes take a few minutes to show.

**Inputs**

- Status (`status`, text): Only tickets with this status.
- Priority (`priority`, text): Only tickets with this priority. One of: `1` (Low), `2` (Medium), `3` (High), `4` (Urgent).
- Group (`group_id`, text): Only tickets in this group.
- Agent (`responder_id`, text): Only tickets assigned to this agent.
- Type (`ticket_type`, text): Only tickets of this type.
- Tag (`tag`, text): Only tickets with this tag.
- Created from (`created_from`, date): Only tickets created on or after this day.
- Created to (`created_to`, date): Only tickets created on or before this day.
- Advanced filter (`query`, text): Freshdesk's own filter language, for anything else, such as cf_region:'EMEA' OR priority:4. It is combined with the other filters filled in here: a ticket has to match all of them and this too.
- Page (`page`, number): Which page of 30 to get, 1 to 10. Use 'next_page' from the step before. From 1 to 10.
- Open or resolved (`status_group`, text): Beta. Only open tickets (Open or Pending) or only resolved ones (Resolved or Closed), so the workflow needs no advanced filter with Freshdesk's status numbers. One of: `open` (Open or Pending), `resolved` (Resolved or Closed).
- Updated from (`updated_from`, date): Beta. Only tickets last changed on or after this day, such as the start of the week, so the workflow needs no advanced filter on updated_at.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none
- `tickets` (list): The matching tickets
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": 0,
  "tickets": [
    {
      "cc_emails": [
        "clark.kent@kryptonspace.com"
      ],
      "company_id": "2",
      "created_at": "2016-02-20T09:16:58Z",
      "created_display": "Feb 20, 2016",
      "custom_fields": {
        "locked": true,
        "sector_no": 7
      },
      "days_open": 12,
      "description": "<div>Sample description</div>",
      "description_text": "",
      "due_by": "2016-02-23T16:00:00Z",
      "fr_due_by": "2016-02-22T17:00:00Z",
      "group_id": "156",
      "id": "47",
      "is_escalated": true,
      "priority": 3,
      "priority_name": "High",
      "requester_email": "",
      "requester_id": "6007738334",
      "requester_name": "",
      "responder_id": "6001263404",
      "source": 2,
      "source_name": "Portal",
      "spam": false,
      "status": 2,
      "status_name": "Open",
      "subject": "Sample Title",
      "tags": [],
      "type": "",
      "updated_at": "2016-02-23T16:14:57Z",
      "url": "https://acme.freshdesk.com/a/tickets/47"
    }
  ],
  "total": 1
}
```

### Get company

Get one company's details.

**Inputs**

- Company (`company_id`, text, required): Pick a company, or give its id from an earlier step.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "account_tier": "Premium",
    "created_at": "2014-01-08T09:08:53+05:30",
    "description": "Spaceship Manufacturing Company",
    "domains": [
      "supernova",
      "nova"
    ],
    "health_score": "Happy",
    "id": "8",
    "industry": "",
    "name": "SuperNova",
    "note": "",
    "renewal_date": "2020-12-31",
    "updated_at": "2014-01-08T09:08:53+05:30"
  }
}
```

### Get contact

Get one contact's details.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id, from 'Find contacts', 'Create contact' or a trigger.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "address": "",
    "company_id": "23",
    "created_at": "2015-08-28T09:08:16Z",
    "deleted": false,
    "description": "",
    "email": "superman@freshdesk.com",
    "id": "432",
    "job_title": "",
    "language": "en",
    "mobile": "",
    "name": "Super Man",
    "other_emails": [
      "lex@freshdesk.com",
      "louis@freshdesk.com"
    ],
    "phone": "",
    "tags": [],
    "time_zone": "Chennai",
    "unique_external_id": "",
    "updated_at": "2015-08-28T09:08:16Z",
    "verified": false
  }
}
```

### Get my agent profile

Get the agent whose API key the connection uses.

**Inputs**: None.

**Outputs**

- `agent` (object): The agent

**Example output**

```json
{
  "agent": {
    "available": true,
    "created_at": "2015-08-28T11:47:58Z",
    "email": "superman@freshdesk.com",
    "group_ids": [],
    "id": "432",
    "job_title": "Journalist",
    "mobile": "",
    "name": "Clark Kent",
    "occasional": false,
    "phone": "",
    "time_zone": "Chennai",
    "type": "support_agent"
  }
}
```

### Get ticket

Get one ticket with its description and the requester's name and email.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.

**Outputs**

- `ticket` (object): The ticket

**Example output**

```json
{
  "ticket": {
    "cc_emails": [
      "user@cc.com"
    ],
    "company_id": "1",
    "created_at": "2015-08-24T11:56:51Z",
    "custom_fields": {
      "category": "Primary"
    },
    "description": "<div>Not given.</div>",
    "description_text": "Not given.",
    "due_by": "2015-08-27T11:30:00Z",
    "fr_due_by": "2015-08-25T11:30:00Z",
    "group_id": "",
    "id": "20",
    "is_escalated": false,
    "priority": 1,
    "priority_name": "Low",
    "requester_email": "test@test.com",
    "requester_id": "1",
    "requester_name": "Rachel",
    "responder_id": "",
    "source": 2,
    "source_name": "Portal",
    "spam": false,
    "status": 2,
    "status_name": "Open",
    "subject": "",
    "tags": [],
    "type": "",
    "updated_at": "2015-08-24T11:59:05Z",
    "url": "https://acme.freshdesk.com/a/tickets/20"
  }
}
```

### List agents

List your support agents. Needs an admin's API key.

**Inputs**

- Email (`email`, text): Only the agent with this email address.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `agents` (list): The agents
- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none

**Example output**

```json
{
  "agents": [
    {
      "available": true,
      "created_at": "2015-08-28T11:47:58Z",
      "email": "superman@freshdesk.com",
      "group_ids": [],
      "id": "432",
      "job_title": "Journalist",
      "mobile": "",
      "name": "Clark Kent",
      "occasional": false,
      "phone": "",
      "time_zone": "Chennai",
      "type": "support_agent"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": 0
}
```

### List companies

List companies, or those changed since a time.

**Inputs**

- Updated since (`updated_since`, date and time): Only those created or changed at or after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `companies` (list): The companies
- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none

**Example output**

```json
{
  "companies": [
    {
      "account_tier": "Premium",
      "created_at": "2014-01-08T09:08:53+05:30",
      "description": "Spaceship Manufacturing Company",
      "domains": [
        "supernova",
        "nova"
      ],
      "health_score": "Happy",
      "id": "8",
      "industry": "",
      "name": "SuperNova",
      "note": "",
      "renewal_date": "2020-12-31",
      "updated_at": "2014-01-08T09:08:53+05:30"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": 0
}
```

### List groups

List the groups tickets are routed to. Needs an admin's API key.

**Inputs**

- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `count` (number): How many are returned
- `groups` (list): The groups
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "created_at": "2014-01-08T07:53:41+05:30",
      "description": "Singers dancers and stand up comedians",
      "id": "1",
      "name": "Entertainers"
    }
  ],
  "has_more": false,
  "next_page": 0
}
```

### List replies and notes

List a ticket's replies and notes, oldest first.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `conversations` (list): The replies and notes
- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none

**Example output**

```json
{
  "conversations": [
    {
      "body": "<div>Please reply as soon as possible.</div>",
      "body_text": "Please reply as soon as possible.",
      "cc_emails": [
        "example@ccemail.com"
      ],
      "created_at": "2015-08-24T11:59:05Z",
      "from_email": "agent2@yourcompany.com",
      "id": "3",
      "incoming": false,
      "kind": "note",
      "private": true,
      "ticket_id": "20",
      "to_emails": [
        "agent1@yourcompany.com"
      ],
      "updated_at": "2015-08-24T11:59:05Z",
      "user_id": "1"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": 0
}
```

### List tickets

List tickets, newest first, for a requester, a company or a view, or those changed since a time.

**Inputs**

- View (`view`, text): Only the tickets in one of Freshdesk's views. One of: `new_and_my_open` (New and my open tickets), `watching` (Tickets I'm watching), `spam`, `deleted` (Deleted (in Trash)).
- Requester contact (`requester_id`, text): Only tickets from this contact (their id).
- Requester email (`requester_email`, text): Only tickets from this email address.
- Company (`company_id`, text): Only tickets of this company.
- Updated since (`updated_since`, date and time): Only tickets changed at or after this time. Without it, Freshdesk lists only tickets created in the last 30 days.
- Order (`sort`, text): Which tickets come first. One of: `newest` (Newest first (default)), `oldest` (Oldest first), `recently_updated` (Recently updated first), `due_soonest` (Due soonest first). Default: `newest`.
- Include descriptions (`include_description`, true/false): Also return each ticket's description. It costs two more of your plan's API calls. Default: `false`.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 30. From 1 to 100.
- Page (`page`, number): Which page to get. Use 'next_page' from the step before. At least 1.

**Outputs**

- `count` (number): How many are returned
- `has_more` (true/false): Whether there is another page
- `next_page` (number): The next page's number, 0 when there is none
- `tickets` (list): The tickets

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": 0,
  "tickets": [
    {
      "cc_emails": [
        "user@cc.com",
        "user2@cc.com"
      ],
      "company_id": "",
      "created_at": "2015-08-17T12:02:50Z",
      "custom_fields": {
        "category": "Default"
      },
      "description": "",
      "description_text": "",
      "due_by": "2015-08-20T11:30:00Z",
      "fr_due_by": "2015-08-18T11:30:00Z",
      "group_id": "2",
      "id": "18",
      "is_escalated": false,
      "priority": 1,
      "priority_name": "Low",
      "requester_email": "",
      "requester_id": "5",
      "requester_name": "",
      "responder_id": "1",
      "source": 2,
      "source_name": "Portal",
      "spam": false,
      "status": 2,
      "status_name": "Open",
      "subject": "Please help",
      "tags": [],
      "type": "Lead",
      "updated_at": "2015-08-17T12:02:51Z",
      "url": "https://acme.freshdesk.com/a/tickets/18"
    }
  ]
}
```

### Merge tickets

Merge tickets about the same issue into one. The others are closed, with a note pointing to it.

**Inputs**

- Keep ticket (`primary_ticket_id`, text, required): The ticket the others are merged into.
- Tickets to merge (`ticket_ids`, list, required): The numbers of the tickets to merge into it.
- Copy their requesters (`convert_recipients_to_cc`, true/false): Add the merged tickets' requesters to the kept ticket's CC. Default: `false`.

**Outputs**

- `merged` (true/false): Always true
- `merged_ticket_ids` (list): The tickets merged into it
- `primary_ticket_id` (text): The ticket kept

**Example output**

```json
{
  "merged": true,
  "merged_ticket_ids": [
    "21",
    "22"
  ],
  "primary_ticket_id": "20"
}
```

### Reply to ticket

Email a reply to the ticket's requester, from your support address.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.
- Reply (`body`, text, required): What to say. Line breaks are kept.
- CC (`cc_emails`, list): Email addresses to copy.
- BCC (`bcc_emails`, list): Email addresses to blind copy.

**Outputs**

- `conversation` (object): The reply or note

**Example output**

```json
{
  "conversation": {
    "body": "<div>We are working on this issue. Will keep you posted.</div>",
    "body_text": "We are working on this issue. Will keep you posted.",
    "cc_emails": [],
    "created_at": "2015-08-24T13:36:42Z",
    "from_email": "support@yourcompany.com",
    "id": "4",
    "incoming": false,
    "kind": "reply",
    "private": false,
    "ticket_id": "141",
    "to_emails": [
      "sample@yourcustomer.com"
    ],
    "updated_at": "2015-08-24T13:36:42Z",
    "user_id": "1"
  }
}
```

### Search knowledge base

Find knowledge base articles that mention a word or phrase.

**Inputs**

- Search for (`term`, text, required): A word or phrase, such as reset password.

**Outputs**

- `articles` (list): The matching articles
- `count` (number): How many are returned

**Example output**

```json
{
  "articles": [
    {
      "category_name": "sample category",
      "created_at": "2016-09-09T02:07:56Z",
      "description_text": "sample description",
      "folder_name": "sample folder",
      "id": "2",
      "status": "published",
      "title": "sample article",
      "updated_at": "2016-09-09T07:07:56Z",
      "url": "https://acme.freshdesk.com/support/solutions/articles/2"
    }
  ],
  "count": 1
}
```

### Update company

Change a company's details. Only the fields filled in change; email domains given replace the old ones.

**Inputs**

- Company (`company_id`, text, required): Pick a company, or give its id from an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it.
- Email domains (`domains`, list): Domains such as acme.com. Contacts with an email address there join the company.
- Description (`description`, text): What the company does.
- Note (`note`, text): A note for your team.
- Health score (`health_score`, text): One of your account's health scores, such as Happy or At risk.
- Account tier (`account_tier`, text): One of your account's tiers, such as Basic, Premium or Enterprise.
- Industry (`industry`, text): One of your account's industries, such as Retail.
- Renewal date (`renewal_date`, date): When their contract renews.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "account_tier": "Premium",
    "created_at": "2014-01-08T09:08:53+05:30",
    "description": "Spaceship Manufacturing Company",
    "domains": [
      "supernova",
      "nova"
    ],
    "health_score": "Happy",
    "id": "8",
    "industry": "",
    "name": "SuperNova",
    "note": "",
    "renewal_date": "2020-12-31",
    "updated_at": "2014-01-08T09:08:53+05:30"
  }
}
```

### Update contact

Change a contact's details. Only the fields filled in change.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id, from 'Find contacts', 'Create contact' or a trigger.
- Name (`name`, text): A new name. Leave empty to keep it.
- Email (`email`, text): Their main email address.
- Phone (`phone`, text): Phone number.
- Mobile (`mobile`, text): Mobile number.
- Company (`company_id`, text): The company they work for.
- Job title (`job_title`, text): Job title.
- Address (`address`, text): Postal address.
- About (`description`, text): A short description of them.
- External ID (`unique_external_id`, text): Your own id for them, such as their id in your CRM.
- Tags to add (`add_tags`, list): Tags to add. The contact's other tags stay.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "address": "",
    "company_id": "23",
    "created_at": "2015-08-28T09:08:16Z",
    "deleted": false,
    "description": "",
    "email": "superman@freshdesk.com",
    "id": "432",
    "job_title": "",
    "language": "en",
    "mobile": "",
    "name": "Super Man",
    "other_emails": [
      "lex@freshdesk.com",
      "louis@freshdesk.com"
    ],
    "phone": "",
    "tags": [],
    "time_zone": "Chennai",
    "unique_external_id": "",
    "updated_at": "2015-08-28T09:08:16Z",
    "verified": false
  }
}
```

### Update ticket

Change a ticket's status, priority, assignment, type, tags or other fields. Only the fields filled in change.

**Inputs**

- Ticket (`ticket_id`, text, required): The ticket's number, from a trigger, 'Create ticket' or a list step. Its page address works too.
- Subject (`subject`, text): A new subject. Leave empty to keep it.
- Description (`description`, text): A new description. Leave empty to keep it.
- Status (`status`, text): A new status, such as Resolved.
- Priority (`priority`, text): A new priority. One of: `1` (Low), `2` (Medium), `3` (High), `4` (Urgent).
- Type (`ticket_type`, text): A new type.
- Group (`group_id`, text): Move it to this group.
- Agent (`responder_id`, text): Assign it to this agent.
- Company (`company_id`, text): Change the company it belongs to.
- Tags to add (`add_tags`, list): Tags to add. The ticket's other tags stay.
- Due by (`due_by`, date and time): When the ticket must be resolved. Leave empty to follow your SLA.
- First response due by (`fr_due_by`, date and time): When the first reply is due. Must be before 'Due by'. Leave empty to follow your SLA.
- Custom fields (`custom_fields`, object): Values for your own ticket fields. Fields left blank are not changed.

**Outputs**

- `ticket` (object): The ticket

**Example output**

```json
{
  "ticket": {
    "cc_emails": [
      "user@cc.com"
    ],
    "company_id": "1",
    "created_at": "2015-08-24T11:56:51Z",
    "custom_fields": {
      "category": "Primary"
    },
    "description": "<div>Not given.</div>",
    "description_text": "Not given.",
    "due_by": "2015-08-27T11:30:00Z",
    "fr_due_by": "2015-08-25T11:30:00Z",
    "group_id": "",
    "id": "20",
    "is_escalated": false,
    "priority": 1,
    "priority_name": "Low",
    "requester_email": "test@test.com",
    "requester_id": "1",
    "requester_name": "Rachel",
    "responder_id": "",
    "source": 2,
    "source_name": "Portal",
    "spam": false,
    "status": 4,
    "status_name": "Resolved",
    "subject": "",
    "tags": [],
    "type": "",
    "updated_at": "2015-08-24T11:59:05Z",
    "url": "https://acme.freshdesk.com/a/tickets/20"
  }
}
```
