freshdesk

package
v0.28.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 12 Imported by: 0

README

---
title: "Freshdesk"
lang: "en-US"
draft: false
description: "Learn about how to set up a VDP Freshdesk component https://github.com/instill-ai/instill-core"
---

The Freshdesk component is an application component that allows users to use Freshdesk API to manage tickets, contacts and more..
It can carry out the following tasks:
- [Get Ticket](#get-ticket)
- [Create Ticket](#create-ticket)
- [Reply to Ticket](#reply-to-ticket)
- [Create Ticket Note](#create-ticket-note)
- [Get All Conversations](#get-all-conversations)
- [Get Contact](#get-contact)
- [Create Contact](#create-contact)
- [Get Company](#get-company)
- [Create Company](#create-company)
- [Get All](#get-all)
- [Get Product](#get-product)
- [Get Agent](#get-agent)
- [Get Role](#get-role)
- [Get Group](#get-group)
- [Get Skill](#get-skill)

## Release Stage

`Alpha`

## Configuration

The component definition and tasks are defined in the [definition.json](https://github.com/instill-ai/component/blob/main/application/freshdesk/v0/config/definition.json) and [tasks.json](https://github.com/instill-ai/component/blob/main/application/freshdesk/v0/config/tasks.json) files respectively.

## Setup


In order to communicate with Freshdesk, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's `setup` block, or you can create a **Connection** from
the [**Integration Settings**](https://www.instill.tech/docs/vdp/integration)
page and reference the whole `setup` as `setup:
${connection.<my-connection-id>}`.

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| API key (required) | `api-key` | string | Fill in your Freshdesk API key. To find your key, go to profile settigs and on the right pane, you can get your key once you have completed the captcha verification.  |
| Domain (required) | `domain` | string | Your Freshdesk domain. You can find this by going to Admin -> Search for "Portals" -> Portal URL. Your portal URL will look like "yourdomain.freshdesk.com". Please only input your domain and not the whole URL.  |




## Supported Tasks

### Get Ticket

Get ticket using ID

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_TICKET` |
| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Subject | `subject` | string | Subject of the ticket |
| Description Text | `description-text` | string | Content of the ticket |
| Source | `source` | string | Source of the ticket. Eg: Email |
| Status | `status` | string | Status of the ticket. Eg: Pending |
| Priority | `priority` | string | Priority of the ticket. Eg: Medium |
| Ticket Type (optional) | `ticket-type` | string | Used to categorize the ticket. To check the possible types a ticket can have, please go to Admin -> Ticket Fields |
| Association Type (optional) | `association-type` | string | Used to determine whether a ticket is a parent, child, tracker or related ticket |
| Associated Ticket List (optional) | `associated-ticket-list` | array[integer] | List of associated ticket IDs |
| Tags (optional) | `tags` | array[string] | Tags associated with the ticket. |
| CC Emails (optional) | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the incoming ticket email |
| Forward Emails (optional) | `forward-emails` | array[string] | Email addresses added while forwarding a ticket |
| Reply CC Emails (optional) | `reply-cc-emails` | array[string] | Email addresses added while replying to a ticket |
| Requester ID | `requester-id` | integer | ID of the requester |
| Responder ID (optional) | `responder-id` | integer | ID of the agent to whom the ticket has been assigned. List of agents can be found in Admin -> Agents |
| Company ID (optional) | `company-id` | integer | ID of the company to which this ticket belongs |
| Group ID (optional) | `group-id` | integer | ID of the group to which the ticket has been assigned. List of groups can be found in Admin -> Groups |
| Product ID (optional) | `product-id` | integer | ID of the product to which the ticket is associated. List of products can be found in Admin -> Multiple Products |
| Support Email (optional) | `support-email` | string | Support email address. You can find it in Admin -> Email (under channel). |
| To Emails (optional) | `to-emails` | array[string] | Email addresses to which the ticket was originally sent |
| Spam (optional) | `spam` | boolean | Set to true if the ticket is marked as spam |
| Due By (optional) | `due-by` | string | Timestamp that denotes when the ticket is due to be resolved. In UTC format. |
| Is Escalated (optional) | `is-escalated` | boolean | Set to true if the ticket has been escalated |
| First Response Due By (optional) | `first-response-due-by` | string | Timestamp that denotes when the first response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). |
| First Response Escalated (optional) | `first-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of first response time being breached |
| Next Response Due By (optional) | `next-response-due-by` | string | Timestamp that denotes when the next response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). |
| Next Response Escalated (optional) | `next-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of next response time being breached |
| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. |
| Updated At | `updated-at` | string | Timestamp that denotes when the ticket was last updated. In UTC format. |
| [Attachments](#get-ticket-attachments) (optional) | `attachments` | array[object] | Ticket attachments (cannot be more than 20MB) |
| Sentiment Score (optional) | `sentiment-score` | integer | Freshdesk uses AI to assess the emotional tone and attitude expressed in customer interaction. |
| Initial Sentiment Score (optional) | `initial-sentiment-score` | integer | The initial sentiment score of the ticket |
| Custom Fields (optional) | `custom-fields` | object | Custom fields that the ticket have. Custom fields can be created or modified in Admin -> Ticket Fields |

<details>
<summary> Output Objects in Get Ticket</summary>

<h4 id="get-ticket-attachments">Attachments</h4>

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| Attachment Content Type | `content-type` | string | The type of the file |
| Attachment Name | `name` | string | The name of the file |
| Attachment URL | `url` | string | The URL to the attachment. |
</details>

### Create Ticket

Create ticket

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_TICKET` |
| Requester ID | `requester-id` | integer | ID of the requester. Must be an existing contact. If you fill in this field, you don't need to fill in the email field. Only one of the two fields is required. |
| Email | `email` | string | Email address of the requester. If you fill in the Requester ID above, it will be ignored. Only one of the two fields is required. If no contact exists with this email address in Freshdesk, it will be added as a new contact. |
| Subject (required) | `subject` | string | Subject of the ticket |
| Description (required) | `description` | string | Content of the ticket. You can use HTML tags in the content. |
| Source (required) | `source` | string | Source of the ticket. Eg: Email |
| Status (required) | `status` | string | Status of the ticket. Eg: Pending |
| Priority (required) | `priority` | string | Priority of the ticket. Eg: Medium |
| Ticket Type | `ticket-type` | string | Used to categorize the ticket. To check the possible types a ticket can have, please go to Admin -> Ticket Fields |
| Company ID | `company-id` | integer | ID of the company to which this ticket belongs |
| Product ID | `product-id` | integer | ID of the product to which the ticket is associated. List of products can be found in Admin -> Multiple Products |
| Group ID | `group-id` | integer | ID of the group to which the ticket has been assigned. List of groups can be found in Admin -> Groups |
| Responder ID | `responder-id` | integer | ID of the agent to whom the ticket has been assigned. List of agents can be found in Admin -> Agents |
| Tags | `tags` | array[string] | Tags associated with the ticket. |
| CC Emails | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the incoming ticket email |
| Parent ID | `parent-id` | integer | ID of the parent ticket. Need to be filled out if you want to create a child ticket. |
| Related Ticket IDs | `related-ticket-ids` | array[integer] | List of related ticket IDs. Need to be filled out if you want to create a tracker ticket. |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Ticket ID | `ticket-id` | integer | The ID of the ticket |
| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. |

### Reply to Ticket

Reply to a ticket thread.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_REPLY_TO_TICKET` |
| Body (required) | `body` | string | Content of the reply. Can be in HTML format. |
| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket |
| From Email | `from-email` | string | Email address that is replying to the ticket. You need to have this email address registered in Freshdesk by going to Admin -> Emails. If you leave this field empty, the global support email will be used. |
| User ID | `user-id` | integer | ID of the agent/contact replying to the ticket. If you fill this field using a contact ID, there will be no email sent to the requester. |
| CC Emails | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the outgoing ticket email. |
| BCC Emails | `bcc-emails` | array[string] | Email addresses added in the 'bcc' field of the outgoing ticket email. |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Conversation ID | `conversation-id` | integer | The ID of the note or reply that is associated with the ticket |
| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. |

### Create Ticket Note

Create a private/public note on a ticket thread.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_TICKET_NOTE` |
| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket |
| Body (required) | `body` | string | Content of the note. Can be in HTML format. |
| Notify Emails | `notify-emails` | array[string] | Email addresses of agents/users who need to be notified about this note. The emails need to exist in Freshdesk agent. Agent list can be seen in Admin -> Agents. |
| User ID | `user-id` | integer | ID of the agent/contact who is adding the note. |
| Private | `private` | boolean | Set to true if the note is private |
| Incoming | `incoming` | boolean | Set to true if a particular note should appear as being created from outside (i.e., not through web portal). |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Conversation ID | `conversation-id` | integer | The ID of the note or reply that is associated with the ticket |
| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. |

### Get All Conversations

Get all the conversations in a ticket. (Conversations are replies and notes that are added to a ticket)

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_ALL_CONVERSATIONS` |
| Ticket ID (required) | `ticket-id` | integer | Ticket ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| [Conversations](#get-all-conversations-conversations) | `conversations` | array[object] | An array of conversations |
| Conversations Length | `conversations-length` | integer | Number of conversations |

<details>
<summary> Output Objects in Get All Conversations</summary>

<h4 id="get-all-conversations-conversations">Conversations</h4>

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| BCC Emails | `bcc-emails` | array | Email addresses added in the 'bcc' field of the incoming ticket email |
| Body Text | `body-text` | string | Content of the conversation |
| CC Emails | `cc-emails` | array | Email addresses added in the 'cc' field of the incoming ticket email |
| Conversation ID | `conversation-id` | integer | The ID of the note or reply that is associated with the ticket |
| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. |
| From Email | `from-email` | string | Email address that is replying to the ticket or adding the note. |
| Incoming | `incoming` | boolean | Set to true if a particular conversation should appear as being created from outside |
| Incoming | `private` | boolean | Set to true if a note is private. Can be set only for notes. |
| Support Email | `support-email` | string | Support email address. You can find it in Admin -> Email (under channel). |
| To Emails | `to-emails` | array | Email addresses of agents/users who need to be notified about this conversation |
| Incoming | `user-id` | integer | ID of the agent/contact replying to the ticket. |
</details>

### Get Contact

Get contact using ID

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_CONTACT` |
| Contact ID (required) | `contact-id` | integer | ID of the contact |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the contact |
| Email (optional) | `email` | string | The primary email address of the contact |
| Phone (optional) | `phone` | string | Telephone number of the contact |
| Mobile (optional) | `mobile` | string | Mobile number of the contact |
| Description (optional) | `description` | string | Description of the contact |
| Address (optional) | `address` | string | Address of the contact |
| Job Title (optional) | `job-title` | string | Job title of the contact |
| Tags (optional) | `tags` | array[string] | Tags associated with the contact |
| Language (optional) | `language` | string | Language of the contact |
| Time Zone (optional) | `time-zone` | string | Time zone of the contact |
| Company ID (optional) | `company-id` | integer | ID of the primary company to which the contact belongs |
| Unique External ID (optional) | `unique-external-id` | string | Unique external ID of the contact which be assigned by the user(agent) |
| Twitter ID (optional) | `twitter-id` | string | Twitter ID of the contact |
| View All Tickets (optional) | `view-all-tickets` | boolean | Set to true if the contact can see all the tickets that are associated with the primary company. |
| Deleted (optional) | `deleted` | boolean | Set to true if the contact is deleted |
| Active (optional) | `active` | boolean | Set to true if the contact has been verified |
| Other Emails (optional) | `other-emails` | array[string] | List of other email addresses of the contact |
| [Other Companies](#get-contact-other-companies) (optional) | `other-companies` | array[object] | List of other companies to which the contact belongs |
| Other Phone Numbers (optional) | `other-phone-numbers` | array[string] | List of other phone numbers of the contact |
| Created At (optional) | `created-at` | string | Timestamp that denotes when the contact was created. In UTC format. |
| Updated At (optional) | `updated-at` | string | Timestamp that denotes when the contact was last updated. In UTC format. |
| Custom Fields (optional) | `custom-fields` | object | Custom fields that the contact have. Custom fields can be created or modified in Admin -> Customer Fields |

<details>
<summary> Output Objects in Get Contact</summary>

<h4 id="get-contact-other-companies">Other Companies</h4>

| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| Company ID | `company-id` | integer | ID of the company |
| View All Tickets | `view-all-tickets` | boolean | Set to true if the contact can see all the tickets that are associated with the company. |
</details>

### Create Contact

Create contact

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_CONTACT` |
| Name (required) | `name` | string | Name of the contact |
| Email | `email` | string | The primary email address of the contact |
| Phone | `phone` | string | Telephone number of the contact |
| Mobile | `mobile` | string | Mobile number of the contact |
| Description | `description` | string | Description of the contact |
| Address | `address` | string | Address of the contact |
| Job Title | `job-title` | string | Job title of the contact |
| Tags | `tags` | array[string] | Tags associated with the contact |
| Language | `language` | string | Language of the contact |
| Time Zone | `time-zone` | string | Time zone of the contact |
| Company ID | `company-id` | integer | ID of the primary company to which the contact belongs |
| Unique External ID | `unique-external-id` | string | Unique external ID of the contact which be assigned by the user(agent) |
| Twitter ID | `twitter-id` | string | Twitter ID of the contact |
| View All Tickets | `view-all-tickets` | boolean | Used to determine if the contact can see all the tickets that are associated with the primary company. Note: this property will be ignored if the Company ID is not provided. |
| Other Emails | `other-emails` | array[string] | List of other email addresses of the contact |
| Other Companies | `other-companies` | array[string] | List of other companies to which the contact belongs. Each company should be in the format of company-id;view-all-tickets(boolean "true"/"false") Example: 123;true |
| Other Phone Numbers | `other-phone-numbers` | array[string] | List of other phone numbers of the contact |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Contact ID | `contact-id` | integer | ID of the contact |
| Created At | `created-at` | string | Timestamp that denotes when the contact was created. In UTC format. |

### Get Company

Get company using ID

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_COMPANY` |
| Company ID (required) | `company-id` | integer | ID of the primary company to which the contact belongs |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the company |
| Description (optional) | `description` | string | Description of the company |
| Note (optional) | `note` | string | Note about the company |
| Domains (optional) | `domains` | array[string] | Domains of the company |
| Health Score (optional) | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy" |
| Account Tier (optional) | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise" |
| Renewal Date (optional) | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal |
| Industry (optional) | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. |
| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. |
| Updated At | `updated-at` | string | Timestamp that denotes when the company was last updated. In UTC format. |
| Custom Fields (optional) | `custom-fields` | object | Custom fields that the company have. Custom fields can be created or modified in Admin -> Customer Fields |

### Create Company

Create company

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` |
| Name (required) | `name` | string | Name of the company |
| Description | `description` | string | Description of the company |
| Note | `note` | string | Note about the company |
| Domains | `domains` | array[string] | Domains of the company |
| Health Score | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy" |
| Account Tier | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise" |
| Renewal Date | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal. Enter in the format YYYY-MM-DD. |
| Industry | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Company ID | `company-id` | integer | ID of the company |
| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. |

### Get All

Task to get all the IDs of existing contacts, companies, tickets, products, agents, roles, or skills. Note: products, agents, roles, and skills require admin privileges. Some of these might not work, depending on the plan you are on.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_ALL` |
| Object Type (required) | `object-type` | string | Type of object to get IDs for |
| Length (required) | `length` | integer | The maximum number of IDs allowed is 500. The most recent IDs will be retrieved. |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| IDs | `ids` | array[integer] | List of IDs |
| ID Length | `id-length` | integer | Number of IDs |

### Get Product

Get product using ID. This task will only work if you have admin privileges.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_PRODUCT` |
| Product ID (required) | `product-id` | integer | Product ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the product |
| Description | `description` | string | Description of the product |
| Primary Email | `primary-email` | string | Primary email of the product |
| Created At | `created-at` | string | Timestamp that denotes when the product was created |
| Updated At | `updated-at` | string | Timestamp that denotes when the product was last updated |
| Default | `default` | boolean | Set to true if the product is the default product |

### Get Agent

Get agent using ID. This task will only work if you have admin privileges. Agents are those in your team who will login to Freshdesk.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_AGENT` |
| Agent ID (required) | `agent-id` | integer | Agent ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name (optional) | `name` | string | Name of the agent |
| Active (optional) | `active` | boolean | Set to true if the agent is verified |
| Email | `email` | string | Email of the agent |
| Job Title (optional) | `job-title` | string | Job title of the agent |
| Language (optional) | `language` | string | Language of the agent |
| Mobile (optional) | `mobile` | string | Mobile number of the agent |
| Phone (optional) | `phone` | string | Telephone number of the agent |
| Time Zone (optional) | `time-zone` | string | Time zone of the agent |
| Type | `type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator" |
| Ticket Scope | `ticket-scope` | string | Ticket permission of the agent. Can be "Global Access", "Group Access" or "Restricted Access" |
| Available (optional) | `available` | boolean | Set to true if the agent is in a group that has enabled "Automatic Ticket Assignment" |
| Group IDs (optional) | `group-ids` | array[integer] | Group IDs of the agent |
| Role IDs (optional) | `role-ids` | array[integer] | Role IDs of the agent |
| Skill IDs (optional) | `skill-ids` | array[integer] | Skill IDs of the agent |
| Occasional | `occasional` | boolean | Set to true if the agent is not working full-time |
| Signature (optional) | `signature` | string | Signature of the agent in HTML format |
| Focus Mode (optional) | `focus-mode` | boolean | Set to true if the agent is in focus mode |
| Deactivated (optional) | `deactivated` | boolean | Set to true if the agent is deactivated |
| Created At (optional) | `created-at` | string | Timestamp that denotes when the agent was created |
| Updated At (optional) | `updated-at` | string | Timestamp that denotes when the agent was last updated |

### Get Role

Get role using ID. This task will only work if you have admin privileges. Roles allow agents/collaborators to have different privileges.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_ROLE` |
| Role ID (required) | `role-id` | integer | Role ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the role |
| Description | `description` | string | Description of the role |
| Default | `default` | boolean | Set to true if the role is the default role |
| Agent Type | `agent-type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator" |
| Created At | `created-at` | string | Timestamp that denotes when the role was created |
| Updated At | `updated-at` | string | Timestamp that denotes when the role was last updated |

### Get Group

Get group using ID. This task will only work if you have admin privileges. Agents can be classified into groups such as Customer Support.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_GROUP` |
| Group ID (required) | `group-id` | integer | Group ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the group |
| Description | `description` | string | Description of the group |
| Agent IDs (optional) | `agent-ids` | array[integer] | Agent IDs of the group |
| Auto Ticket Assign | `auto-ticket-assign` | string | The type of automatic ticket assignment set for the group. |
| Escalate To (optional) | `escalate-to` | integer | The ID of the user to whom an escalation email is sent if a ticket is unassigned. |
| Unassigned Duration (optional) | `unassigned-duration` | string | The duration for which a ticket is unassigned before it is escalated. |
| Group Type (optional) | `group-type` | string | Group type. Can be "support_agent_group" or "field_agent_group" |
| Agent Availability Status (optional) | `agent-availability-status` | boolean | The availability status of the agent in the group. Automatically set to true if the group has enabled "Automatic Ticket Assignment". |
| Created At | `created-at` | string | Timestamp that denotes when the group was created |
| Updated At | `updated-at` | string | Timestamp that denotes when the group was last updated |

### Get Skill

Get skill using ID. This task will only work if you have admin privileges. Agents can be assigned skills, and it is possible for tickets to be automatically assigned to agents based on the skills they have.

| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_SKILL` |
| Skill ID (required) | `skill-id` | integer | Skill ID |





| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Name | `name` | string | Name of the skill |
| Rank | `rank` | integer | Rank of the skill |
| Condition Match Type | `condition-match-type` | string | Type of condition match. Can be "all" or "any" |
| Conditions | `conditions` | array | Conditions for the skill |
| Created At | `created-at` | string | Timestamp that denotes when the skill was created |
| Updated At | `updated-at` | string | Timestamp that denotes when the skill was last updated |

Documentation

Index

Constants

View Source
const (
	AgentPath = "agents"
	RolePath  = "roles"
	GroupPath = "groups"
	SkillPath = "admin/skills"
)
View Source
const (
	CompanyPath = "companies"
)
View Source
const (
	ContactPath = "contacts"
)
View Source
const (
	ProductPath = "products"
)
View Source
const (
	TicketPath = "tickets"
)

Variables

This section is empty.

Functions

func Init

func Init(bc base.Component) *component

Init returns an implementation of IComponent that implements the greeting task.

Types

type FreshdeskClient

type FreshdeskClient struct {
	// contains filtered or unexported fields
}

func (*FreshdeskClient) CreateCompany

func (*FreshdeskClient) CreateContact

func (*FreshdeskClient) CreateTicket

func (*FreshdeskClient) CreateTicketNote

func (c *FreshdeskClient) CreateTicketNote(ticketID int64, req *TaskCreateTicketNoteReq) (*TaskCreateTicketNoteResponse, error)

func (*FreshdeskClient) GetAgent

func (c *FreshdeskClient) GetAgent(agentID int64) (*TaskGetAgentResponse, error)

func (*FreshdeskClient) GetAll

func (c *FreshdeskClient) GetAll(objectType string, pagination bool, paginationPath string) ([]TaskGetAllResponse, string, error)

func (*FreshdeskClient) GetAllConversations

func (c *FreshdeskClient) GetAllConversations(ticketID int64, pagination bool, paginationPath string) ([]TaskGetAllConversationsResponse, string, error)

func (*FreshdeskClient) GetCompany

func (c *FreshdeskClient) GetCompany(companyID int64) (*TaskGetCompanyResponse, error)

func (*FreshdeskClient) GetContact

func (c *FreshdeskClient) GetContact(contactID int64) (*TaskGetContactResponse, error)

func (*FreshdeskClient) GetGroup

func (c *FreshdeskClient) GetGroup(groupID int64) (*TaskGetGroupResponse, error)

func (*FreshdeskClient) GetProduct

func (c *FreshdeskClient) GetProduct(productID int64) (*TaskGetProductResponse, error)

func (*FreshdeskClient) GetRole

func (c *FreshdeskClient) GetRole(roleID int64) (*TaskGetRoleResponse, error)

func (*FreshdeskClient) GetSkill

func (c *FreshdeskClient) GetSkill(skillID int64) (*TaskGetSkillResponse, error)

func (*FreshdeskClient) GetTicket

func (c *FreshdeskClient) GetTicket(ticketID int64) (*TaskGetTicketResponse, error)

func (*FreshdeskClient) ReplyToTicket

func (c *FreshdeskClient) ReplyToTicket(ticketID int64, req *TaskReplyToTicketReq) (*TaskReplyToTicketResponse, error)

type FreshdeskInterface

type FreshdeskInterface interface {
	GetTicket(ticketID int64) (*TaskGetTicketResponse, error)
	CreateTicket(req *TaskCreateTicketReq) (*TaskCreateTicketResponse, error)
	ReplyToTicket(ticketID int64, req *TaskReplyToTicketReq) (*TaskReplyToTicketResponse, error)
	CreateTicketNote(ticketID int64, req *TaskCreateTicketNoteReq) (*TaskCreateTicketNoteResponse, error)
	GetContact(contactID int64) (*TaskGetContactResponse, error)
	CreateContact(req *TaskCreateContactReq) (*TaskCreateContactResponse, error)
	GetCompany(companyID int64) (*TaskGetCompanyResponse, error)
	CreateCompany(req *TaskCreateCompanyReq) (*TaskCreateCompanyResponse, error)
	GetAll(objectType string, pagination bool, paginationPath string) ([]TaskGetAllResponse, string, error)
	GetAllConversations(ticketID int64, pagination bool, paginationPath string) ([]TaskGetAllConversationsResponse, string, error)
	GetProduct(productID int64) (*TaskGetProductResponse, error)
	GetAgent(agentID int64) (*TaskGetAgentResponse, error)
	GetRole(roleID int64) (*TaskGetRoleResponse, error)
	GetGroup(groupID int64) (*TaskGetGroupResponse, error)
	GetSkill(skillID int64) (*TaskGetSkillResponse, error)
}

type TaskCreateCompanyInput

type TaskCreateCompanyInput struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Note        string   `json:"note"`
	Domains     []string `json:"domains"`
	HealthScore string   `json:"health-score"`
	AccountTier string   `json:"account-tier"`
	RenewalDate string   `json:"renewal-date"`
	Industry    string   `json:"industry"`
}

type TaskCreateCompanyOutput

type TaskCreateCompanyOutput struct {
	ID        int64  `json:"company-id"`
	CreatedAt string `json:"created-at"`
}

type TaskCreateCompanyReq

type TaskCreateCompanyReq struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Note        string   `json:"note,omitempty"`
	Domains     []string `json:"domains,omitempty"`
	HealthScore string   `json:"health_score,omitempty"`
	AccountTier string   `json:"account_tier,omitempty"`
	RenewalDate string   `json:"renewal_date,omitempty"`
	Industry    string   `json:"industry,omitempty"`
}

type TaskCreateCompanyResponse

type TaskCreateCompanyResponse struct {
	ID        int64  `json:"id"`
	CreatedAt string `json:"created_at"`
}

type TaskCreateContactInput

type TaskCreateContactInput struct {
	Name              string   `json:"name"`
	Email             string   `json:"email"`
	Phone             string   `json:"phone"`
	Mobile            string   `json:"mobile"`
	Description       string   `json:"description"`
	Address           string   `json:"address"`
	JobTitle          string   `json:"job-title"`
	Tags              []string `json:"tags"`
	Language          string   `json:"language"`
	TimeZone          string   `json:"time-zone"`
	CompanyID         int64    `json:"company-id"`
	UniqueExternalID  string   `json:"unique-external-id"`
	TwitterID         string   `json:"twitter-id"`
	ViewAllTickets    bool     `json:"view-all-tickets"`
	OtherEmails       []string `json:"other-emails"`
	OtherCompanies    []string `json:"other-companies"`
	OtherPhoneNumbers []string `json:"other-phone-numbers"`
}

type TaskCreateContactOutput

type TaskCreateContactOutput struct {
	ID        int64  `json:"contact-id"`
	CreatedAt string `json:"created-at"`
}

type TaskCreateContactReq

type TaskCreateContactReq struct {
	Name              string                                 `json:"name"`
	Email             string                                 `json:"email,omitempty"`
	Phone             string                                 `json:"phone,omitempty"`
	Mobile            string                                 `json:"mobile,omitempty"`
	Description       string                                 `json:"description,omitempty"`
	Address           string                                 `json:"address,omitempty"`
	JobTitle          string                                 `json:"job_title,omitempty"`
	Tags              []string                               `json:"tags,omitempty"`
	Language          string                                 `json:"language,omitempty"`
	TimeZone          string                                 `json:"time_zone,omitempty"`
	CompanyID         int64                                  `json:"company_id,omitempty"`
	UniqueExternalID  string                                 `json:"unique_external_id,omitempty"`
	TwitterID         string                                 `json:"twitter_id,omitempty"`
	ViewAllTickets    bool                                   `json:"view_all_tickets,omitempty"`
	OtherEmails       []string                               `json:"other_emails,omitempty"`
	OtherCompanies    []taskCreateContactReqOtherCompany     `json:"other_companies,omitempty"`
	OtherPhoneNumbers []taskCreateContactReqOtherPhoneNumber `json:"other_phone_numbers,omitempty"`
}

type TaskCreateContactResponse

type TaskCreateContactResponse struct {
	ID        int64  `json:"id"`
	CreatedAt string `json:"created_at"`
}

type TaskCreateTicketInput

type TaskCreateTicketInput struct {
	// Only one is needed: requester-id or email
	RequesterID      int64    `json:"requester-id"`
	Email            string   `json:"email"`
	Subject          string   `json:"subject"`
	Description      string   `json:"description"`
	Source           string   `json:"source"`
	Status           string   `json:"status"`
	Priority         string   `json:"priority"`
	Type             string   `json:"ticket-type"`
	CompanyID        int64    `json:"company-id"`
	ProductID        int64    `json:"product-id"`
	GroupID          int64    `json:"group-id"`
	ResponderID      int64    `json:"responder-id"`
	Tags             []string `json:"tags"`
	CCEmails         []string `json:"cc-emails"`
	ParentID         int64    `json:"parent-id"`
	RelatedTicketIDs []int64  `json:"related-ticket-ids"`
}

Create Ticket

type TaskCreateTicketNoteInput

type TaskCreateTicketNoteInput struct {
	TicketID     int64    `json:"ticket-id"`
	Body         string   `json:"body"`
	NotifyEmails []string `json:"notify-emails"`
	UserID       int64    `json:"user-id"`
	Private      bool     `json:"private"`
	Incoming     bool     `json:"incoming"`
}

type TaskCreateTicketNoteOutput

type TaskCreateTicketNoteOutput struct {
	ConversationID int64  `json:"conversation-id"`
	CreatedAt      string `json:"created-at"`
}

type TaskCreateTicketNoteReq

type TaskCreateTicketNoteReq struct {
	Body         string   `json:"body"`
	NotifyEmails []string `json:"notify_emails,omitempty"`
	UserID       int64    `json:"user_id,omitempty"`
	Private      bool     `json:"private"`
	Incoming     bool     `json:"incoming"`
}

type TaskCreateTicketNoteResponse

type TaskCreateTicketNoteResponse struct {
	ConversationID int64  `json:"id"`
	CreatedAt      string `json:"created_at"`
}

type TaskCreateTicketOutput

type TaskCreateTicketOutput struct {
	ID        int64  `json:"ticket-id"`
	CreatedAt string `json:"created-at"`
}

type TaskCreateTicketReq

type TaskCreateTicketReq struct {
	RequesterID      int64    `json:"requester_id,omitempty"`
	Email            string   `json:"email,omitempty"`
	Subject          string   `json:"subject"`
	Description      string   `json:"description"`
	Source           int      `json:"source"`
	Status           int      `json:"status"`
	Priority         int      `json:"priority"`
	Type             string   `json:"type,omitempty"`
	CompanyID        int64    `json:"company_id,omitempty"`
	ProductID        int64    `json:"product_id,omitempty"`
	GroupID          int64    `json:"group_id,omitempty"`
	ResponderID      int64    `json:"responder_id,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	CCEmails         []string `json:"cc_emails,omitempty"`
	ParentID         int64    `json:"parent_id,omitempty"`
	RelatedTicketIDs []int64  `json:"related_ticket_ids,omitempty"`
}

type TaskCreateTicketResponse

type TaskCreateTicketResponse struct {
	ID        int64  `json:"id"`
	CreatedAt string `json:"created_at"`
}

type TaskGetAgentInput

type TaskGetAgentInput struct {
	AgentID int64 `json:"agent-id"`
}

type TaskGetAgentOutput

type TaskGetAgentOutput struct {
	Name        string  `json:"name,omitempty"`
	Active      bool    `json:"active"`
	Email       string  `json:"email"`
	JobTitle    string  `json:"job-title,omitempty"`
	Language    string  `json:"language,omitempty"`
	LastLoginAt string  `json:"last-login-at"`
	Mobile      string  `json:"mobile,omitempty"`
	Phone       string  `json:"phone,omitempty"`
	TimeZone    string  `json:"time-zone,omitempty"`
	Type        string  `json:"type"`
	TicketScope string  `json:"ticket-scope"`
	Available   bool    `json:"available"`
	GroupIDs    []int64 `json:"group-ids"`
	RoleIDs     []int64 `json:"role-ids"`
	SkillIDs    []int64 `json:"skill-ids"`
	Occasional  bool    `json:"occasional"`
	Signature   string  `json:"signature,omitempty"`
	FocusMode   bool    `json:"focus-mode"`
	Deactivated bool    `json:"deactivated"`
	CreatedAt   string  `json:"created-at"`
	UpdatedAt   string  `json:"updated-at"`
}

type TaskGetAgentResponse

type TaskGetAgentResponse struct {
	Contact     taskGetAgentResponseContact `json:"contact"`
	Type        string                      `json:"type"`
	TicketScope int                         `json:"ticket_scope"`
	Available   bool                        `json:"available"`
	GroupIDs    []int64                     `json:"group_ids"`
	RoleIDs     []int64                     `json:"role_ids"`
	SkillIDs    []int64                     `json:"skill_ids"`
	Occasional  bool                        `json:"occasional"`
	Signature   string                      `json:"signature"`
	FocusMode   bool                        `json:"focus_mode"`
	Deactivated bool                        `json:"deactivated"`
	CreatedAt   string                      `json:"created_at"`
	UpdatedAt   string                      `json:"updated_at"`
}

type TaskGetAllConversationsInput

type TaskGetAllConversationsInput struct {
	TicketID int64 `json:"ticket-id"`
}

type TaskGetAllConversationsOutput

type TaskGetAllConversationsOutput struct {
	Conversations       []taskGetAllConversationsOutputConversation `json:"conversations"`
	ConversationsLength int                                         `json:"conversations-length"`
}

type TaskGetAllConversationsResponse

type TaskGetAllConversationsResponse struct {
	BodyText       string   `json:"body_text"`
	ConversationID int64    `json:"id"`
	SupportEmail   string   `json:"support_email"`
	ToEmails       []string `json:"to_emails"`
	FromEmail      string   `json:"from_email"`
	CCEmails       []string `json:"cc_emails"`
	BCCEmails      []string `json:"bcc_emails"`
	Incoming       bool     `json:"incoming"`
	Private        bool     `json:"private"`
	UserID         int64    `json:"user_id"`
	CreatedAt      string   `json:"created_at"`
}

type TaskGetAllInput

type TaskGetAllInput struct {
	ObjectType string `json:"object-type"`
	Length     int    `json:"length"`
}

Task 1: Get All

type TaskGetAllOutput

type TaskGetAllOutput struct {
	IDs      []int64 `json:"ids"`
	IDLength int     `json:"id-length"`
}

type TaskGetAllResponse

type TaskGetAllResponse struct {
	ID int64 `json:"id"`
}

type TaskGetCompanyInput

type TaskGetCompanyInput struct {
	CompanyID int64 `json:"company-id"`
}

type TaskGetCompanyOutput

type TaskGetCompanyOutput struct {
	Name         string                 `json:"name"`
	Description  string                 `json:"description,omitempty"`
	Note         string                 `json:"note,omitempty"`
	Domains      []string               `json:"domains"`
	HealthScore  string                 `json:"health-score,omitempty"`
	AccountTier  string                 `json:"account-tier,omitempty"`
	RenewalDate  string                 `json:"renewal-date,omitempty"`
	Industry     string                 `json:"industry,omitempty"`
	CreatedAt    string                 `json:"created-at,omitempty"`
	UpdatedAt    string                 `json:"updated-at,omitempty"`
	CustomFields map[string]interface{} `json:"custom-fields,omitempty"`
}

type TaskGetCompanyResponse

type TaskGetCompanyResponse struct {
	Name         string                 `json:"name"`
	Description  string                 `json:"description"`
	Note         string                 `json:"note"`
	Domains      []string               `json:"domains"`
	HealthScore  string                 `json:"health_score"`
	AccountTier  string                 `json:"account_tier"`
	RenewalDate  string                 `json:"renewal_date"`
	Industry     string                 `json:"industry"`
	CreatedAt    string                 `json:"created_at"`
	UpdatedAt    string                 `json:"updated_at"`
	CustomFields map[string]interface{} `json:"custom_fields"`
}

type TaskGetContactInput

type TaskGetContactInput struct {
	ContactID int64 `json:"contact-id"`
}

type TaskGetContactOutput

type TaskGetContactOutput struct {
	Name              string                             `json:"name"`
	Email             string                             `json:"email,omitempty"`
	Phone             string                             `json:"phone,omitempty"`
	Mobile            string                             `json:"mobile,omitempty"`
	Description       string                             `json:"description,omitempty"`
	Address           string                             `json:"address,omitempty"`
	JobTitle          string                             `json:"job-title,omitempty"`
	Tags              []string                           `json:"tags"`
	Language          string                             `json:"language,omitempty"`
	TimeZone          string                             `json:"time-zone,omitempty"`
	CompanyID         int64                              `json:"company-id,omitempty"`
	UniqueExternalID  string                             `json:"unique-external-id,omitempty"`
	TwitterID         string                             `json:"twitter-id,omitempty"`
	ViewAllTickets    bool                               `json:"view-all-tickets"`
	Deleted           bool                               `json:"deleted"`
	Active            bool                               `json:"active"`
	OtherEmails       []string                           `json:"other-emails"`
	OtherCompaniesIDs []taskGetContactOutputOtherCompany `json:"other-companies-ids,omitempty"`
	OtherPhoneNumbers []string                           `json:"other-phone-numbers"`
	CreatedAt         string                             `json:"created-at"`
	UpdatedAt         string                             `json:"updated-at"`
	CustomFields      map[string]interface{}             `json:"custom-fields,omitempty"`
}

type TaskGetContactResponse

type TaskGetContactResponse struct {
	Name              string                                   `json:"name"`
	Email             string                                   `json:"email"`
	Phone             string                                   `json:"phone"`
	Mobile            string                                   `json:"mobile"`
	Description       string                                   `json:"description"`
	Address           string                                   `json:"address"`
	JobTitle          string                                   `json:"job_title"`
	Tags              []string                                 `json:"tags"`
	Language          string                                   `json:"language"`
	TimeZone          string                                   `json:"time_zone"`
	CompanyID         int64                                    `json:"company_id"`
	UniqueExternalID  string                                   `json:"unique_external_id"`
	TwitterID         string                                   `json:"twitter_id"`
	ViewAllTickets    bool                                     `json:"view_all_tickets"`
	Deleted           bool                                     `json:"deleted"`
	Active            bool                                     `json:"active"`
	OtherEmails       []string                                 `json:"other_emails"`
	OtherCompanies    []taskGetContactResponseOtherCompany     `json:"other_companies"`
	OtherPhoneNumbers []taskGetContactResponseOtherPhoneNumber `json:"other_phone_numbers"`
	CreatedAt         string                                   `json:"created_at"`
	UpdatedAt         string                                   `json:"updated_at"`
	CustomFields      map[string]interface{}                   `json:"custom_fields"`
}

type TaskGetGroupInput

type TaskGetGroupInput struct {
	GroupID int64 `json:"group-id"`
}

Task 3: Get Group

type TaskGetGroupOutput

type TaskGetGroupOutput struct {
	Name                    string  `json:"name"`
	Description             string  `json:"description"`
	AgentIDs                []int64 `json:"agent-ids"`
	AutoTicketAssign        string  `json:"auto-ticket-assign"`
	EscalateTo              int64   `json:"escalate-to,omitempty"`
	UnassignedDuration      string  `json:"unassigned-duration,omitempty"`
	GroupType               string  `json:"group-type,omitempty"`
	AgentAvailabilityStatus bool    `json:"agent-availability-status"`
	CreatedAt               string  `json:"created-at"`
	UpdatedAt               string  `json:"updated-at"`
}

type TaskGetGroupResponse

type TaskGetGroupResponse struct {
	Name                    string  `json:"name"`
	Description             string  `json:"description"`
	AgentIDs                []int64 `json:"agent_ids"`
	AutoTicketAssign        int     `json:"auto_ticket_assign"`
	EscalateTo              int64   `json:"escalate_to"`
	UnassignedDuration      string  `json:"unassigned_for"`
	GroupType               string  `json:"group_type"`
	AgentAvailabilityStatus bool    `json:"agent_availability_status"`
	CreatedAt               string  `json:"created_at"`
	UpdatedAt               string  `json:"updated_at"`
}

type TaskGetProductInput

type TaskGetProductInput struct {
	ProductID int64 `json:"product-id"`
}

type TaskGetProductOutput

type TaskGetProductOutput struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	PrimaryEmail string `json:"primary-email"`
	CreatedAt    string `json:"created-at"`
	UpdatedAt    string `json:"updated-at"`
	Default      bool   `json:"default"`
}

type TaskGetProductResponse

type TaskGetProductResponse struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	PrimaryEmail string `json:"primary_email"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
	Default      bool   `json:"default"`
}

type TaskGetRoleInput

type TaskGetRoleInput struct {
	RoleID int64 `json:"role-id"`
}

Task 2: Get Role

type TaskGetRoleOutput

type TaskGetRoleOutput struct {
	Description string `json:"description"`
	Name        string `json:"name"`
	Default     bool   `json:"default"`
	CreatedAt   string `json:"created-at"`
	UpdatedAt   string `json:"updated-at"`
	AgentType   string `json:"agent-type"`
}

type TaskGetRoleResponse

type TaskGetRoleResponse struct {
	Description string `json:"description"`
	Name        string `json:"name"`
	Default     bool   `json:"default"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
	AgentType   int    `json:"agent_type"`
}

type TaskGetSkillInput

type TaskGetSkillInput struct {
	SkillID int64 `json:"skill-id"`
}

type TaskGetSkillOutput

type TaskGetSkillOutput struct {
	Name               string                   `json:"name"`
	Rank               int                      `json:"rank"`
	ConditionMatchType string                   `json:"condition-match-type"`
	Conditions         []map[string]interface{} `json:"conditions"`
	CreatedAt          string                   `json:"created-at"`
	UpdatedAt          string                   `json:"updated-at"`
}

type TaskGetSkillResponse

type TaskGetSkillResponse struct {
	Name       string                          `json:"name"`
	Rank       int                             `json:"rank"`
	Conditions []taskGetSkillResponseCondition `json:"conditions"`
	CreatedAt  string                          `json:"created_at"`
	UpdatedAt  string                          `json:"updated_at"`
}

type TaskGetTicketInput

type TaskGetTicketInput struct {
	TicketID int64 `json:"ticket-id"`
}

type TaskGetTicketOutput

type TaskGetTicketOutput struct {
	Subject                string                          `json:"subject"`
	DescriptionText        string                          `json:"description-text"`
	Source                 string                          `json:"source"`
	Status                 string                          `json:"status"`
	Priority               string                          `json:"priority"`
	TicketType             string                          `json:"ticket-type,omitempty"`
	AssociationType        string                          `json:"association-type"`
	AssociatedTicketList   []int                           `json:"associated-ticket-list,omitempty"`
	Tags                   []string                        `json:"tags"`
	CCEmails               []string                        `json:"cc-emails"`
	ForwardEmails          []string                        `json:"forward-emails"`
	ReplyCCEmails          []string                        `json:"reply-cc-emails"`
	RequesterID            int64                           `json:"requester-id"`
	ResponderID            int64                           `json:"responder-id,omitempty"`
	CompanyID              int64                           `json:"company-id,omitempty"`
	GroupID                int64                           `json:"group-id,omitempty"`
	ProductID              int64                           `json:"product-id,omitempty"`
	SupportEmail           string                          `json:"support-email,omitempty"`
	ToEmails               []string                        `json:"to-emails"`
	Spam                   bool                            `json:"spam"`
	DueBy                  string                          `json:"due-by,omitempty"`
	IsEscalated            bool                            `json:"is-escalated"`
	FirstResponseDueBy     string                          `json:"first-response-due-by,omitempty"`
	FirstResponseEscalated bool                            `json:"first-response-escalated"`
	NextResponseDueBy      string                          `json:"next-response-due-by,omitempty"`
	NextResponseEscalated  bool                            `json:"next-response-escalated"`
	CreatedAt              string                          `json:"created-at"`
	UpdatedAt              string                          `json:"updated-at"`
	Attachments            []taskGetTicketOutputAttachment `json:"attachments,omitempty"`
	SentimentScore         int                             `json:"sentiment-score"`
	InitialSentimentScore  int                             `json:"initial-sentiment-score"`
	CustomFields           map[string]interface{}          `json:"custom-fields,omitempty"`
}

type TaskGetTicketResponse

type TaskGetTicketResponse struct {
	Subject                string                          `json:"subject"`
	DescriptionText        string                          `json:"description_text"`
	Source                 int                             `json:"source"`
	Status                 int                             `json:"status"`
	Priority               int                             `json:"priority"`
	TicketType             string                          `json:"type"`
	AssociationType        int                             `json:"association_type"`
	AssociatedTicketList   []int                           `json:"associated_tickets_list"`
	Tags                   []string                        `json:"tags"`
	CCEmails               []string                        `json:"cc_emails"`
	ForwardEmails          []string                        `json:"fwd_emails"`
	ReplyCCEmails          []string                        `json:"reply_cc_emails"`
	RequesterID            int64                           `json:"requester_id"`
	ResponderID            int64                           `json:"responder_id"`
	CompanyID              int64                           `json:"company_id"`
	GroupID                int64                           `json:"group_id"`
	ProductID              int64                           `json:"product_id"`
	SupportEmail           string                          `json:"support_email"`
	ToEmails               []string                        `json:"to_emails"`
	Spam                   bool                            `json:"spam"`
	IsEscalated            bool                            `json:"is_escalated"`
	DueBy                  string                          `json:"due_by"`
	FirstResponseDueBy     string                          `json:"fr_due_by"`
	FirstResponseEscalated bool                            `json:"fr_escalated"`
	NextResponseDueBy      string                          `json:"nr_due_by"`
	NextResponseEscalated  bool                            `json:"nr_escalated"`
	CreatedAt              string                          `json:"created_at"`
	UpdatedAt              string                          `json:"updated_at"`
	Attachments            []taskGetTicketOutputAttachment `json:"attachments"`
	SentimentScore         int                             `json:"sentiment_score"`
	InitialSentimentScore  int                             `json:"initial_sentiment_score"`
	CustomFields           map[string]interface{}          `json:"custom_fields"`
}

type TaskReplyToTicketInput

type TaskReplyToTicketInput struct {
	TicketID  int64    `json:"ticket-id"`
	Body      string   `json:"body"`
	FromEmail string   `json:"from-email"`
	UserID    int64    `json:"user-id"` //user ID can either be the requester or the agent
	CCEmails  []string `json:"cc-emails"`
	BCCEmails []string `json:"bcc-emails"`
}

type TaskReplyToTicketOutput

type TaskReplyToTicketOutput struct {
	ConversationID int64  `json:"conversation-id"`
	CreatedAt      string `json:"created-at"`
}

type TaskReplyToTicketReq

type TaskReplyToTicketReq struct {
	Body      string   `json:"body"`
	FromEmail string   `json:"from_email,omitempty"`
	UserID    int64    `json:"user_id,omitempty"`
	CCEmails  []string `json:"cc_emails,omitempty"`
	BCCEmails []string `json:"bcc_emails,omitempty"`
}

type TaskReplyToTicketResponse

type TaskReplyToTicketResponse struct {
	ConversationID int64  `json:"id"`
	CreatedAt      string `json:"created_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL