Documentation
¶
Index ¶
- Constants
- func GetAgentTicketURL(domain string, tid int64) string
- func GetHelpdeskAttachmentURL(domain string, aid int64) string
- func GetSolutionArticleURL(domain string, aid int64) string
- type Agent
- type AgentCreate
- type AgentState
- type AgentTicketScope
- type AgentUpdate
- type Article
- type ArticleCreate
- type ArticleEx
- type ArticleHierarchyData
- type ArticleHierarchyItem
- type ArticleHierarchyType
- type ArticleSeoData
- type ArticleStatus
- type ArticleUpdate
- type Attachment
- type Attachments
- type AutoTicketAssign
- type AutomationAction
- type AutomationActionType
- type AutomationCondition
- type AutomationEvent
- type AutomationMatchType
- type AutomationOperator
- type AutomationPerformer
- type AutomationPerformerType
- type AutomationProperty
- type AutomationPushTo
- type AutomationResource
- type AutomationRule
- type AutomationRuleCreate
- type AutomationRuleUpdate
- type AutomationRules
- type AutomationType
- type Avatar
- type Category
- type CategoryCreate
- type CategoryUpdate
- type Client
- func (c *Client) AddTicketWatcher(ctx context.Context, tid, uid int64) error
- func (c *Client) BulkDeleteTickets(ctx context.Context, tids []int64) (string, error)
- func (c *Client) BulkUnwatchTickets(ctx context.Context, tids []int64, uid int64) error
- func (c *Client) BulkUpdateTickets(ctx context.Context, tids []int64, properties *TicketProperties) (string, error)
- func (c *Client) BulkWatchTickets(ctx context.Context, tids []int64, uid int64) error
- func (c *Client) CreateAgent(ctx context.Context, agent *AgentCreate) (*Agent, error)
- func (c *Client) CreateArticle(ctx context.Context, fid int64, article *ArticleCreate) (*Article, error)
- func (c *Client) CreateArticleTranslated(ctx context.Context, aid int64, lang string, article *ArticleCreate) (*Article, error)
- func (c *Client) CreateAutomationRule(ctx context.Context, aType AutomationType, rule *AutomationRuleCreate) (*AutomationRule, error)
- func (c *Client) CreateCategory(ctx context.Context, category *CategoryCreate) (*Category, error)
- func (c *Client) CreateCategoryTranslated(ctx context.Context, cid int64, lang string, category *CategoryCreate) (*Category, error)
- func (c *Client) CreateCompany(ctx context.Context, company *CompanyCreate) (*Company, error)
- func (c *Client) CreateCompanyField(ctx context.Context, cf *CompanyFieldCreate) (*CompanyField, error)
- func (c *Client) CreateContact(ctx context.Context, contact *ContactCreate) (*Contact, error)
- func (c *Client) CreateContactField(ctx context.Context, cf *ContactFieldCreate) (*ContactField, error)
- func (c *Client) CreateFolder(ctx context.Context, cid int64, folder *FolderCreate) (*Folder, error)
- func (c *Client) CreateFolderTranslated(ctx context.Context, fid int64, lang string, folder *FolderCreate) (*Folder, error)
- func (c *Client) CreateGroup(ctx context.Context, group *GroupCreate) (*Group, error)
- func (c *Client) CreateNote(ctx context.Context, tid int64, note *NoteCreate) (*Note, error)
- func (c *Client) CreateOutboundEmail(ctx context.Context, ticket *OutboundEmail) (*Ticket, error)
- func (c *Client) CreateReply(ctx context.Context, tid int64, reply *ReplyCreate) (*Reply, error)
- func (c *Client) CreateTicket(ctx context.Context, ticket *TicketCreate) (*Ticket, error)
- func (c *Client) CreateTicketField(ctx context.Context, tf *TicketFieldCreate) (*TicketField, error)
- func (c *Client) CreateTimeEntry(ctx context.Context, tid int64, te *TimeEntryCreate) (*TimeEntry, error)
- func (c *Client) DeleteAgent(ctx context.Context, aid int64) error
- func (c *Client) DeleteArticle(ctx context.Context, aid int64) error
- func (c *Client) DeleteAttachment(ctx context.Context, aid int64) error
- func (c *Client) DeleteAutomationRule(ctx context.Context, aType AutomationType, rid int64) error
- func (c *Client) DeleteCategory(ctx context.Context, cid int64) error
- func (c *Client) DeleteCompany(ctx context.Context, cid int64) error
- func (c *Client) DeleteCompanyField(ctx context.Context, fid int64) error
- func (c *Client) DeleteContact(ctx context.Context, cid int64) error
- func (c *Client) DeleteContactField(ctx context.Context, fid int64) error
- func (c *Client) DeleteConversation(ctx context.Context, cid int64) error
- func (c *Client) DeleteFolder(ctx context.Context, fid int64) error
- func (c *Client) DeleteGroup(ctx context.Context, gid int64) error
- func (c *Client) DeleteTicket(ctx context.Context, tid int64) error
- func (c *Client) DeleteTicketField(ctx context.Context, fid int64) error
- func (c *Client) DeleteTimeEntry(ctx context.Context, teid int64) error
- func (c *Client) DoCopyFile(ctx context.Context, url string, w io.Writer) error
- func (c *Client) DoCopyFileNoAuth(ctx context.Context, url string, w io.Writer) error
- func (c *Client) DoDelete(ctx context.Context, url string) error
- func (c *Client) DoGet(ctx context.Context, url string, result any) error
- func (c *Client) DoList(ctx context.Context, url string, lo ListOption, result any) (bool, error)
- func (c *Client) DoPost(ctx context.Context, url string, source, result any) error
- func (c *Client) DoPut(ctx context.Context, url string, source, result any) error
- func (c *Client) DoReadFile(ctx context.Context, url string) ([]byte, error)
- func (c *Client) DoReadFileNoAuth(ctx context.Context, url string) ([]byte, error)
- func (c *Client) DoSaveFile(ctx context.Context, url string, path string) error
- func (c *Client) DoSaveFileNoAuth(ctx context.Context, url string, path string) error
- func (c *Client) Endpoint(format string, a ...any) string
- func (c *Client) ExportCompanies(ctx context.Context, defaultFields, customFields []string) (string, error)
- func (c *Client) ExportContacts(ctx context.Context, defaultFields, customFields []string) (string, error)
- func (c *Client) FilterContacts(ctx context.Context, fco *FilterContactsOption) ([]*Contact, int, error)
- func (c *Client) FilterTickets(ctx context.Context, fto *FilterTicketsOption) ([]*Ticket, int, error)
- func (c *Client) ForwardTicket(ctx context.Context, tid int64, tf *TicketForward) (*ForwardResult, error)
- func (c *Client) GetAgent(ctx context.Context, aid int64) (*Agent, error)
- func (c *Client) GetAgentTicketURL(tid int64) string
- func (c *Client) GetArticle(ctx context.Context, aid int64) (*Article, error)
- func (c *Client) GetArticleTranslated(ctx context.Context, aid int64, lang string) (*Article, error)
- func (c *Client) GetAutomationRule(ctx context.Context, aType AutomationType, rid int64) (*AutomationRule, error)
- func (c *Client) GetCategory(ctx context.Context, cid int64) (*Category, error)
- func (c *Client) GetCategoryTranslated(ctx context.Context, cid int64, lang string) (*Category, error)
- func (c *Client) GetCompany(ctx context.Context, cid int64) (*Company, error)
- func (c *Client) GetCompanyField(ctx context.Context, fid int64) (*CompanyField, error)
- func (c *Client) GetContact(ctx context.Context, cid int64) (*Contact, error)
- func (c *Client) GetContactField(ctx context.Context, fid int64) (*ContactField, error)
- func (c *Client) GetCurrentAgent(ctx context.Context) (*Agent, error)
- func (c *Client) GetExportedCompaniesURL(ctx context.Context, jid string) (*Job, error)
- func (c *Client) GetExportedContactsURL(ctx context.Context, jid string) (*Job, error)
- func (c *Client) GetFolder(ctx context.Context, fid int64) (*Folder, error)
- func (c *Client) GetFolderTranslated(ctx context.Context, fid int64, lang string) (*Folder, error)
- func (c *Client) GetGroup(ctx context.Context, gid int64) (*Group, error)
- func (c *Client) GetHelpdeskAttachmentURL(aid int64) string
- func (c *Client) GetJob(ctx context.Context, jid string) (*Job, error)
- func (c *Client) GetProduct(ctx context.Context, id int64) (*Product, error)
- func (c *Client) GetRole(ctx context.Context, rid int64) (*Role, error)
- func (c *Client) GetSolutionArticleURL(aid int64) string
- func (c *Client) GetTicket(ctx context.Context, tid int64, include ...string) (*Ticket, error)
- func (c *Client) GetTicketField(ctx context.Context, fid int64, include ...string) (*TicketField, error)
- func (c *Client) HardDeleteContact(ctx context.Context, cid int64, force ...bool) error
- func (c *Client) InviteContact(ctx context.Context, cid int64) error
- func (c *Client) IterAgents(ctx context.Context, lao *ListAgentsOption, iaf func(*Agent) error) error
- func (c *Client) IterAutomationRules(ctx context.Context, aType AutomationType, laro *ListAutomationRulesOption, ...) error
- func (c *Client) IterCategories(ctx context.Context, lco *ListCategoriesOption, icf func(*Category) error) error
- func (c *Client) IterCategoriesTranslated(ctx context.Context, lang string, lco *ListCategoriesOption, ...) error
- func (c *Client) IterCategoryFolders(ctx context.Context, cid int64, lfo *ListFoldersOption, ...) error
- func (c *Client) IterCategoryFoldersTranslated(ctx context.Context, cid int64, lang string, lfo *ListFoldersOption, ...) error
- func (c *Client) IterCompanies(ctx context.Context, lco *ListCompaniesOption, icf func(*Company) error) error
- func (c *Client) IterContacts(ctx context.Context, lco *ListContactsOption, icf func(*Contact) error) error
- func (c *Client) IterFilterTickets(ctx context.Context, fto *FilterTicketsOption, itf func(*Ticket) error) error
- func (c *Client) IterFolderArticles(ctx context.Context, fid int64, lao *ListArticlesOption, ...) error
- func (c *Client) IterFolderArticlesTranslated(ctx context.Context, fid int64, lang string, lao *ListArticlesOption, ...) error
- func (c *Client) IterGroups(ctx context.Context, lgo *ListGroupsOption, igf func(*Group) error) error
- func (c *Client) IterProducts(ctx context.Context, lpo *ListProductsOption, ipf func(*Product) error) error
- func (c *Client) IterRoles(ctx context.Context, lro *ListRolesOption, irf func(*Role) error) error
- func (c *Client) IterSubFolders(ctx context.Context, fid int64, lfo *ListFoldersOption, ...) error
- func (c *Client) IterSubFoldersTranslated(ctx context.Context, fid int64, lang string, lfo *ListFoldersOption, ...) error
- func (c *Client) IterTicketConversations(ctx context.Context, tid int64, lco *ListConversationsOption, ...) error
- func (c *Client) IterTickets(ctx context.Context, lto *ListTicketsOption, itf func(*Ticket) error) error
- func (c *Client) IterTimeEntries(ctx context.Context, lteo *ListTimeEntriesOption, itef func(*TimeEntry) error) error
- func (c *Client) ListAgents(ctx context.Context, lao *ListAgentsOption) ([]*Agent, bool, error)
- func (c *Client) ListAutomationRules(ctx context.Context, aType AutomationType, laro *ListAutomationRulesOption) ([]*AutomationRule, bool, error)
- func (c *Client) ListCategories(ctx context.Context, lco *ListCategoriesOption) ([]*Category, bool, error)
- func (c *Client) ListCategoriesTranslated(ctx context.Context, lang string, lco *ListCategoriesOption) ([]*Category, bool, error)
- func (c *Client) ListCategoryFolders(ctx context.Context, cid int64, lfo *ListFoldersOption) ([]*Folder, bool, error)
- func (c *Client) ListCategoryFoldersTranslated(ctx context.Context, cid int64, lang string, lfo *ListFoldersOption) ([]*Folder, bool, error)
- func (c *Client) ListCompanies(ctx context.Context, lco *ListCompaniesOption) ([]*Company, bool, error)
- func (c *Client) ListCompanyFields(ctx context.Context) ([]*CompanyField, error)
- func (c *Client) ListContactFields(ctx context.Context) ([]*ContactField, error)
- func (c *Client) ListContacts(ctx context.Context, lco *ListContactsOption) ([]*Contact, bool, error)
- func (c *Client) ListFolderArticles(ctx context.Context, fid int64, lao *ListArticlesOption) ([]*Article, bool, error)
- func (c *Client) ListFolderArticlesTranslated(ctx context.Context, fid int64, lang string, lao *ListArticlesOption) ([]*Article, bool, error)
- func (c *Client) ListGroups(ctx context.Context, lgo *ListGroupsOption) ([]*Group, bool, error)
- func (c *Client) ListProducts(ctx context.Context, lpo *ListProductsOption) ([]*Product, bool, error)
- func (c *Client) ListRoles(ctx context.Context, lro *ListRolesOption) ([]*Role, bool, error)
- func (c *Client) ListSubFolders(ctx context.Context, fid int64, lfo *ListFoldersOption) ([]*Folder, bool, error)
- func (c *Client) ListSubFoldersTranslated(ctx context.Context, fid int64, lang string, lfo *ListFoldersOption) ([]*Folder, bool, error)
- func (c *Client) ListTicketConversations(ctx context.Context, tid int64, lco *ListConversationsOption) ([]*Conversation, bool, error)
- func (c *Client) ListTicketFields(ctx context.Context, types ...string) ([]*TicketField, error)
- func (c *Client) ListTicketWatchers(ctx context.Context, tid int64) ([]int64, error)
- func (c *Client) ListTickets(ctx context.Context, lto *ListTicketsOption) ([]*Ticket, bool, error)
- func (c *Client) ListTimeEntries(ctx context.Context, lteo *ListTimeEntriesOption) ([]*TimeEntry, bool, error)
- func (c *Client) MakeAgent(ctx context.Context, cid int64, agent *Agent) (*Contact, error)
- func (c *Client) MergeContacts(ctx context.Context, cm *ContactsMerge) error
- func (c *Client) MergeTickets(ctx context.Context, tm *TicketsMerge) error
- func (c *Client) ReplyToForward(ctx context.Context, tid int64, rf *ReplyForward) (*ForwardResult, error)
- func (c *Client) RestoreContact(ctx context.Context, cid int64) error
- func (c *Client) RestoreTicket(ctx context.Context, tid int64) error
- func (c *Client) SearchAgents(ctx context.Context, keyword string) ([]*User, error)
- func (c *Client) SearchArticles(ctx context.Context, keyword string) ([]*ArticleEx, error)
- func (c *Client) SearchCompanies(ctx context.Context, name string) ([]*Company, error)
- func (c *Client) SearchContacts(ctx context.Context, keyword string) ([]*User, error)
- func (c *Client) ToggleTimer(ctx context.Context, teid int64) (*TimeEntry, error)
- func (c *Client) UnwatchTicket(ctx context.Context, tid int64) error
- func (c *Client) UpdateAgent(ctx context.Context, aid int64, agent *AgentUpdate) (*Agent, error)
- func (c *Client) UpdateArticle(ctx context.Context, aid int64, article *ArticleUpdate) (*Article, error)
- func (c *Client) UpdateArticleTranslated(ctx context.Context, aid int64, lang string, article *ArticleUpdate) (*Article, error)
- func (c *Client) UpdateAutomationRule(ctx context.Context, aType AutomationType, rid int64, ...) (*AutomationRule, error)
- func (c *Client) UpdateCategory(ctx context.Context, cid int64, category *CategoryUpdate) (*Category, error)
- func (c *Client) UpdateCategoryTranslated(ctx context.Context, cid int64, lang string, category *CategoryUpdate) (*Category, error)
- func (c *Client) UpdateCompany(ctx context.Context, cid int64, company *CompanyUpdate) (*Company, error)
- func (c *Client) UpdateCompanyField(ctx context.Context, fid int64, field *CompanyFieldUpdate) (*CompanyField, error)
- func (c *Client) UpdateContact(ctx context.Context, cid int64, contact *ContactUpdate) (*Contact, error)
- func (c *Client) UpdateContactField(ctx context.Context, fid int64, field *ContactFieldUpdate) (*ContactField, error)
- func (c *Client) UpdateConversation(ctx context.Context, cid int64, note *NoteUpdate) (*Conversation, error)
- func (c *Client) UpdateFolder(ctx context.Context, fid int64, folder *FolderUpdate) (*Folder, error)
- func (c *Client) UpdateFolderTranslated(ctx context.Context, fid int64, lang string, folder *FolderUpdate) (*Folder, error)
- func (c *Client) UpdateGroup(ctx context.Context, gid int64, group *GroupUpdate) (*Group, error)
- func (c *Client) UpdateTicket(ctx context.Context, tid int64, ticket *TicketUpdate) (*Ticket, error)
- func (c *Client) UpdateTicketField(ctx context.Context, fid int64, field *TicketFieldUpdate) (*TicketField, error)
- func (c *Client) UpdateTimeEntry(ctx context.Context, teid int64, te *TimeEntryUpdate) (*TimeEntry, error)
- type Company
- type CompanyCreate
- type CompanyField
- type CompanyFieldCreate
- type CompanyFieldUpdate
- type CompanyUpdate
- type Contact
- type ContactCreate
- type ContactField
- type ContactFieldCreate
- type ContactFieldUpdate
- type ContactMerge
- type ContactState
- type ContactUpdate
- type ContactsMerge
- type Conversation
- type ConversationSource
- type Date
- type ExportFields
- type ExportOption
- type FieldError
- type File
- type Files
- type FilterContactsOption
- type FilterContactsResult
- type FilterOption
- type FilterTicketsOption
- type FilterTicketsResult
- type Folder
- type FolderCreate
- type FolderUpdate
- type FolderVisibility
- type ForwardResult
- type Freshdesk
- type Group
- type GroupCreate
- type GroupUnassignedFor
- type GroupUpdate
- type Job
- type ListAgentsOption
- type ListArticlesOption
- type ListAutomationRulesOption
- type ListCategoriesOption
- type ListCompaniesOption
- type ListContactsOption
- type ListConversationsOption
- type ListFoldersOption
- type ListGroupsOption
- type ListOption
- type ListProductsOption
- type ListRolesOption
- type ListTicketsOption
- type ListTimeEntriesOption
- type Note
- type NoteCreate
- type NoteUpdate
- type OrderType
- type OtherCompany
- type OutboundEmail
- type PageOption
- type Product
- type Reply
- type ReplyCreate
- type ReplyForward
- type ResultError
- type Role
- type Ticket
- type TicketCreate
- type TicketField
- type TicketFieldCreate
- type TicketFieldUpdate
- type TicketForward
- type TicketOrderBy
- type TicketPriority
- type TicketProperties
- type TicketSource
- type TicketStatus
- type TicketUpdate
- type TicketWatchers
- type TicketsMerge
- type Time
- type TimeEntry
- type TimeEntryBillable
- type TimeEntryCreate
- type TimeEntryUpdate
- type TimeSpent
- type User
- type Values
- type WithFiles
Constants ¶
const ( ArticleStatusDraft ArticleStatus = 1 ArticleStatusPublished ArticleStatus = 2 ArticleHierarchyTypeCategory ArticleHierarchyType = "category" ArticleHierarchyTypeFolder ArticleHierarchyType = "folder" )
const ( AutomationTypeTicketCreation AutomationType = 1 AutomationTypeTimeTriggers AutomationType = 3 AutomationTypeTicketUpdates AutomationType = 4 AutomationOperatorAnd AutomationOperator = "AND" AutomationOperatorOr AutomationOperator = "OR" AutomationPerformerAgent AutomationPerformerType = 1 AutomationPerformerRequester AutomationPerformerType = 2 AutomationPerformerAgentOrRequester AutomationPerformerType = 3 AutomationPerformerSystem AutomationPerformerType = 4 AutomationMatchTypeAll AutomationMatchType = "all" AutomationMatchTypeAny AutomationMatchType = "any" AutomationPushToSlack AutomationPushTo = "Slack" AutomationPushToOffice365 AutomationPushTo = "Office365" AutomationResourceSameTicket AutomationResource = "Same_ticket" AutomationResourceParentTicket AutomationResource = "parent_ticket" AutomationResourceTrackerTicket AutomationResource = "tracker_ticket" AutomationResourceCustomObject AutomationResource = "custom_object" )
const ( OrderAsc OrderType = "asc" OrderDesc OrderType = "desc" DefaultFieldTypeName = "default_name" DefaultFieldTypeNote = "default_note" DefaultFieldTypeSubject = "default_subject" DefaultFieldTypeAgent = "default_agent" DefaultFieldTypeRequester = "default_requester" DefaultFieldTypeGroup = "default_group" DefaultFieldTypeCompany = "default_company" DefaultFieldTypeProduct = "default_product" DefaultFieldTypePriority = "default_priority" DefaultFieldTypeSource = "default_source" DefaultFieldTypeStatus = "default_status" DefaultFieldTypeDescription = "default_description" DefaultFieldTypeTicketType = "default_ticket_type" CustomFieldTypeCustomDate = "custom_date" CustomFieldTypeCustomDateTime = "custom_date_time" CustomFieldTypeCustomDropdown = "custom_dropdown" CustomFieldTypeCustomParagraph = "custom_paragraph" CustomFieldTypeCustomText = "custom_text" CustomFieldTypeCustomCheckbox = "custom_checkbox" CustomFieldTypeCustomNumber = "custom_number" CustomFieldTypeCustomDecimal = "custom_decimal" CustomFieldTypeCustomFile = "custom_file" CustomFieldTypeNestedField = "nested_field" )
const ( AutoTicketAssignDisabled AutoTicketAssign = 0 AutoTicketAssignRoundRobin AutoTicketAssign = 1 AutoTicketAssignSkillBasedRoundRobin AutoTicketAssign = 2 AutoTicketAssignLoadBasedRoundRobin AutoTicketAssign = 3 AutoTicketAssignOmniroute AutoTicketAssign = 4 GroupUnassignedFor30m GroupUnassignedFor = "30m" GroupUnassignedFor1h GroupUnassignedFor = "1h" GroupUnassignedFor2h GroupUnassignedFor = "2h" GroupUnassignedFor4h GroupUnassignedFor = "4h" GroupUnassignedFor8h GroupUnassignedFor = "8h" GroupUnassignedFor12h GroupUnassignedFor = "12h" GroupUnassignedFor1d GroupUnassignedFor = "1d" GroupUnassignedFor2d GroupUnassignedFor = "2d" GroupUnassignedFor3d GroupUnassignedFor = "3d" )
const ( //JobStatusInProgress = "IN PROGRESS" JobStatusInProgress = "in_progress" JobStatusCompleted = "completed" )
const ( TicketSourceEmail TicketSource = 1 TicketSourcePortal TicketSource = 2 TicketSourcePhone TicketSource = 3 TicketSourceChat TicketSource = 7 TicketSourceFeedbackWidget TicketSource = 9 TicketSourceOutboundEmail TicketSource = 10 TicketStatusOpen TicketStatus = 2 TicketStatusPending TicketStatus = 3 TicketStatusResolved TicketStatus = 4 TicketStatusClosed TicketStatus = 5 TicketPriorityLow TicketPriority = 1 TicketPriorityMedium TicketPriority = 2 TicketPriorityHigh TicketPriority = 3 TicketPriorityUrgent TicketPriority = 4 TicketFilterNewAndMyOpen = "new_and_my_open" TicketFilterWatching = "watching" TicketFilterSpam = "spam" TicketFilterDeleted = "deleted" )
const ( TicketIncludeDescription = "description" // Will return the ticket description and description_text. TicketIncludeCompany = "company" // Will return the company's id and name. TicketIncludeConversations = "conversations" // Will return up to 10 conversations sorted by "created_at" in ascending order TicketIncludeRequester = "requester" // Will return the requester's email, id, mobile, name, and phone TicketIncludeStats = "stats" // Will return the ticket's closed_at, resolved_at and first_responded_at time TicketOrderByCreatedAt TicketOrderBy = "created_at" TicketOrderByDueBy TicketOrderBy = "due_by" TicketOrderByUpdatedAt TicketOrderBy = "updated_at" TicketOrderByStatus TicketOrderBy = "status" )
const (
TicketFieldIncludeSection = "section"
)
Variables ¶
This section is empty.
Functions ¶
func GetAgentTicketURL ¶
GetAgentTicketURL return a permlink for agent ticket URL
func GetHelpdeskAttachmentURL ¶
GetHelpdeskAttachmentURL return a permlink for helpdesk attachment/avator URL
func GetSolutionArticleURL ¶
GetSolutionArticleURL return a permlink for solution article URL
Types ¶
type Agent ¶
type Agent struct {
ID int64 `json:"id,omitempty"`
// If the 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 bool `json:"available,omitempty"`
// Timestamp that denotes when the agent became available/unavailable (depending on the value of the 'available' attribute)
AvailableSince *Time `json:"available_since,omitempty"`
// Set to true if this is an occasional agent (true => occasional, false => full-time)
Occasional bool `json:"occasional,omitempty"`
// Signature of the agent in HTML format
Signature string `json:"signature,omitempty"`
// Ticket permission of the agent (1 -> Global Access, 2 -> Group Access, 3 -> Restricted Access)
TicketScope AgentTicketScope `json:"ticket_scope,omitempty"`
// Type of Agent (support_agent -> Support Agent, field_agent -> Field Agent, collaborator -> Collaborator)
Type string `json:"type,omitempty"`
// Skill ids associated with the agent
SkillIDs []int64 `json:"skill_ids,omitempty"`
// Group IDs associated with the agent
GroupIDs []int64 `json:"group_ids,omitempty"`
// Role IDs associated with the agent
RoleIDs []int64 `json:"role_ids,omitempty"`
Contact *Contact `json:"contact,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type AgentCreate ¶
type AgentCreate struct {
// Set to true if this is an occasional agent (true => occasional, false => full-time)
Occasional bool `json:"occasional,omitempty"`
// Signature of the agent in HTML format
Signature string `json:"signature,omitempty"`
// Ticket permission of the agent (1 -> Global Access, 2 -> Group Access, 3 -> Restricted Access)
TicketScope AgentTicketScope `json:"ticket_scope,omitempty"`
// Type of Agent (support_agent -> Support Agent, field_agent -> Field Agent, collaborator -> Collaborator)
AgentType string `json:"agent_type,omitempty"`
// Skill ids associated with the agent
SkillIDs []int64 `json:"skill_ids,omitempty"`
// Group IDs associated with the agent
GroupIDs []int64 `json:"group_ids,omitempty"`
// Role IDs associated with the agent
RoleIDs []int64 `json:"role_ids,omitempty"`
// Name of the contact
Name string `json:"name,omitempty"`
// Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
Email string `json:"email,omitempty"`
// Telephone number of the contact
Phone string `json:"phone,omitempty"`
// Mobile number of the contact
Mobile string `json:"mobile,omitempty"`
// Job title of the contact
JobTitle string `json:"job_title,omitempty"`
// Language of the contact
Language string `json:"language,omitempty"`
// Time zone in which the contact resides
TimeZone string `json:"time_zone,omitempty"`
}
func (*AgentCreate) String ¶
func (a *AgentCreate) String() string
type AgentState ¶
type AgentState string
const ( AgentStateFulltime AgentState = "fulltime" AgentStateOccasional AgentState = "occasional" )
type AgentTicketScope ¶
type AgentTicketScope int
const ( AgentTicketScopeGlobal AgentTicketScope = 1 AgentTicketScopeGroup AgentTicketScope = 2 AgentTicketScopeRestricted AgentTicketScope = 3 )
func ParseAgentTicketScope ¶
func ParseAgentTicketScope(s string) AgentTicketScope
func (AgentTicketScope) String ¶
func (ats AgentTicketScope) String() string
type AgentUpdate ¶
type AgentUpdate = AgentCreate
type Article ¶
type Article struct {
ID int64 `json:"id,omitempty"`
// ID of the agent who created the solution article
AgentID int64 `json:"agent_id,omitempty"`
// ID of the category to which the solution article belongs
CagetoryID int64 `json:"category_id,omitempty"`
// Title of the solution article
Title string `json:"title,omitempty"`
// Description of the solution article
Description string `json:"description,omitempty"`
// Description of the solution article in plain text
DescriptionText string `json:"description_text,omitempty"`
// ID of the folder to which the solution article belongs
FolderID int64 `json:"folder_id,omitempty"`
// Parent category and folders in which the article is placed
Hierarchy []*ArticleHierarchyItem `json:"hierarchy,omitempty"`
// Number of views for the solution article
Hits int64 `json:"hits,omitempty"`
// Status of the solution article
Status ArticleStatus `json:"status,omitempty"`
// Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords
SeoData *ArticleSeoData `json:"seo_data,omitempty"`
// Tags that have been associated with the solution article
Tags []string `json:"tags,omitempty"`
// Omnichannel: available for chat platforms ("web", "ios", "android")
Platforms []string `json:"platforms,omitempty"`
// Number of down votes for the solution article
ThumbsDown int `json:"thumbs_down,omitempty"`
// Number of upvotes for the solution article
ThumbsUp int `json:"thumbs_up,omitempty"`
// Attachments associated with the article. The total size of all of a article's attachments cannot exceed 25MB.
Attachments []*Attachment `json:"attachments,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type ArticleCreate ¶
type ArticleCreate struct {
// ID of the agent who created the solution article
AgentID int64 `json:"agent_id,omitempty"`
// Title of the solution article
Title string `json:"title,omitempty"`
// Description of the solution article
Description string `json:"description,omitempty"`
// Status of the solution article
Status ArticleStatus `json:"status,omitempty"`
// Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords
SeoData *ArticleSeoData `json:"seo_data,omitempty"`
// Tags that have been associated with the solution article
Tags *[]string `json:"tags,omitempty"`
// Attachments associated with the article. The total size of all of a article's attachments cannot exceed 25MB.
Attachments []*Attachment `json:"attachments,omitempty"`
}
func (*ArticleCreate) AddAttachment ¶
func (a *ArticleCreate) AddAttachment(path string, data ...[]byte)
func (*ArticleCreate) Files ¶
func (a *ArticleCreate) Files() Files
func (*ArticleCreate) String ¶
func (a *ArticleCreate) String() string
func (*ArticleCreate) Values ¶
func (a *ArticleCreate) Values() Values
type ArticleEx ¶
type ArticleHierarchyData ¶
type ArticleHierarchyData struct {
ID int64 `json:"id,omitempty"`
Language string `json:"language,omitempty"`
Name string `json:"name,omitempty"`
}
func (*ArticleHierarchyData) String ¶
func (ahd *ArticleHierarchyData) String() string
type ArticleHierarchyItem ¶
type ArticleHierarchyItem struct {
Data *ArticleHierarchyData `json:"data,omitempty"`
Level int `json:"level,omitempty"`
Type ArticleHierarchyType `json:"type,omitempty"`
}
func (*ArticleHierarchyItem) String ¶
func (ahi *ArticleHierarchyItem) String() string
type ArticleHierarchyType ¶
type ArticleHierarchyType string
type ArticleSeoData ¶
type ArticleSeoData struct {
MetaTitle string `json:"meta_title,omitempty"`
MetaKeywords string `json:"meta_keywords,omitempty"` // deprecated
MetaDescription string `json:"meta_description,omitempty"`
}
func (*ArticleSeoData) String ¶
func (asd *ArticleSeoData) String() string
type ArticleStatus ¶
type ArticleStatus int
func ParseArticleStatus ¶
func ParseArticleStatus(s string) ArticleStatus
func (ArticleStatus) String ¶
func (as ArticleStatus) String() string
type ArticleUpdate ¶
type ArticleUpdate = ArticleCreate
type Attachment ¶
type Attachment = fresh.Attachment
func NewAttachment ¶
func NewAttachment(file string, data ...[]byte) *Attachment
type Attachments ¶
type Attachments = fresh.Attachments
type AutoTicketAssign ¶
type AutoTicketAssign int
type AutomationAction ¶
type AutomationAction struct {
FieldName string `json:"field_name,omitempty"` // Name of the field
Value any `json:"value,omitempty"` // Value to be set on the field
EmailTo int64 `json:"email_to,omitempty"` // Send email to specific contact/agent/groups.
EmailBody string `json:"email_body,omitempty"` // Content of the email
ApiKey string `json:"api_key,omitempty"` // API key to authenticate any HTTP requests
AuthHeader map[string]string `json:"auth_header,omitempty"` // Combination of user name and password to be used for HTTP requests
CustomHeader map[string]string `json:"custom_headers,omitempty"` // Custom header information for any HTTP request
RequestType string `json:"request_type,omitempty"` // Type of the HTTP request
URL string `json:"url,omitempty"` // URL for the HTTP request
NoteBody string `json:"note_body,omitempty"` // Content of the note added by the rule
NotifyAgents []int64 `json:"notify_agents,omitempty"` // IDs of agents to be notified
FwdTo []string `json:"fwd_to,omitempty"` // Forward the ticket to an email address
FwdCc string `json:"fwd_cc,omitempty"` // Forward the ticket to an email address
FwdBcc string `json:"fwd_bcc,omitempty"` // Forward the ticket to an email address
FwdNoteBody string `json:"fwd_note_body,omitempty"` // Forward the ticket to an email address
PushTo AutomationPushTo `json:"push_to,omitempty"` // Channel through which the message will be sent. Possible options are: “Slack” “Office365”
SlackText string `json:"slack_text,omitempty"` // Content of the message sent to slack
Office365Text string `json:"office365_text,omitempty"` // Content of the message sent to office365
ResourceType AutomationResource `json:"resource_type,omitempty"` // Type of the ticket. Possible values are: “Same_ticket”, ”parent_ticket”, ”tracker_ticket”, ”custom_object”
ObjectReference string `json:"object_reference,omitempty"` // Ticket’s look up field value
}
func (*AutomationAction) String ¶
func (aa *AutomationAction) String() string
type AutomationActionType ¶
type AutomationActionType string
type AutomationCondition ¶
type AutomationCondition struct {
Name string `json:"name,omitempty"` // Title of the condition
MatchType AutomationMatchType `json:"match_type,omitempty"` // To check whether all conditions have to be met or atleast one. Possible values are: “all”,”any”
Properties []*AutomationProperty `json:"properties,omitempty"` // Properties of the condition
}
func (*AutomationCondition) String ¶
func (ac *AutomationCondition) String() string
type AutomationEvent ¶
type AutomationEvent struct {
FieldName string `json:"field_name,omitempty"` // Name of the field
From string `json:"from,omitempty"` // Value of the field before the event
To string `json:"to,omitempty"` // Value of the field after the event
}
func (*AutomationEvent) String ¶
func (ae *AutomationEvent) String() string
type AutomationMatchType ¶
type AutomationMatchType string
type AutomationOperator ¶
type AutomationOperator string
type AutomationPerformer ¶
type AutomationPerformer struct {
Type AutomationPerformerType `json:"type,omitempty"` // Agent/Requester/AgentOrRequester/System
Members []int64 `json:"members,omitempty"` // IDs of the agents
}
func (*AutomationPerformer) String ¶
func (ap *AutomationPerformer) String() string
type AutomationPerformerType ¶
type AutomationPerformerType int
type AutomationProperty ¶
type AutomationProperty struct {
ResourceType string `json:"resource_type,omitempty"`
FieldName string `json:"field_name,omitempty"`
Operator string `json:"operator,omitempty"`
Value any `json:"value,omitempty"`
BusinessHoursID int64 `json:"business_hours_id,omitempty"`
CaseSensitive bool `json:"case_sensitive,omitempty"`
NestedFields map[string]any `json:"nested_fields,omitempty"`
AssociatedFields map[string]any `json:"associated_fields,omitempty"`
RelatedConditions []map[string]any `json:"related_conditions,omitempty"`
}
func (*AutomationProperty) String ¶
func (ap *AutomationProperty) String() string
type AutomationPushTo ¶
type AutomationPushTo string
type AutomationResource ¶
type AutomationResource string
type AutomationRule ¶
type AutomationRule struct {
ID int64 `json:"id,omitempty"` // Id of the automation
Name string `json:"name,omitempty"` // Name of the automation rule
Description string `json:"description,omitempty"` // Description of the automation rule
Position int `json:"position,omitempty"` // Position of the automation rule
Active bool `json:"active,omitempty"` // Set to true if the rule is active
AutomationTypeID int64 `json:"automation_type_id,omitempty"` // Type id of the automation
Performer *AutomationPerformer `json:"performer,omitempty"` // **Applicable only if automation_type_id is 4**, Any event performer (agent, customer or system) whose action triggers the rule
Events []*AutomationEvent `json:"events,omitempty"` // **Applicable only if automation_type_id is 4**, Events that are responsible for triggering the rule
Conditions []*AutomationCondition `json:"conditions,omitempty"` // Conditions to check whether the rule can run on a ticket or not
Operator AutomationOperator `json:"operator,omitempty"` // AND/OR operator to combine multiple conditions in a rule
Actions []*AutomationAction `json:"actions,omitempty"` // sActions to be performed by the rule on matching tickets
Summary map[string]any `json:"summary,omitempty"`
Outdated bool `json:"outdated,omitempty"`
AffectedTicketCount int `json:"affected_tickets_count,omitempty"`
LastUpdatedBy int64 `json:"last_updated_by,omitempty"`
Meta map[string]any `json:"meta,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*AutomationRule) String ¶
func (ar *AutomationRule) String() string
type AutomationRuleCreate ¶
type AutomationRuleCreate struct {
Name string `json:"name,omitempty"` // Name of the automation rule
Description string `json:"description,omitempty"` // Description of the automation rule
Position int `json:"position,omitempty"` // Position of the automation rule
Active bool `json:"active,omitempty"` // Set to true if the rule is active
Performer *AutomationPerformer `json:"performer,omitempty"` // **Applicable only if automation_type_id is 4**, Any event performer (agent, customer or system) whose action triggers the rule
Events []*AutomationEvent `json:"events,omitempty"` // **Applicable only if automation_type_id is 4**, Events that are responsible for triggering the rule
Conditions []*AutomationCondition `json:"conditions,omitempty"` // Conditions to check whether the rule can run on a ticket or not
Operator AutomationOperator `json:"operator,omitempty"` // AND/OR operator to combine multiple conditions in a rule
Actions []*AutomationAction `json:"actions,omitempty"` // sActions to be performed by the rule on matching tickets
}
func (*AutomationRuleCreate) String ¶
func (ar *AutomationRuleCreate) String() string
type AutomationRuleUpdate ¶
type AutomationRuleUpdate = AutomationRuleCreate
type AutomationRules ¶
type AutomationRules struct {
Rules []*AutomationRule `json:"rules,omitempty"`
}
func (*AutomationRules) String ¶
func (ars *AutomationRules) String() string
type AutomationType ¶
type AutomationType int
type Avatar ¶
type Avatar struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Size int64 `json:"size,omitempty"`
ContentType string `json:"content_type,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
AttachmentURL string `json:"attachment_url,omitempty"`
ThumbURL string `json:"thumb_url,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
type Category ¶
type Category struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
// List of portal IDs where this category is visible
VisibleInPortals []int64 `json:"visible_in_portals,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type CategoryCreate ¶
type CategoryCreate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
// List of portal IDs where this category is visible
VisibleInPortals []int64 `json:"visible_in_portals,omitempty"`
}
func (*CategoryCreate) String ¶
func (c *CategoryCreate) String() string
type CategoryUpdate ¶
type CategoryUpdate = CategoryCreate
type Client ¶ added in v1.1.6
func (*Client) AddTicketWatcher ¶ added in v1.1.6
func (*Client) BulkDeleteTickets ¶ added in v1.1.6
func (*Client) BulkUnwatchTickets ¶ added in v1.1.6
func (*Client) BulkUpdateTickets ¶ added in v1.1.6
func (c *Client) BulkUpdateTickets(ctx context.Context, tids []int64, properties *TicketProperties) (string, error)
BulkUpdateTickets returns job id
func (*Client) BulkWatchTickets ¶ added in v1.1.6
func (*Client) CreateAgent ¶ added in v1.1.6
func (*Client) CreateArticle ¶ added in v1.1.6
func (*Client) CreateArticleTranslated ¶ added in v1.1.6
func (*Client) CreateAutomationRule ¶ added in v1.1.6
func (c *Client) CreateAutomationRule(ctx context.Context, aType AutomationType, rule *AutomationRuleCreate) (*AutomationRule, error)
func (*Client) CreateCategory ¶ added in v1.1.6
func (*Client) CreateCategoryTranslated ¶ added in v1.1.6
func (*Client) CreateCompany ¶ added in v1.1.6
func (*Client) CreateCompanyField ¶ added in v1.1.6
func (c *Client) CreateCompanyField(ctx context.Context, cf *CompanyFieldCreate) (*CompanyField, error)
func (*Client) CreateContact ¶ added in v1.1.6
func (*Client) CreateContactField ¶ added in v1.1.6
func (c *Client) CreateContactField(ctx context.Context, cf *ContactFieldCreate) (*ContactField, error)
func (*Client) CreateFolder ¶ added in v1.1.6
func (*Client) CreateFolderTranslated ¶ added in v1.1.6
func (*Client) CreateGroup ¶ added in v1.1.6
func (*Client) CreateNote ¶ added in v1.1.6
func (*Client) CreateOutboundEmail ¶ added in v1.1.6
func (*Client) CreateReply ¶ added in v1.1.6
func (*Client) CreateTicket ¶ added in v1.1.6
func (*Client) CreateTicketField ¶ added in v1.1.6
func (c *Client) CreateTicketField(ctx context.Context, tf *TicketFieldCreate) (*TicketField, error)
func (*Client) CreateTimeEntry ¶ added in v1.1.6
func (*Client) DeleteAgent ¶ added in v1.1.6
func (*Client) DeleteArticle ¶ added in v1.1.6
func (*Client) DeleteAttachment ¶ added in v1.1.6
func (*Client) DeleteAutomationRule ¶ added in v1.1.6
func (*Client) DeleteCategory ¶ added in v1.1.6
func (*Client) DeleteCompany ¶ added in v1.1.6
func (*Client) DeleteCompanyField ¶ added in v1.1.6
func (*Client) DeleteContact ¶ added in v1.1.6
func (*Client) DeleteContactField ¶ added in v1.1.6
func (*Client) DeleteConversation ¶ added in v1.1.6
DeleteConversation delete a conversation (Incoming Reply can not be deleted)
func (*Client) DeleteFolder ¶ added in v1.1.6
func (*Client) DeleteGroup ¶ added in v1.1.6
func (*Client) DeleteTicket ¶ added in v1.1.6
func (*Client) DeleteTicketField ¶ added in v1.1.6
func (*Client) DeleteTimeEntry ¶ added in v1.1.6
func (*Client) DoCopyFile ¶ added in v1.1.6
func (*Client) DoCopyFileNoAuth ¶ added in v1.1.6
func (*Client) DoReadFile ¶ added in v1.1.6
func (*Client) DoReadFileNoAuth ¶ added in v1.1.6
func (*Client) DoSaveFile ¶ added in v1.1.6
func (*Client) DoSaveFileNoAuth ¶ added in v1.1.6
func (*Client) ExportCompanies ¶ added in v1.1.6
func (c *Client) ExportCompanies(ctx context.Context, defaultFields, customFields []string) (string, error)
ExportCompanies return a job id, call GetExportedCompaniesURL() to get the job detail
func (*Client) ExportContacts ¶ added in v1.1.6
func (c *Client) ExportContacts(ctx context.Context, defaultFields, customFields []string) (string, error)
ExportContacts return a job id, call GetExportedContactsURL() to get the job detail
func (*Client) FilterContacts ¶ added in v1.1.6
func (c *Client) FilterContacts(ctx context.Context, fco *FilterContactsOption) ([]*Contact, int, error)
FilterContacts Use custom contact fields that you have created in your account to filter through the contacts and get a list of contacts matching the specified contact fields. Format: "(contact_field:integer OR contact_field:'string') AND contact_field:boolean" See: https://developers.freshdesk.com/api/#filter_contacts
func (*Client) FilterTickets ¶ added in v1.1.6
func (c *Client) FilterTickets(ctx context.Context, fto *FilterTicketsOption) ([]*Ticket, int, error)
FilterTickets Use custom ticket fields that you have created in your account to filter through the tickets and get a list of tickets matching the specified ticket fields. Query Format: "(ticket_field:integer OR ticket_field:'string') AND ticket_field:boolean" Note: 1. Archived tickets will not be included in the results 2. The query must be URL encoded 3. Query can be framed using the name of the ticket fields, which can be obtained from Ticket Fields endpoint. Ticket Fields are case sensitive 4. Query string must be enclosed between a pair of double quotes and can have up to 512 characters 5. Logical operators AND, OR along with parentheses () can be used to group conditions 6. Relational operators greater than or equal to :> and less than or equal to :< can be used along with date fields and numeric fields 7. Input for date fields should be in UTC Format 8. The number of objects returned per page is 30 also the total count of the results will be returned along with the result 9. To scroll through the pages add page parameter to the url. The page number starts with 1 and should not exceed 10 10. To filter for fields with no values assigned, use the null keyword 11. Please note that the updates will take a few minutes to get indexed, after which it will be available through API
func (*Client) ForwardTicket ¶ added in v1.1.6
func (c *Client) ForwardTicket(ctx context.Context, tid int64, tf *TicketForward) (*ForwardResult, error)
func (*Client) GetAgentTicketURL ¶ added in v1.1.6
GetAgentTicketURL return a permlink for agent ticket URL
func (*Client) GetArticle ¶ added in v1.1.6
func (*Client) GetArticleTranslated ¶ added in v1.1.6
func (*Client) GetAutomationRule ¶ added in v1.1.6
func (c *Client) GetAutomationRule(ctx context.Context, aType AutomationType, rid int64) (*AutomationRule, error)
func (*Client) GetCategory ¶ added in v1.1.6
func (*Client) GetCategoryTranslated ¶ added in v1.1.6
func (*Client) GetCompany ¶ added in v1.1.6
func (*Client) GetCompanyField ¶ added in v1.1.6
GetCompanyField View a Company Field include: conversations, requester, company, stats
func (*Client) GetContact ¶ added in v1.1.6
func (*Client) GetContactField ¶ added in v1.1.6
GetContactField View a Contact Field include: conversations, requester, company, stats
func (*Client) GetCurrentAgent ¶ added in v1.1.6
func (*Client) GetExportedCompaniesURL ¶ added in v1.1.6
GetExportedCompaniesURL get the exported companies url
func (*Client) GetExportedContactsURL ¶ added in v1.1.6
GetExportedContactsURL get the exported contacts url
func (*Client) GetFolderTranslated ¶ added in v1.1.6
func (*Client) GetHelpdeskAttachmentURL ¶ added in v1.1.6
GetHelpdeskAttachmentURL return a permlink for helpdesk attachment/avator URL
func (*Client) GetProduct ¶ added in v1.1.6
func (*Client) GetSolutionArticleURL ¶ added in v1.1.6
GetSolutionArticleURL return a permlink for solution article URL
func (*Client) GetTicket ¶ added in v1.1.6
GetTicket Get a Ticket include: conversations, requester, company, stats
func (*Client) GetTicketField ¶ added in v1.1.6
func (c *Client) GetTicketField(ctx context.Context, fid int64, include ...string) (*TicketField, error)
GetTicketField View a Ticket Field include: conversations, requester, company, stats
func (*Client) HardDeleteContact ¶ added in v1.1.6
func (*Client) InviteContact ¶ added in v1.1.6
func (*Client) IterAgents ¶ added in v1.1.6
func (*Client) IterAutomationRules ¶ added in v1.1.6
func (c *Client) IterAutomationRules(ctx context.Context, aType AutomationType, laro *ListAutomationRulesOption, iarf func(*AutomationRule) error) error
func (*Client) IterCategories ¶ added in v1.1.6
func (*Client) IterCategoriesTranslated ¶ added in v1.1.6
func (*Client) IterCategoryFolders ¶ added in v1.1.6
func (*Client) IterCategoryFoldersTranslated ¶ added in v1.1.6
func (*Client) IterCompanies ¶ added in v1.1.6
func (*Client) IterContacts ¶ added in v1.1.6
func (*Client) IterFilterTickets ¶ added in v1.1.6
func (*Client) IterFolderArticles ¶ added in v1.1.6
func (*Client) IterFolderArticlesTranslated ¶ added in v1.1.6
func (*Client) IterGroups ¶ added in v1.1.6
func (*Client) IterProducts ¶ added in v1.1.6
func (*Client) IterSubFolders ¶ added in v1.1.6
func (*Client) IterSubFoldersTranslated ¶ added in v1.1.6
func (*Client) IterTicketConversations ¶ added in v1.1.6
func (c *Client) IterTicketConversations(ctx context.Context, tid int64, lco *ListConversationsOption, icf func(*Conversation) error) error
func (*Client) IterTickets ¶ added in v1.1.6
func (*Client) IterTimeEntries ¶ added in v1.1.6
func (*Client) ListAgents ¶ added in v1.1.6
func (*Client) ListAutomationRules ¶ added in v1.1.6
func (c *Client) ListAutomationRules(ctx context.Context, aType AutomationType, laro *ListAutomationRulesOption) ([]*AutomationRule, bool, error)
func (*Client) ListCategories ¶ added in v1.1.6
func (*Client) ListCategoriesTranslated ¶ added in v1.1.6
func (*Client) ListCategoryFolders ¶ added in v1.1.6
func (*Client) ListCategoryFoldersTranslated ¶ added in v1.1.6
func (*Client) ListCompanies ¶ added in v1.1.6
func (*Client) ListCompanyFields ¶ added in v1.1.6
func (c *Client) ListCompanyFields(ctx context.Context) ([]*CompanyField, error)
List All Company Fields
func (*Client) ListContactFields ¶ added in v1.1.6
func (c *Client) ListContactFields(ctx context.Context) ([]*ContactField, error)
List All Contact Fields
func (*Client) ListContacts ¶ added in v1.1.6
func (*Client) ListFolderArticles ¶ added in v1.1.6
func (*Client) ListFolderArticlesTranslated ¶ added in v1.1.6
func (*Client) ListGroups ¶ added in v1.1.6
func (*Client) ListProducts ¶ added in v1.1.6
func (*Client) ListSubFolders ¶ added in v1.1.6
func (*Client) ListSubFoldersTranslated ¶ added in v1.1.6
func (*Client) ListTicketConversations ¶ added in v1.1.6
func (c *Client) ListTicketConversations(ctx context.Context, tid int64, lco *ListConversationsOption) ([]*Conversation, bool, error)
func (*Client) ListTicketFields ¶ added in v1.1.6
List All Ticket Fields
func (*Client) ListTicketWatchers ¶ added in v1.1.6
func (*Client) ListTickets ¶ added in v1.1.6
List All Tickets Use filters to view only specific tickets (those which match the criteria that you choose). By default, only tickets that have not been deleted or marked as spam will be returned, unless you use the 'deleted' filter. Note: 1. By default, only tickets that have been created within the past 30 days will be returned. For older tickets, use the updated_since filter 2. A maximum of 300 pages (30000 tickets) will be returned. 3. When using filters, the query string must be URL encoded - see example 4. Use 'include' to embed additional details in the response. Each include will consume an additional 2 credits. For example if you embed the stats information you will be charged a total of 3 API credits for the call. 5. For accounts created after 2018-11-30, you will have to use include to get description.
func (*Client) ListTimeEntries ¶ added in v1.1.6
func (c *Client) ListTimeEntries(ctx context.Context, lteo *ListTimeEntriesOption) ([]*TimeEntry, bool, error)
List All Time Entries
func (*Client) MergeContacts ¶ added in v1.1.6
func (c *Client) MergeContacts(ctx context.Context, cm *ContactsMerge) error
func (*Client) MergeTickets ¶ added in v1.1.6
func (c *Client) MergeTickets(ctx context.Context, tm *TicketsMerge) error
MergeTickets Sometimes, a customer might try to get your attention regarding a particular issue by contacting you through separate channels. Sometimes, the same issue might be reported by different people in the team or someone might accidentally open a new ticket instead of following up on an existing one. To avoid conflicts, you can merge all related tickets together and keep the communication streamlined.
func (*Client) ReplyToForward ¶ added in v1.1.6
func (c *Client) ReplyToForward(ctx context.Context, tid int64, rf *ReplyForward) (*ForwardResult, error)
func (*Client) RestoreContact ¶ added in v1.1.6
func (*Client) RestoreTicket ¶ added in v1.1.6
func (*Client) SearchAgents ¶ added in v1.1.6
func (*Client) SearchArticles ¶ added in v1.1.6
func (*Client) SearchCompanies ¶ added in v1.1.6
Search Companies Search for a company using its name. Note: 1. The search is case insensitive. 2. You cannot search with a substring. For example, a company "Acme Corporation" can be looked up using "acme", "Ac", "Corporation" and "Co". But it will not be returned when you search for "cme" or "orporation".
func (*Client) SearchContacts ¶ added in v1.1.6
func (*Client) ToggleTimer ¶ added in v1.1.6
Start/Stop Timer PUT /api/v2/time_entries/[time_entry_id]/toggle_timer
func (*Client) UnwatchTicket ¶ added in v1.1.6
func (*Client) UpdateAgent ¶ added in v1.1.6
func (*Client) UpdateArticle ¶ added in v1.1.6
func (*Client) UpdateArticleTranslated ¶ added in v1.1.6
func (*Client) UpdateAutomationRule ¶ added in v1.1.6
func (c *Client) UpdateAutomationRule(ctx context.Context, aType AutomationType, rid int64, rule *AutomationRuleUpdate) (*AutomationRule, error)
func (*Client) UpdateCategory ¶ added in v1.1.6
func (*Client) UpdateCategoryTranslated ¶ added in v1.1.6
func (*Client) UpdateCompany ¶ added in v1.1.6
func (*Client) UpdateCompanyField ¶ added in v1.1.6
func (c *Client) UpdateCompanyField(ctx context.Context, fid int64, field *CompanyFieldUpdate) (*CompanyField, error)
func (*Client) UpdateContact ¶ added in v1.1.6
func (*Client) UpdateContactField ¶ added in v1.1.6
func (c *Client) UpdateContactField(ctx context.Context, fid int64, field *ContactFieldUpdate) (*ContactField, error)
func (*Client) UpdateConversation ¶ added in v1.1.6
func (c *Client) UpdateConversation(ctx context.Context, cid int64, note *NoteUpdate) (*Conversation, error)
UpdateConversation only public & private notes can be edited.
func (*Client) UpdateFolder ¶ added in v1.1.6
func (*Client) UpdateFolderTranslated ¶ added in v1.1.6
func (*Client) UpdateGroup ¶ added in v1.1.6
func (*Client) UpdateTicket ¶ added in v1.1.6
func (*Client) UpdateTicketField ¶ added in v1.1.6
func (c *Client) UpdateTicketField(ctx context.Context, fid int64, field *TicketFieldUpdate) (*TicketField, error)
func (*Client) UpdateTimeEntry ¶ added in v1.1.6
func (c *Client) UpdateTimeEntry(ctx context.Context, teid int64, te *TimeEntryUpdate) (*TimeEntry, error)
Update a Time Entry PUT /api/v2/time_entries/[id] Note: 1. The start_time cannot be updated if the timer is already running 2. The start_time cannot be be updated unless the timer_running attribute is updated from 'true' to 'false' 3. The start_time cannot be greater than the current time 4. The timer_running attribute cannot be set to the same value as before 5. The agent_id cannot be updated if the timer is already running
type Company ¶
type Company struct {
ID int64 `json:"id,omitempty"`
// Name of the company
Name string `json:"name,omitempty"`
// Description of the company
Description string `json:"description,omitempty"`
// Any specific note about the company
Note string `json:"note,omitempty"`
// Domains of the company. Email addresses of contacts that contain this domain will be associated with that company automatically.
Domains []string `json:"domains,omitempty"`
// The strength of your relationship with the company
HealthScore string `json:"health_score,omitempty"`
// Classification based on how much value the company brings to your business
AccountTier string `json:"account_tier,omitempty"`
// Date when your contract or relationship with the company is due for renewal
RenewalDate *Date `json:"renewal_date,omitempty"`
//The industry the company serves in
Industry string `json:"industry,omitempty"`
// Key value pair containing the name and value of the custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type CompanyCreate ¶
type CompanyCreate struct {
// Name of the company
Name string `json:"name,omitempty"`
// Description of the company
Description string `json:"description,omitempty"`
// Any specific note about the company
Note string `json:"note,omitempty"`
// Domains of the company. Email addresses of contacts that contain this domain will be associated with that company automatically.
Domains []string `json:"domains,omitempty"`
// The strength of your relationship with the company
HealthScore string `json:"health_score,omitempty"`
// Classification based on how much value the company brings to your business
AccountTier string `json:"account_tier,omitempty"`
// Date when your contract or relationship with the company is due for renewal
RenewalDate *Date `json:"renewal_date,omitempty"`
//The industry the company serves in
Industry string `json:"industry,omitempty"`
// Key value pair containing the name and value of the custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// This attribute for companies can only be set if Custom Objects feature is enabled. The value can either be in the form of the display_id (record id) or primary_field_value (user defined record value). The default value is display_id.
LookupParameter string `json:"lookup_parameter,omitempty"`
}
func (*CompanyCreate) String ¶
func (c *CompanyCreate) String() string
type CompanyField ¶
type CompanyField struct {
ID int64 `json:"id,omitempty"`
// Name of the company field.
Name string `json:"name,omitempty"`
// Label of the field for display
Label string `json:"label,omitempty"`
// For custom conmpanyfields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// Position in which the company field is displayed in the form
Position int `json:"field_type,omitempty"`
// True if the field is a not a custom field.
Default bool `json:"default,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*CompanyField) String ¶
func (cf *CompanyField) String() string
type CompanyFieldCreate ¶
type CompanyFieldCreate struct {
// Label of the field for display
Label string `json:"label,omitempty"`
// For custom conmpanyfields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// Position in which the company field is displayed in the form
Position int `json:"field_type,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
}
func (*CompanyFieldCreate) String ¶
func (cf *CompanyFieldCreate) String() string
type CompanyFieldUpdate ¶
type CompanyFieldUpdate = CompanyFieldCreate
type CompanyUpdate ¶
type CompanyUpdate = CompanyCreate
type Contact ¶
type Contact struct {
ID int64 `json:"id,omitempty"`
// Set to true if the contact has been verified
Active bool `json:"active,omitempty"`
// Address of the contact
Address string `json:"address,omitempty"`
// Avatar of the contact
Avatar *Avatar `json:"avatar,omitempty"`
// ID of the primary company to which this contact belongs
CompanyID int64 `json:"company_id,omitempty"`
// Set to true if the contact can see all tickets that are associated with the company to which he belong
ViewAllTickets bool `json:"view_all_tickets,omitempty"`
// Key value pair containing the name and value of the custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Set to true if the contact has been deleted. Note that this attribute will only be present for deleted contacts
Deleted bool `json:"deleted,omitempty"`
// A short description of the contact
Description string `json:"description,omitempty"`
// Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
Email string `json:"email,omitempty"`
// Job title of the contact
JobTitle string `json:"job_title,omitempty"`
// Language of the contact
Language string `json:"language,omitempty"`
// Mobile number of the contact
Mobile string `json:"mobile,omitempty"`
// Name of the contact
Name string `json:"name,omitempty"`
// Additional emails associated with the contact
OtherEmails []string `json:"other_emails,omitempty"`
// Telephone number of the contact
Phone string `json:"phone,omitempty"`
// Tags associated with this contact
Tags []string `json:"tags,omitempty"`
// Time zone in which the contact resides
TimeZone string `json:"time_zone,omitempty"`
// Twitter handle of the contact
TwitterID string `json:"twitter_id,omitempty"`
// External ID of the contact
UniqueExternalID string `json:"unique_external_id,omitempty"`
// Additional companies associated with the contact
OtherCompanies []any `json:"other_companies,omitempty"`
// Return by MakeAgent()
Agent *Agent `json:"agent,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type ContactCreate ¶
type ContactCreate struct {
// Name of the contact
Name string `json:"name,omitempty"`
// Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
Email string `json:"email,omitempty"`
// Telephone number of the contact
Phone string `json:"phone,omitempty"`
// Mobile number of the contact
Mobile string `json:"mobile,omitempty"`
// Twitter handle of the contact
TwitterID string `json:"twitter_id,omitempty"`
// External ID of the contact
UniqueExternalID string `json:"unique_external_id,omitempty"`
// Additional emails associated with the contact
OtherEmails []string `json:"other_emails,omitempty"`
// ID of the primary company to which this contact belongs
CompanyID int64 `json:"company_id,omitempty"`
// Set to true if the contact can see all tickets that are associated with the company to which he belong
ViewAllTickets bool `json:"view_all_tickets,omitempty"`
// Additional companies associated with the contact
OtherCompanies []any `json:"other_companies,omitempty"`
// Address of the contact
Address string `json:"address,omitempty"`
// Avatar of the contact
Avatar *Avatar `json:"avatar,omitempty"`
// Key value pair containing the name and value of the custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// A short description of the contact
Description string `json:"description,omitempty"`
// Job title of the contact
JobTitle string `json:"job_title,omitempty"`
// Language of the contact
Language string `json:"language,omitempty"`
// Tags associated with this contact
Tags *[]string `json:"tags,omitempty"`
// Time zone in which the contact resides
TimeZone string `json:"time_zone,omitempty"`
// This attribute for contacts can only be set if the Custom Objects feature is enabled. The value can either be in the form of the display_id (record id) or primary_field_value (user defined record value). The default value is display_id.
LookupParameter string `json:"lookup_parameter,omitempty"`
}
func (*ContactCreate) Files ¶
func (c *ContactCreate) Files() Files
func (*ContactCreate) String ¶
func (c *ContactCreate) String() string
func (*ContactCreate) Values ¶
func (c *ContactCreate) Values() Values
type ContactField ¶
type ContactField struct {
ID int64 `json:"id,omitempty"`
// Name of the contact field.
Name string `json:"name,omitempty"`
// Label of the field for display
Label string `json:"label,omitempty"`
// Position in which the contact field is displayed in the form
Position int `json:"field_type,omitempty"`
// True if the field is a not a custom field.
Default bool `json:"default,omitempty"`
// For custom contact fields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// EditableInSignup Set to true if the field can be updated by customers during signup. The default Value is false
EditableInSignup bool `json:"editable_in_signup,omitempty"`
// Set to true if the field can be updated by customers
CustomersCanEdit bool `json:"customers_can_edit,omitempty"`
// Display name for the field (as seen in the customer portal)
LabelForCustomers string `json:"label_for_customers,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// Set to true if the field is mandatory in the customer portal
RequiredForCustomers bool `json:"required_for_customer,omitempty"`
// Set to true if the field is displayed in the customer portal
DisplayedToCustomers bool `json:"displayed_to_customers,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*ContactField) String ¶
func (cf *ContactField) String() string
type ContactFieldCreate ¶
type ContactFieldCreate struct {
// Label of the field for display
Label string `json:"label,omitempty"`
// Display name for the field (as seen in the customer portal)
LabelForCustomers string `json:"label_for_customers,omitempty"`
// For custom ticket fields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// Position in which the ticket field is displayed in the form
Position int `json:"field_type,omitempty"`
// EditableInSignup Set to true if the field can be updated by customers during signup. The default Value is false
EditableInSignup bool `json:"editable_in_signup,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// Set to true if the field can be updated by customers
CustomersCanEdit bool `json:"customers_can_edit,omitempty"`
// Set to true if the field is mandatory in the customer portal
RequiredForCustomers bool `json:"required_for_customer,omitempty"`
// Set to true if the field is displayed in the customer portal
DisplayedForCustomers bool `json:"displayed_for_customers,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
}
func (*ContactFieldCreate) String ¶
func (cf *ContactFieldCreate) String() string
type ContactFieldUpdate ¶
type ContactFieldUpdate = ContactFieldCreate
type ContactMerge ¶
type ContactMerge struct {
// Primary email address of the contact. If you want to associate additional email(s) with this contact, use the other_emails attribute
Email string `json:"email,omitempty"`
// Telephone number of the contact
Phone string `json:"phone,omitempty"`
// Mobile number of the contact
Mobile string `json:"mobile,omitempty"`
// Twitter handle of the contact
TwitterID string `json:"twitter_id,omitempty"`
// External ID of the contact
UniqueExternalID string `json:"unique_external_id,omitempty"`
// Additional emails associated with the contact
OtherEmails []string `json:"other_emails,omitempty"`
// IDs of the companies associated with the contact
CompanyIDs int64 `json:"company_ids,omitempty"`
}
func (*ContactMerge) String ¶
func (cm *ContactMerge) String() string
type ContactState ¶
type ContactState string
const ( ContactStateBlocked ContactState = "blocked" ContactStateDeleted ContactState = "deleted" ContactStateUnverified ContactState = "unverified" ContactStateVerified ContactState = "verified" )
type ContactUpdate ¶
type ContactUpdate = ContactCreate
type ContactsMerge ¶
type ContactsMerge struct {
// ID of the primary contact
PrimaryContactID int64 `json:"primary_contact_id,omitempty"`
// Array of numbers IDs of contacts to be merged
SecondaryContactIDs []int64 `json:"secondary_contact_ids,omitempty"`
// Contains attributes that need to be updated in the primary contact during merge (optional)
// email, phone, mobile, twitter_id, unique_external_id, other_emails, company_ids
Contact *ContactMerge `json:"contact,omitempty"`
}
func (*ContactsMerge) String ¶
func (cm *ContactsMerge) String() string
type Conversation ¶
type Conversation struct {
// ID of the conversation
ID int64 `json:"id,omitempty"`
// Attachments (Updatable) associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Body (Updatable) Content of the conversation in HTML
Body string `json:"body,omitempty"`
// Content of the conversation in plain text
BodyText string `json:"body_text,omitempty"`
// Set to true if a particular conversation should appear as being created from outside (i.e., not through web portal)
Incoming bool `json:"incoming,omitempty"`
// Set to true if the note is private
Private bool `json:"private,omitempty"`
// Denotes the type of the conversation.
Source ConversationSource `json:"source,omitempty"`
// Email address from which the reply is sent. For notes, this value will be null.
SupportEmail string `json:"support_email,omitempty"`
// Thread ID undocument
ThreadID int64 `json:"thread_id,omitempty"`
// Thread Message ID undocument
ThreadMessageID int64 `json:"thread_message_id,omitempty"`
// ID of the ticket to which this conversation is being added
TicketID int64 `json:"ticket_id,omitempty"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
// Timestamp when the conversation last edited
LastEditedAt *Time `json:"last_edited_at,omitempty"`
// ID of the agent who has last edited the conversation
LastEditedUserID int64 `json:"last_edited_user_id,omitempty"`
// The email address from which the reply is sent.
FromEmail string `json:"from_email,omitempty"`
// Email addresses of agents/users who need to be notified about this conversation
ToEmails []string `json:"to_emails,omitempty"`
// Email address added in the 'cc' field of the outgoing ticket email.
CcEmails []string `json:"cc_emails,omitempty"`
// Email address added in the 'bcc' field of the outgoing ticket email.
BccEmails []string `json:"bcc_emails,omitempty"`
NotifiedTos []string `json:"notified_to,omitempty"`
// Conversation creation timestamp
CreatedAt Time `json:"created_at,omitempty"`
// Conversation updated timestamp
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*Conversation) String ¶
func (c *Conversation) String() string
type ConversationSource ¶
type ConversationSource int
const ( ConversationSourceReply ConversationSource = 0 ConversationSourceNote ConversationSource = 2 ConversationSourceTweets ConversationSource = 5 ConversationSourceSurveyFeedback ConversationSource = 6 ConversationSourceFacebookPost ConversationSource = 7 ConversationSourceForwardedEmail ConversationSource = 8 ConversationSourcePhone ConversationSource = 9 ConversationSourceECommerce ConversationSource = 11 )
func ParseConversationSource ¶
func ParseConversationSource(s string) ConversationSource
func (ConversationSource) String ¶
func (cs ConversationSource) String() string
type ExportFields ¶
type ExportFields struct {
DefaultFields []string `json:"default_fields,omitempty"`
CustomFields []string `json:"custom_fields,omitempty"`
}
func (*ExportFields) String ¶
func (ef *ExportFields) String() string
type ExportOption ¶
type ExportOption struct {
Fields *ExportFields `json:"fields,omitempty"`
}
func (*ExportOption) String ¶
func (eo *ExportOption) String() string
type FieldError ¶
type FieldError = fresh.FieldError
type FilterContactsOption ¶
type FilterContactsOption = FilterOption
type FilterContactsResult ¶
type FilterOption ¶
func (*FilterOption) IsNil ¶
func (fo *FilterOption) IsNil() bool
func (*FilterOption) Values ¶
func (fo *FilterOption) Values() Values
type FilterTicketsOption ¶
type FilterTicketsOption = FilterOption
type FilterTicketsResult ¶
type Folder ¶
type Folder struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ParentFolderID int64 `json:"parent_folder_id,omitempty"`
// Parent category and folders in which the folder is placed
Hierarchy []map[string]any `json:"hierarchy,omitempty"`
// Number of articles present inside a folder
ArticlesCount int `json:"articles_count,omitempty"`
// Number of folders present inside a folder
SubFoldersCount int `json:"sub_folders_count,omitempty"`
// Accessibility of this folder. Please refer to Folder Properties table.
Visibility FolderVisibility `json:"visibility,omitempty"`
// IDs of the companies to whom this solution folder is visible
CompanyIDs []int64 `json:"company_ids,omitempty"`
// IDs of the contact segments to whom this solution folder is visible
ContactSegmentIDs []int64 `json:"contact_segment_ids,omitempty"`
// IDs of the company segments to whom this solution folder is visible
CompanySegmentIDs []int64 `json:"company_segment_ids,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type FolderCreate ¶
type FolderCreate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ParentFolderID int64 `json:"parent_folder_id,omitempty"`
// Accessibility of this folder. Please refer to Folder Properties table.
Visibility FolderVisibility `json:"visibility,omitempty"`
// IDs of the companies to whom this solution folder is visible
CompanyIDs []int64 `json:"company_ids,omitempty"`
// IDs of the contact segments to whom this solution folder is visible
ContactSegmentIDs []int64 `json:"contact_segment_ids,omitempty"`
// IDs of the company segments to whom this solution folder is visible
CompanySegmentIDs []int64 `json:"company_segment_ids,omitempty"`
}
func (*FolderCreate) String ¶
func (f *FolderCreate) String() string
type FolderUpdate ¶
type FolderUpdate = FolderCreate
type FolderVisibility ¶
type FolderVisibility int
const ( FolderVisibilityAllUsers FolderVisibility = 1 FolderVisibilityLoggedInUsers FolderVisibility = 2 FolderVisibilityAgents FolderVisibility = 3 FolderVisibilitySelectedCompanies FolderVisibility = 4 FolderVisibilityBots FolderVisibility = 5 FolderVisibilitySelectedContactSegments FolderVisibility = 6 FolderVisibilitySelectedCompanySegments FolderVisibility = 7 )
func ParseFolderVisibility ¶
func ParseFolderVisibility(s string) FolderVisibility
func (FolderVisibility) String ¶
func (fv FolderVisibility) String() string
type ForwardResult ¶
type ForwardResult struct {
ID int64 `json:"id,omitempty"`
Body string `json:"body,omitempty"`
BodyText string `json:"body_text,omitempty"`
UserID int64 `json:"user_id,omitempty"`
Incoming bool `json:"incoming,omitempty"`
Private bool `json:"private,omitempty"`
SupportEmail string `json:"support_email,omitempty"`
Source int `json:"source,omitempty"`
Category int `json:"category,omitempty"`
TicketID int64 `json:"ticket_id,omitempty"`
FromEmail string `json:"from_email,omitempty"`
ToEmails []string `json:"to_emails,omitempty"`
CcEmails []string `json:"cc_emails,omitempty"`
BccEmails []string `json:"bcc_emails,omitempty"`
EmailFailureCount int `json:"email_failure_count,omitempty"`
OutgoingFailures string `json:"outgoing_failures,omitempty"`
Deleted bool `json:"deleted,omitempty"`
LastEditedAt *Time `json:"last_edited_at,omitempty"`
LastEditedUserID int64 `json:"last_edited_user_id,omitempty"`
Attachments []*Attachment `json:"attachments,omitempty"`
CloudFiles []string `json:"cloud_files,omitempty"`
HasQuotedText bool `json:"has_quoted_text,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*ForwardResult) String ¶
func (fr *ForwardResult) String() string
type Group ¶
type Group struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
// Array of agent user IDs separated by commas. Instructions on finding an agent's user ID can be found here.
AgentIDs []int64 `json:"agent_ids,omitempty"`
// Describes the type of automatic ticket assignment set for the group. Automatic ticket assignment is only available on certain plans.
AutoTicketAssign AutoTicketAssign `json:"auto_ticket_assign,omitempty"`
// Unique ID of the business hour associated with the group
BusinessHourID int64 `json:"business_hour_id,omitempty"`
// The ID of the user to whom an escalation email is sent if a ticket is unassigned. To create/update a group with an escalate_to value of 'none', please set the value of this parameter to 'null'
EscalateTo int64 `json:"escalate_to,omitempty"`
// The time after which an escalation email is sent if a ticket remains unassigned. The accepted values are "30m" for 30 minutes, "1h" for 1 hour, "2h" for 2 hours, "4h" for 4 hours, "8h" for 8 hours, "12h" for 12 hours, "1d" for 1 day, "2d" for 2 days, and "3d" for 3 days
UnassignedFor GroupUnassignedFor `json:"unassigned_for,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type GroupCreate ¶
type GroupCreate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
// Array of agent user IDs separated by commas. Instructions on finding an agent's user ID can be found here.
AgentIDs []int64 `json:"agent_ids,omitempty"`
// Describes the type of automatic ticket assignment set for the group. Automatic ticket assignment is only available on certain plans.
AutoTicketAssign AutoTicketAssign `json:"auto_ticket_assign,omitempty"`
// The ID of the user to whom an escalation email is sent if a ticket is unassigned. To create/update a group with an escalate_to value of 'none', please set the value of this parameter to 'null'
EscalateTo int64 `json:"escalate_to,omitempty"`
// The time after which an escalation email is sent if a ticket remains unassigned. The accepted values are "30m" for 30 minutes, "1h" for 1 hour, "2h" for 2 hours, "4h" for 4 hours, "8h" for 8 hours, "12h" for 12 hours, "1d" for 1 day, "2d" for 2 days, and "3d" for 3 days
UnassignedFor GroupUnassignedFor `json:"unassigned_for,omitempty"`
}
func (*GroupCreate) String ¶
func (g *GroupCreate) String() string
type GroupUnassignedFor ¶
type GroupUnassignedFor string
type GroupUpdate ¶
type GroupUpdate = GroupCreate
type Job ¶
type Job struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
DownloadURL string `json:"download_url,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
StatusUpdatedAt Time `json:"status_updated_at,omitempty"`
Progress int `json:"progress,omitempty"`
}
func (*Job) IsCompleted ¶
func (*Job) IsInProgress ¶
type ListAgentsOption ¶
type ListAgentsOption struct {
Email string
Mobile string
Phone string
State AgentState // [fulltime/occasional]
Page int
PerPage int
}
func (*ListAgentsOption) IsNil ¶
func (lao *ListAgentsOption) IsNil() bool
func (*ListAgentsOption) Values ¶
func (lao *ListAgentsOption) Values() Values
type ListAutomationRulesOption ¶
type ListAutomationRulesOption = PageOption
type ListCompaniesOption ¶
type ListCompaniesOption = PageOption
type ListContactsOption ¶
type ListContactsOption struct {
Email string
Mobile string
Phone string
UniqueExternalID string
CompanyID int64
UpdatedSince Time
State ContactState // [blocked/deleted/unverified/verified]
Page int
PerPage int
}
func (*ListContactsOption) IsNil ¶
func (lco *ListContactsOption) IsNil() bool
func (*ListContactsOption) Values ¶
func (lco *ListContactsOption) Values() Values
type ListConversationsOption ¶
type ListConversationsOption = PageOption
PerPage: 1 ~ 100, default: 30
type ListGroupsOption ¶
type ListGroupsOption = PageOption
type ListOption ¶
type ListOption = fresh.ListOption
type ListProductsOption ¶
type ListProductsOption = PageOption
type ListRolesOption ¶
type ListRolesOption = PageOption
type ListTicketsOption ¶
type ListTicketsOption struct {
Filter string // The various filters available are new_and_my_open, watching, spam, deleted.
RequestID int64
Email string
UniqueExternalID string
CompanyID int64
UpdatedSince Time
Include string // stats, requester, description
OrderBy TicketOrderBy // created_at, due_by, updated_at, status
OrderType OrderType // asc, desc (default)
Page int
PerPage int
}
func (*ListTicketsOption) IsNil ¶
func (lto *ListTicketsOption) IsNil() bool
func (*ListTicketsOption) Values ¶
func (lto *ListTicketsOption) Values() Values
type ListTimeEntriesOption ¶
type ListTimeEntriesOption struct {
CompanyID int64
AgentID int64
ExecutedAfter *Time
ExecutedBefore *Time
Billable TimeEntryBillable
Page int
PerPage int
}
func (*ListTimeEntriesOption) IsNil ¶
func (lteo *ListTimeEntriesOption) IsNil() bool
func (*ListTimeEntriesOption) Values ¶
func (lteo *ListTimeEntriesOption) Values() Values
type Note ¶
type Note struct {
ID int64 `json:"id,omitempty"`
TicketID int64 `json:"ticket_id,omitempty"`
// Attachments associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
BodyText string `json:"body_text,omitempty"`
// Set to true if a particular conversation should appear as being created from outside (i.e., not through web portal)
Incoming bool `json:"incoming"`
SupportEmail string `json:"support_email,omitempty"`
// Email addresses of agents/users who need to be notified about this note
NotifyEmails []string `json:"notify_emails,omitempty"`
NotifiedTos []string `json:"notified_to,omitempty"`
// Set to true if the note is private. The default value is true.
Private bool `json:"private"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
// Note creation timestamp
CreatedAt Time `json:"created_at,omitempty"`
// Note updated timestamp
UpdatedAt Time `json:"updated_at,omitempty"`
}
type NoteCreate ¶
type NoteCreate struct {
// Attachments associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
// Set to true if a particular conversation should appear as being created from outside (i.e., not through web portal)
Incoming bool `json:"incoming"`
// Email addresses of agents/users who need to be notified about this note
NotifyEmails []string `json:"notify_emails,omitempty"`
// Set to true if the note is private. The default value is true.
Private bool `json:"private"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
}
func (*NoteCreate) AddAttachment ¶
func (n *NoteCreate) AddAttachment(path string, data ...[]byte)
func (*NoteCreate) Files ¶
func (n *NoteCreate) Files() Files
func (*NoteCreate) String ¶
func (n *NoteCreate) String() string
func (*NoteCreate) Values ¶
func (n *NoteCreate) Values() Values
type NoteUpdate ¶
type NoteUpdate struct {
// Attachments associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
}
func (*NoteUpdate) AddAttachment ¶
func (n *NoteUpdate) AddAttachment(path string, data ...[]byte)
func (*NoteUpdate) Files ¶
func (n *NoteUpdate) Files() Files
func (*NoteUpdate) String ¶
func (n *NoteUpdate) String() string
func (*NoteUpdate) Values ¶
func (n *NoteUpdate) Values() Values
type OtherCompany ¶
type OutboundEmail ¶
type OutboundEmail struct {
// Name of the requester
Name string `json:"name,omitempty"`
// Email address of the requester. If no contact exists with this email address in Freshdesk, it will be added as a new contact.
Email string `json:"email,omitempty"`
// Helps categorize the ticket according to the different kinds of issues your support team deals with.
Type string `json:"type,omitempty"`
// Status of the ticket
Status TicketStatus `json:"status,omitempty"`
// Priority of the ticket
Priority TicketPriority `json:"priority,omitempty"`
// Subject of the ticket
Subject string `json:"subject,omitempty"`
// HTML content of the ticket
Description string `json:"description,omitempty"`
// Tags that have been associated with the ticket
Tags *[]string `json:"tags,omitempty"`
// Ticket attachments. The total size of these attachments cannot exceed 15MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Timestamp that denotes when the ticket is due to be resolved
DueBy *Time `json:"due_by,omitempty"`
// Timestamp that denotes when the first response is due
FrDueBy *Time `json:"fr_due_by,omitempty"`
// ID of email config which is used for this ticket. (i.e., support@yourcompany.com/sales@yourcompany.com)
EmailConfigID int64 `json:"email_config_id,omitempty"`
// ID of the group to which the ticket has been assigned
GroupID int64 `json:"group_id,omitempty"`
}
func (*OutboundEmail) AddAttachment ¶
func (t *OutboundEmail) AddAttachment(path string, data ...[]byte)
func (*OutboundEmail) Files ¶
func (t *OutboundEmail) Files() Files
func (*OutboundEmail) String ¶
func (t *OutboundEmail) String() string
func (*OutboundEmail) Values ¶
func (t *OutboundEmail) Values() Values
type PageOption ¶
type PageOption = fresh.PageOption
type Product ¶
type Reply ¶
type Reply struct {
ID int64 `json:"id,omitempty"`
TicketID int64 `json:"ticket_id,omitempty"`
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
BodyText string `json:"body_text,omitempty"`
// Attachments associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// The email address from which the reply is sent. By default the global support email will be used.
FromEmail string `json:"from_email,omitempty"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
// Email address added in the 'cc' field of the outgoing ticket email.
CcEmails []string `json:"cc_emails,omitempty"`
// Email address added in the 'bcc' field of the outgoing ticket email.
BccEmails []string `json:"bcc_emails,omitempty"`
RepliedTos []string `json:"replied_to,omitempty"`
// Reply creation timestamp
CreatedAt Time `json:"created_at,omitempty"`
// Reply updated timestamp
UpdatedAt Time `json:"updated_at,omitempty"`
}
type ReplyCreate ¶
type ReplyCreate struct {
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
// Attachments associated with the conversation. The total size of all of a ticket's attachments cannot exceed 20MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// The email address from which the reply is sent. By default the global support email will be used.
FromEmail string `json:"from_email,omitempty"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
// Email address added in the 'cc' field of the outgoing ticket email.
CcEmails []string `json:"cc_emails,omitempty"`
// Email address added in the 'bcc' field of the outgoing ticket email.
BccEmails []string `json:"bcc_emails,omitempty"`
}
func (*ReplyCreate) AddAttachment ¶
func (r *ReplyCreate) AddAttachment(path string, data ...[]byte)
func (*ReplyCreate) Files ¶
func (r *ReplyCreate) Files() Files
func (*ReplyCreate) String ¶
func (r *ReplyCreate) String() string
func (*ReplyCreate) Values ¶
func (r *ReplyCreate) Values() Values
type ReplyForward ¶
type ReplyForward struct {
// Content of the conversation in HTML
Body string `json:"body,omitempty"`
// Content of the conversation in plain text
BodyText string `json:"body_text,omitempty"`
// ID of the agent/user who is adding the conversation
UserID int64 `json:"user_id,omitempty"`
// ID of the ticket to which this conversation is being added
TicketID int64 `json:"ticket_id,omitempty"`
// Emails to which the reply is addressed
ToEmails []string `json:"to_emails,omitempty"`
}
func (*ReplyForward) String ¶
func (rf *ReplyForward) String() string
type ResultError ¶
type ResultError = fresh.ResultError
type Role ¶
type Role struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
// Set to true if this is the default role
Default bool `json:"default,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
type Ticket ¶
type Ticket struct {
// Parent Unique ID of the ticket
ParentID int64 `json:"parent_id,omitempty"`
// Unique ID of the ticket
ID int64 `json:"id,omitempty"`
// Name of the requester
Name string `json:"name,omitempty"`
// Email address of the requester. If no contact exists with this email address in Freshdesk, it will be added as a new contact.
Email string `json:"email,omitempty"`
// Phone number of the requester. If no contact exists with this phone number in Freshdesk, it will be added as a new contact. If the phone number is set and the email address is not, then the name attribute is mandatory.
Phone string `json:"phone,omitempty"`
// Facebook ID of the requester. A contact should exist with this facebook_id in Freshdesk.
FacebookID string `json:"facebook_id,omitempty"`
// Twitter handle of the requester. If no contact exists with this handle in Freshdesk, it will be added as a new contact.
TwitterID string `json:"twitter_id,omitempty"`
// External ID of the requester. If no contact exists with this external ID in Freshdesk, they will be added as a new contact.
UniqueExternalID string `json:"unique_external_id,omitempty"`
// User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
RequesterID int64 `json:"requester_id,omitempty"`
// ID of the agent to whom the ticket has been assigned.
ResponderID int64 `json:"responder_id,omitempty"`
// Helps categorize the ticket according to the different kinds of issues your support team deals with.
Type string `json:"type,omitempty"`
// Status of the ticket
Status TicketStatus `json:"status,omitempty"`
// Priority of the ticket
Priority TicketPriority `json:"priority,omitempty"`
// The channel through which the ticket was created
Source TicketSource `json:"source,omitempty"`
// Set to true if the ticket has been deleted/trashed. Deleted tickets will not be displayed in any views except the "deleted" filter
Deleted bool `json:"deleted,omitempty"`
// Set to true if the ticket has been marked as spam
Spam bool `json:"spam,omitempty"`
// Timestamp that denotes when the ticket is due to be resolved
DueBy *Time `json:"due_by,omitempty"`
// Timestamp that denotes when the first response is due
FrDueBy *Time `json:"fr_due_by,omitempty"`
// Set to true if the ticket has been escalated for any reason
IsEscalated bool `json:"is_escalated,omitempty"`
// Set to true if the ticket has been escalated as the result of first response time being breached
FrEscalated bool `json:"fr_escalated,omitempty"`
// Email addresses to which the ticket was originally sent
ToEmails []string `json:"to_emails,omitempty"`
// Email address added in the 'cc' field of the incoming ticket email
CcEmails []string `json:"cc_emails,omitempty"`
// Email address(e)s added while forwarding a ticket
FwdEmails []string `json:"fwd_emails,omitempty"`
// Email address added while replying to a ticket
ReplyCcEmails []string `json:"reply_cc_emails,omitempty"`
// ID of email config which is used for this ticket. (i.e., support@yourcompany.com/sales@yourcompany.com)
EmailConfigID int64 `json:"email_config_id,omitempty"`
// ID of the product to which the ticket is associated
ProductID int64 `json:"product_id,omitempty"`
// ID of the group to which the ticket has been assigned
GroupID int64 `json:"group_id,omitempty"`
// ID of the company to which this ticket belongs
CompanyID int64 `json:"company_id,omitempty"`
// Subject of the ticket
Subject string `json:"subject,omitempty"`
// HTML content of the ticket
Description string `json:"description,omitempty"`
// Content of the ticket in plain text
DescriptionText string `json:"description_text,omitempty"`
// Tags that have been associated with the ticket
Tags []string `json:"tags,omitempty"`
// Ticket attachments. The total size of these attachments cannot exceed 15MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// include=requester
Requester *Contact `json:"requester,omitempty"`
// include=conversations
Conversations []*Conversation `json:"conversations,omitempty"`
// ID of the internal agent which the ticket should be assigned with
InternalAgentID int64 `json:"internal_agent_id,omitempty"`
// ID of the internal group to which the ticket should be assigned with
InternalGroupID int64 `json:"internal_group_id,omitempty"`
// Ticket creation timestamp
CreatedAt Time `json:"created_at,omitempty"`
// Ticket updated timestamp
UpdatedAt Time `json:"updated_at,omitempty"`
}
type TicketCreate ¶
type TicketCreate struct {
// Name of the requester
Name string `json:"name,omitempty"`
// User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
RequesterID int64 `json:"requester_id,omitempty"`
// Email address of the requester. If no contact exists with this email address in Freshdesk, it will be added as a new contact.
Email string `json:"email,omitempty"`
// Phone number of the requester. If no contact exists with this phone number in Freshdesk, it will be added as a new contact. If the phone number is set and the email address is not, then the name attribute is mandatory.
Phone string `json:"phone,omitempty"`
// Facebook ID of the requester. A contact should exist with this facebook_id in Freshdesk.
FacebookID string `json:"facebook_id,omitempty"`
// Twitter handle of the requester. If no contact exists with this handle in Freshdesk, it will be added as a new contact.
TwitterID string `json:"twitter_id,omitempty"`
// External ID of the requester. If no contact exists with this external ID in Freshdesk, they will be added as a new contact.
UniqueExternalID string `json:"unique_external_id,omitempty"`
// ID of the agent to whom the ticket has been assigned.
ResponderID int64 `json:"responder_id,omitempty"`
// Helps categorize the ticket according to the different kinds of issues your support team deals with.
Type string `json:"type,omitempty"`
// Status of the ticket
Status TicketStatus `json:"status,omitempty"`
// Priority of the ticket
Priority TicketPriority `json:"priority,omitempty"`
// The channel through which the ticket was created
Source TicketSource `json:"source,omitempty"`
// Subject of the ticket
Subject string `json:"subject,omitempty"`
// HTML content of the ticket
Description string `json:"description,omitempty"`
// Tags that have been associated with the ticket
Tags *[]string `json:"tags,omitempty"`
// Ticket attachments. The total size of these attachments cannot exceed 15MB.
Attachments []*Attachment `json:"attachments,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Timestamp that denotes when the ticket is due to be resolved
DueBy *Time `json:"due_by,omitempty"`
// Timestamp that denotes when the first response is due
FrDueBy *Time `json:"fr_due_by,omitempty"`
// Email address added in the 'cc' field of the incoming ticket email
CcEmails []string `json:"cc_emails,omitempty"`
// ID of email config which is used for this ticket. (i.e., support@yourcompany.com/sales@yourcompany.com)
EmailConfigID int64 `json:"email_config_id,omitempty"`
// ID of the group to which the ticket has been assigned
GroupID int64 `json:"group_id,omitempty"`
// Parent Unique ID of the ticket
ParentID int64 `json:"parent_id,omitempty"`
// ID of the product to which the ticket is associated
ProductID int64 `json:"product_id,omitempty"`
// ID of the company to which this ticket belongs
CompanyID int64 `json:"company_id,omitempty"`
// ID of the internal agent which the ticket should be assigned with
InternalAgentID int64 `json:"internal_agent_id,omitempty"`
// ID of the internal group to which the ticket should be assigned with
InternalGroupID int64 `json:"internal_group_id,omitempty"`
// This attribute for tickets can only be set if the Custom Objects feature is enabled. The value can either be in the form of the display_id (record id) or primary_field_value (user defined record value). The default value is display_id.
LookupParameter string `json:"lookup_parameter,omitempty"`
}
func (*TicketCreate) AddAttachment ¶
func (t *TicketCreate) AddAttachment(path string, data ...[]byte)
func (*TicketCreate) Files ¶
func (t *TicketCreate) Files() Files
func (*TicketCreate) String ¶
func (t *TicketCreate) String() string
func (*TicketCreate) Values ¶
func (t *TicketCreate) Values() Values
type TicketField ¶
type TicketField struct {
ID int64 `json:"id,omitempty"`
// Name of the ticket field.
Name string `json:"name,omitempty"`
// Label of the field for display
Label string `json:"label,omitempty"`
// Description of the field
Description string `json:"description,omitempty"`
// True if the field is a not a custom field.
Default bool `json:"default,omitempty"`
// Position in which the ticket field is displayed in the form
Position int `json:"field_type,omitempty"`
// For custom ticket fields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// True if the field is marked mandatory while closing the Release item
RequiredForClosure bool `json:"required_for_closure,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// Set to true if the field is mandatory in the customer portal
RequiredForCustomers bool `json:"required_for_customer,omitempty"`
// Display name for the field (as seen in the customer portal)
LabelForCustomers string `json:"label_for_customers,omitempty"`
// Set to true if the field can be updated by customers
CustomersCanEdit bool `json:"customers_can_edit,omitempty"`
// Set to true if the field is displayed in the customer portal
DisplayedToCustomers bool `json:"displayed_to_customers,omitempty"`
// Applicable only for the requester field. Set to true if customer can add additional requesters to a ticket
PortalCc bool `json:"portal_cc,omitempty"`
// Applicable only if portal_cc is set to true. Value will be all when a customer can add any requester to the CC list and company when a customer can add only company contacts to the CC list
PortalCcTo string `json:"portal_cc_to,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
// Applicable only for dependent fields, this contains details of nested fields
DependentFields any `json:"dependent_fields,omitempty"`
// Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of
SectionMappings any `json:"SectionMappings,omitempty"`
// True if the Ticket field is inside FSM section (Applicable only if FSM is enabled)
IsFsm bool `json:"is_fsm,omitempty"`
// True if the choice update is in progress (Applicable for the fields which has 100+ choices)
FieldUpdateInProgress bool `json:"field_update_in_progress,omitempty"`
CreatedAt Time `json:"created_at,omitempty"`
UpdatedAt Time `json:"updated_at,omitempty"`
}
func (*TicketField) String ¶
func (tf *TicketField) String() string
type TicketFieldCreate ¶
type TicketFieldCreate struct {
// Label of the field for display
Label string `json:"label,omitempty"`
// For custom ticket fields, The type of value associated with the field will be given (Examples custom_date, custom_text...)
Type string `json:"type,omitempty"`
// Position in which the ticket field is displayed in the form
Position int `json:"field_type,omitempty"`
// True if the field is marked mandatory while closing the Release item
RequiredForClosure bool `json:"required_for_closure,omitempty"`
// Set to true if the field is mandatory for Agents
RequiredForAgents bool `json:"required_for_agents,omitempty"`
// Set to true if the field is mandatory in the customer portal
RequiredForCustomers bool `json:"required_for_customer,omitempty"`
// Display name for the field (as seen in the customer portal)
LabelForCustomers string `json:"label_for_customers,omitempty"`
// Set to true if the field can be updated by customers
CustomersCanEdit bool `json:"customers_can_edit,omitempty"`
// Set to true if the field is displayed in the customer portal
DisplayedToCustomers bool `json:"displayed_to_customers,omitempty"`
// List of values supported by the field.
Choices any `json:"choices,omitempty"`
// Applicable only for dependent fields, this contains details of nested fields
DependentFields any `json:"dependent_fields,omitempty"`
// Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of
SectionMappings any `json:"SectionMappings,omitempty"`
}
func (*TicketFieldCreate) String ¶
func (tf *TicketFieldCreate) String() string
type TicketFieldUpdate ¶
type TicketFieldUpdate = TicketFieldCreate
type TicketForward ¶
type TicketForward struct {
// Content of the note in HTML format
Body string `json:"body,omitempty"`
// Content of the note in plain text
BodyText string `json:"body_text,omitempty"`
// ID of the forwarded note
ID int64 `json:"id,omitempty"`
// Set to true if a particular conversation should appear as being created from outside (i.e., not through web portal)
Incoming bool `json:"incoming,omitempty"`
// Set to true if the note is private
Private bool `json:"private,omitempty"`
// ID of the agent/user who is forwarding the ticket
UserID int64 `json:"user_id,omitempty"`
// Email address from which the reply is sent. For notes, this value will be null.
SupportEmail string `json:"support_email,omitempty"`
// Denotes the type of the conversation.
Source int `json:"source,omitempty"`
// ID of the ticket to which this conversation is being added
TicketID int64 `json:"ticket_id,omitempty"`
// Include the quoted text conversations in the forwarded email. The default value is True.
IncludeQuotedText bool `json:"include_quoted_text"`
// Include the ticket attachments in the forwarded email. The default value is True.
IncludeOriginalAttachments bool `json:"include_original_attachments"`
// The email address from which the forward is sent. By default the global support email will be used.
FromEmail string `json:"from_email,omitempty"`
// Emails to which the ticket gets forwarded
ToEmails []string `json:"to_emails,omitempty"`
// Email address added in the 'cc' field of the outgoing forward email.
CcEmails []string `json:"cc_emails,omitempty"`
// Email address added in the 'bcc' field of the outgoing forward email.
BccEmails []string `json:"bcc_emails,omitempty"`
}
func (*TicketForward) String ¶
func (tf *TicketForward) String() string
type TicketOrderBy ¶
type TicketOrderBy string
type TicketPriority ¶
type TicketPriority int
func ParseTicketPriority ¶
func ParseTicketPriority(s string) TicketPriority
func (TicketPriority) String ¶
func (tp TicketPriority) String() string
type TicketProperties ¶
type TicketProperties struct {
// Support email from which the reply should be sent
FromEmail string `json:"from_email,omitempty"`
// Used to skip email notifications sent to requesters on closing a ticket
SkipCloseNotification bool `json:"skip_close_notification"`
// ID of email config which is used for this ticket. (i.e., support@yourcompany.com/sales@yourcompany.com)
EmailConfigID int64 `json:"email_config_id,omitempty"`
// ID of the group to which the ticket has been assigned
GroupID int64 `json:"group_id,omitempty"`
// Priority of the ticket
Priority TicketPriority `json:"priority,omitempty"`
// Parent Unique ID of the ticket
ParentID int64 `json:"parent_id,omitempty"`
// User ID of the requester. For existing contacts, the requester_id can be passed instead of the requester's email.
RequesterID int64 `json:"requester_id,omitempty"`
// ID of the agent to whom the ticket has been assigned.
ResponderID int64 `json:"responder_id,omitempty"`
// Status of the ticket
Status TicketStatus `json:"status,omitempty"`
// The channel through which the ticket was created
Source TicketSource `json:"source,omitempty"`
// Helps categorize the ticket according to the different kinds of issues your support team deals with.
Type string `json:"type,omitempty"`
// ID of the product to which the ticket is associated
ProductID int64 `json:"product_id,omitempty"`
// Timestamp that denotes when the ticket is due to be resolved
DueBy *Time `json:"due_by,omitempty"`
// Timestamp that denotes when the first response is due
FrDueBy *Time `json:"fr_due_by,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Tags that have been associated with the ticket
Tags *[]string `json:"tags,omitempty"`
// ID of the internal agent which the ticket should be assigned with
InternalAgentID int64 `json:"internal_agent_id,omitempty"`
// ID of the internal group to which the ticket should be assigned with
InternalGroupID int64 `json:"internal_group_id,omitempty"`
}
func (*TicketProperties) String ¶
func (tp *TicketProperties) String() string
type TicketSource ¶
type TicketSource int
func ParseTicketSource ¶
func ParseTicketSource(s string) TicketSource
func (TicketSource) String ¶
func (ts TicketSource) String() string
type TicketStatus ¶
type TicketStatus int
func ParseTicketStatus ¶
func ParseTicketStatus(s string) TicketStatus
func (TicketStatus) String ¶
func (ts TicketStatus) String() string
type TicketUpdate ¶
type TicketUpdate = TicketCreate
type TicketWatchers ¶
type TicketWatchers struct {
WatcherIDs []int64 `json:"watcher_ids,omitempty"`
}
func (*TicketWatchers) String ¶
func (tw *TicketWatchers) String() string
type TicketsMerge ¶
type TicketsMerge struct {
// Ticket to which conversations from secondary tickets will be merged
PrimaryID int64 `json:"primary_id,omitempty"`
// Array of numbers IDs of tickets to be merged
TicketIDs []int64 `json:"ticket_ids,omitempty"`
// This contains the note added to the primary ticket along with the type of the note (public/private). A default note gets added if this is not specified in the request
NoteInPrimary *Note `json:"note_in_primary,omitempty"`
// This contains the note added to the secondary tickets along with the type of the note (public/private). A default note gets added if this is not specified in the request
NoteInSecondary *Note `json:"note_in_secondary,omitempty"`
// This will add recipients from secondary tickets in CC of the primary ticket
ConvertRecepientsToCc bool `json:"convert_recepients_to_cc,omitempty"` //nolint: misspell
}
func (*TicketsMerge) String ¶
func (tm *TicketsMerge) String() string
type TimeEntry ¶
type TimeEntry struct {
// Id of the time entry
ID int64 `json:"id,omitempty"`
// Boolean Set as true if the time-entry is billable
Billable bool `json:"billable"`
// Set to true if timer is currently running
TimerRunning bool `json:"timer_running"`
// The total amount of time spent by the timer in hh::mm format.
// This field cannot be set if timer_running is true.
// Mandatory if timer_running is false
TimeSpent TimeSpent `json:"time_spent,omitempty"`
// Description of the time-entry
Note string `json:"note,omitempty"`
// The user/agent to whom this time-entry is assigned
AgentID int64 `json:"agent_id,omitempty"`
// The ID of the ticket to which this time entry is associated
TicketID int64 `json:"ticket_id,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Time at which this time-entry was added/created
ExecutedAt Time `json:"executed_at,omitempty"`
// The time at which the time-entry is added. If a timer, which is in stopped state, is started again, this holds date_time at which the timer is started again
StartTime Time `json:"start_time,omitempty"`
// Ticket creation timestamp
CreatedAt Time `json:"created_at,omitempty"`
// Ticket updated timestamp
UpdatedAt Time `json:"updated_at,omitempty"`
}
type TimeEntryBillable ¶
type TimeEntryBillable string
const ( TimeEntryBillableTrue TimeEntryBillable = "true" TimeEntryBillableFalse TimeEntryBillable = "false" TimeEntryBillableALL TimeEntryBillable = "" )
type TimeEntryCreate ¶
type TimeEntryCreate struct {
// Boolean Set as true if the time-entry is billable
Billable bool `json:"billable"`
// Set to true if timer is currently running
TimerRunning bool `json:"timer_running"`
// The total amount of time spent by the timer in hh::mm format.
// This field cannot be set if timer_running is true.
// Mandatory if timer_running is false
TimeSpent TimeSpent `json:"time_spent,omitempty"`
// Description of the time-entry
Note string `json:"note,omitempty"`
// The user/agent to whom this time-entry is assigned
AgentID int64 `json:"agent_id,omitempty"`
// Key value pairs containing the names and values of custom fields.
CustomFields map[string]any `json:"custom_fields,omitempty"`
// Time at which this time-entry was added/created
ExecutedAt *Time `json:"executed_at,omitempty"`
// The time at which the time-entry is added. If a timer, which is in stopped state, is started again, this holds date_time at which the timer is started again
StartTime *Time `json:"start_time,omitempty"`
}
func (*TimeEntryCreate) String ¶
func (te *TimeEntryCreate) String() string
type TimeEntryUpdate ¶
type TimeEntryUpdate = TimeEntryCreate
type TimeSpent ¶
func ParseTimeSpent ¶
Source Files
¶
- agent.go
- agents.go
- article.go
- automation.go
- automations.go
- avatar.go
- category.go
- companies.go
- company.go
- company_field.go
- company_fields.go
- contact.go
- contact_field.go
- contact_fields.go
- contacts.go
- conversation.go
- folder.go
- forward.go
- freshdesk.go
- group.go
- groups.go
- job.go
- jobs.go
- note.go
- options.go
- product.go
- products.go
- reply.go
- role.go
- roles.go
- solutions.go
- ticket.go
- ticket_field.go
- ticket_fields.go
- tickets.go
- time_entries.go
- time_entry.go