Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3
typeflat

...

Code Block
languagexml
titlecreateTicket
<freshdesk.createTicket>
    <requesterId>{$ctx:requesterId}</requesterId>
    <email>{$ctx:email}</email>
    <facebookId>{$ctx:facebookId}</facebookId>
    <phone>{$ctx:phone}</phone>
    <twitterId>{$ctx:twitterId}</twitterId>
    <name>{$ctx:name}</name>
    <subject>{$ctx:subject}</subject>
    <type>{$ctx:type}</type>
    <status>{$ctx:status}</status>
    <priority>{$ctx:priority}</priority>
    <customFields>{$ctx:customFields}</customFields>
    <description>{$ctx:description}</description>
    <responderId>{$ctx:responderId}</responderId>
    <ccEmails>{$ctx:ccEmails}</ccEmails>
    <dueBy>{$ctx:dueBy}</dueBy>
    <emailConfigId>{$ctx:emailConfigId}</emailConfigId>
    <frDueBy>{$ctx:frDueBy}</frDueBy>
    <groupId>{$ctx:groupId}</groupId>
    <productId>{$ctx:productId}</productId>
    <source>{$ctx:source}</source>
    <tags>{$ctx:tags}</tags>
</freshdesk.createTicket>
Properties
  • customFields: Pre-defined custom fields as a JSON Object.
  • status: The status of the ticket.
  • subject: The subject of the ticket.
  • emailConfigId: The ID of the email configuration that is used for this ticket.
  • requesterId: The ID of the requester. For existing contacts, requesterId can be passed instead of email.
  • groupId: The ID of the group to which the ticket is assigned.
  • source: The channel through which the ticket was created.
  • email: The email address of the requester. If no contact exists with this email address in FreshDesk, it will be added as a new contact.
  • type: The type of the particular ticket.
  • description: Plain text content of the ticket.
  • priority: The priority of the ticket.
  • ccEmails: The email address specified in the "cc" field of the incoming ticket email.
  • responderId: The ID of the agent to whom the ticket is assigned.
  • name: Name of the requester
  • facebookId: Facebook ID of the requester. If no contact exists with this facebook_id, then a new contact will be created.
  • phone: 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.
  • twitterId: Twitter handle of the requester. If no contact exists with this handle in Freshdesk, it will be added as a new contact.
  • dueBy: Timestamp that denotes when the ticket is due to be resolved
  • productId: ID of the product to which the ticket is associated. It will be ignored if the email_config_id attribute is set in the request.
  • tags: Tags that have been associated with the ticket
Sample request

Following is a sample REST/JSON request that can be handled by the createTicket operation.

...

Code Block
languagexml
titlegetTicket
<freshdesk.getTicket>
	<id>    <ticketId>{$ctx:idticketId}</id>ticketId>
</freshdesk.getTicket> 
Properties
  • idticketId: Required - The unique identifier of the ticket specific to the account.

...

Code Block
languagexml
titleSample Request for getTicket
{
	"apiUrl": "https://virtusaabcwso2yasho.freshdesk.com",
	    "apiKey": "93YthfomLWOf53rxlNgwSODsQllHr0NicsiRpRWw",
	"format":"json",
	"id    "ticketId":"351"
}
Related FreshDesk documentation

http://freshdesk.com/api#view_a_ticket 

Anchor
listTickets
listTickets
Retrieving a list of tickets

The The listTickets operation operation retrieves a list of tickets.

Code Block
languagexml
titlelistTickets
<freshdesk.listTickets>
	<page>
    <predefinedFilters>{$ctx:predefinedFilters}</predefinedFilters>
    <requesterId>{$ctx:pagerequesterId}</page>
	<email>requesterId>
    <updatedSince>{$ctx:emailupdatedSince}</email>updatedSince>
    <requesterId><companyId>{$ctx:requesterIdcompanyId}</requesterId>companyId>
    <filterName><email>{$ctx:filterNameemail}</filterName>email>
    <companyId><page>{$ctx:companyIdpage}</companyId>page>
    <companyName><orderBy>{$ctx:companyNameorderBy}</companyName>orderBy>
    <filterType><orderType>{$ctx:filterTypeorderType}</filterType>
	<viewId>orderType>
    <include>{$ctx:viewIdinclude}</viewId>include>
</freshdesk.listTickets> 
Properties
  • page: The requested page number.
  • email:  The email address.
  • requesterId:  The ID of the requester. For existing contacts, requesterId can be passed instead of email.
  • filterNameupdatedSince:   The name of the filter. Possible values: all_tickets, new_my_open, monitored_by, spam, and deleted.The ticket updated since a specific timestamp.
  • companyId:  The unique identifier of the company.
  • companyNamepredefinedFilters The name of the company.
  • filterType:  The type of the filter. Possible values: defaultfilters, requester, customticketviews, companyname, companyid, and requesteremail.
  • viewId The unique identifier of the viewvarious filters available are new_and_my_openwatchingspamdeleted.
  • orderBy:  Default sort order is created_at
  • include:When getting list of tickets, will get some specific details mentioned here.
  • orderType: Default sort order type is desc.
Sample request

Following is a sample REST/JSON request that can be handled by the  listTickets  operation.

...

Info
titleAdditional Note
  • The filterType parameter can be omitted if you want to retrieve a list of all the tickets without filtering.
  • The API supports a list of endpoints. These endpoints are supported in the connector as described below.

#

Parameter Name

filterType

API Endpoint

filterName

1

requesterId

requester

/helpdesk/tickets/filter/requester/[requester_id]?format=json

Applicable

2

viewId

customticketviews

/helpdesk/tickets/view/[view_id]?format=json

Not Applicable

3

companyName

companyname

/helpdesk/tickets.json?company_name=[name]

Applicable

4

companyId

companyid

/helpdesk/tickets.json?company_id=[id]

Applicable

5

email  

requesteremail

/helpdesk/tickets.json?email=[email]

Applicable

6

filterName

defaultfilters

/helpdesk/tickets/filter/[filter_name]?format=json 

Applicable

7

Not required

(Omit)

/helpdesk/tickets.json

Not Applicable

  • For all filterType values except defaultfilters, the filterName" property can be provided as an optional filter. However, when the filterType value is defaultfilters, the filterName property is mandatory.
Related FreshDesk documentation

http://freshdesk.com/api#view_all_ticket

...

Code Block
languagexml
titleupdateTicket
<freshdesk.updateTicket>
    <customField>{$ctx:customField}</customField>
    <status>{$ctx:status}</status>
    <ownerId>{$ctx:ownerId}</ownerId>
    <urgent>{$ctx:urgent}</urgent>
    <subject>{$ctx:subject}</subject>
    <delta>{$ctx:delta}</delta>
    <emailConfigId>{$ctx:emailConfigId}</emailConfigId>
    <requesterId>{$ctx:requesterId}</requesterId>
    <deleted>{$ctx:deleted}</deleted>
    <productId>{$ctx:productId}</productId>
    <isEscalated>{$ctx:isEscalated}</isEscalated>
    <groupId>{$ctx:groupId}</groupId>
    <toEmails>{$ctx:toEmails}</toEmails>
    <ticketId>{$ctx:ticketId}</ticketId>
    <source>{$ctx:source}</source>
    <frEscalated>{$ctx:frEscalated}</frEscalated>
    <priority>{$ctx:priority}</priority>
    <ticketType>{$ctx:ticketType}</ticketType>
    <responderId>{$ctx:responderId}</responderId>
    <trained>{$ctx:trained}</trained>
	<spam>{$ctx:spam}</spam>
</freshdesk.updateTicket> 
Properties
  • customField: Pre-defined custom fields as a JSON Object.
  • status:The status of the ticket.
  • ownerId:The ID of the owner.
  • urgent:Set to true if the ticket is urgent.
  • subject:The subject of the ticket.
  • delta: Set to either true or false.
  • emailConfigId: The ID of the email configuration that is used for this ticket.
  • requesterId:The ID of the requester. For existing contacts, requesterId can be passed instead of email .
  • deleted: Set to true if the ticket is deleted.
  • productId:The ID of the product.
  • isEscalated:Set to true if an escalation was sent.
  • groupId:The ID of the group to which the ticket is assigned.
  • toEmails:The email address to which the incoming ticket email is sent.
  • ticketId:The unique ID of the ticket.
  • frEscalated: Set to either true or false.
  • priority:The priority of the ticket.
  • ticketType: The type of the particular ticket.
  • responderId:The ID of the agent to whom the ticket is assigned.
  • trained: Set to either true or false.
  • spam:Set to true if the ticket is marked as spam.
Info
titleNote

When you use the updateTicket operation, you need to pass " " if you need to clear the value of any field.

Sample request

Following is a sample REST/JSON request that can be handled by the  updateTicket  operation.

Code Block
languagexml
titleSample Request for updateTicket
{
	"apiUrl":"https://virtusaabc.freshdesk.com",
	"apiKey":"93YthfomLWOf53rxlNgw",
	"format":"json",
	"ticketId":"228",
	"customField":"{}",
	"status":"",
	"ownerId":"",
	"urgent":"",
	"subject":"",
	"delta":"",
	"emailConfigId":"",
	"requesterId":"",
	"deleted":"",
	"productId":"",
	"isEscalated":"",
	"groupId":"",
	"toEmails":"",
	"source":"",
	"frEscalated":"true",
	"priority":"4",
	"ticketType":"fdsf",
	"responderId":" ",
	"trained":"true",
	"spam":""
}
Related FreshDesk documentation

http://freshdesk.com/api#update_ticket_priority

...