Introduction
This API fetches details of all actions performed on a ticket and in the sub-tabs on the ticket detail page.
GET: api/v1/tickets/{ticket_Id}/History
Query Parameters
- from - int - Index number, starting from which the details must be fetched. If you do not specify a value for this key, the default value of 0 is considered.
- limit - int - Number of details to list. The values allowed range from 1 to 50. If you do not specify a value for this key, the default value of 10 is considered.
- eventFilter - string - Key that filters details based on the action performed on the ticket. Values allowed are:
- CommentHistory
- TimeEntryHistory
- AttachmentHistory
- ApprovalHistory
- AssignmentRuleHistory
- NotificationRuleHistory
- WorkflowHistory
- MacroHistory
- SuperviseHistory
- SLAHistory
- BlueprintHistory
- TaskHistory
- CallHistory
- EventHistory
- agentId - long - Key that filters details of actions performed by a particular agent. Value allowed is the agent's ID in Zoho Desk.
- fieldName - string - Key that returns the changes in the value of a particular field. The value of this param should be the API name of the field.
Note: You can include all three filters in a single API call. If you do this, the response will contain history entries that match all three filters.
This API returns data as a JSON array inside a JSON object wrapper. The array contains history entries arranged in descending order of time, which means the latest action on the ticket is displayed first. The following template will give you a visual representation of the response structure.
{
"data": [
{
"eventName": "EventNameEnum",
"eventTime": "DateTime",
"actor": {
"id": "Long",
"name": "String",
"type": "ActorTypeEnum"
},
"source": "SourceEnum",
"eventInfo": [
{
"propertyName": "String",
"propertyValue": "#Value type will vary based on propertyType",
"propertyType": "PropertyTypeEnum",
"systemProperty": "boolean"
}
],
"actorInfo": [
{
"propertyName": "String",
"propertyValue": "#Value type will vary based on propertyType",
"propertyType": "PropertyTypeEnum",
"systemProperty": "boolean"
}
]
}
]
}
The JSON object inside the data array represents a single history entry. The template shows all the keys pertaining to a single history entry and its corresponding value types. Here, the value of the propertyValue key will vary based on the value of propertyType, which is an enumerable constant.
All the keys and enumeration constants used in the template are as follows:
eventName
Key that represents the type of action performed on the ticket. The value of this key is an enumerable constant and the values supported are as follows:
- TicketCreated
- TicketUpdated
- TicketDeleted
- TicketRestored
- TicketCloned
- TicketMergedMaster
- TicketSplitParent
- TicketSplitChild
- TicketArchived
- TicketEscalated
- TicketShared
- TicketShareModeUpdated
- TicketShareRevoked
- ThreadAdded
- ThreadDeleted
- ThreadResent
- CommentAdded
- CommentEdited
- CommentDeleted
- ApprovalSent
- ApprovalApproved
- ApprovalRejected
- FollowersAdded
- FollowersRemoved
- TagsAdded
- TagsRemoved
- AttachmentAdded
- AttachmentUpdated
- AttachmentDeleted
- AttachmentRestored
- AttachmentDeletedRB
- TimeEntryAdded
- TimeEntryUpdated
- TimeEntryDeleted
- TimeEntryRestored
- SecondaryContactsAdded
- SecondaryContactsUpdated
- OvershotDueTime
- BlueprintApplied
- BlueprintRevoked
- BlueprintTransitionPerformed
- BlueprintStateMoved
- CustomFunctionExecuted
- NotificationSent
- CallAdded
- CallUpdated
- CallDeleted
- CallRestored
- CallCommentAdded
- CallCommentEdited
- CallCommentDeleted
- CallTimeEntryAdded
- CallTimeEntryUpdated
- CallTimeEntryDeleted
- CallTimeEntryRestored
- EventAdded
- EventUpdated
- EventDeleted
- EventRestored
- EventCommentAdded
- EventCommentEdited
- EventCommentDeleted
- EventTimeEntryAdded
- EventTimeEntryUpdated
- EventTimeEntryDeleted
- EventTimeEntryRestored
- TaskAdded
- TaskUpdated
- TaskDeleted
- TaskRestored
- TaskCommentAdded
- TaskCommentEdited
- TaskCommentDeleted
- TaskTimeEntryAdded
- TaskTimeEntryUpdated
- TaskTimeEntryDeleted
- TaskTimeEntryRestored
- BugCreated
- BugLinked
- BugDelinked
- InvoiceCreated
- EstimateCreated
- SalesOrderCreated
eventTime
Timestamp value of the time when the action was performed.
actor
Details of the user or functionality that performed the action on the ticket. Ticket actions can be performed by support agents, or customers, or automation rules, or the Zoho Desk system itself. The different keys included in this object are as follows:
id - ID of the actor. In some cases, the value can be null.
name - Name of the actor. If the actor is an agent or a customer, their full name is returned; if the actor is an automation rule, the name of the rule is returned; and if the actor is the Zoho Desk system, the value DeskSystem is returned.
type - Type of the actor. Values supported are:
- Agent
- Contact
- DirectAssignment
- RoundRobinAssignment
- NotificationRule
- SLA
- Workflow
- Macro
- Supervise
- Blueprint
- System
source
Contextual information related to the action. For instance, if a thread is added to a ticket, this key will return information on the channel through which the thread was added. The values supported are:
- Email
- Chat
- OfflineChat
- HelpCenter
- Forum
- Twitter
- Facebook
- FeedbackWidget
- WebForm
- CustomChannel
- Import
- IncomingResponse
- CustomerRating
- Setting
- LicenseDowngrade
- ZohoBugTracker
- Jira
- ZohoBooks
- ZohoInvoice
- ZohoInventory
In some cases, the value of this key can be null.
eventInfo
Additional details related to the action. The value of eventInfo is a JSON array with the property object as its element type. The value of eventInfo will be an empty array if no additional information about the action is available.
actorInfo
Additional details related to the actor. Just like in the case of eventInfo, the value of actorInfo is also a JSON array with the property object as its element type. The value of actorInfo will be an empty array if no additional information about the actor is available.
The structure of the property object is as follows:
Property Object
{
"propertyName": "String",
"systemProperty": "boolean",
"propertyType": "PropertyTypeEnum",
"propertyValue": "# Will vary based on propertyType"
}
The property object contains data on a single property of a resource. For instance, field values in a ticket and @mentions in a comment. The keys supported in the object are as follows:
propertyName - Name of the property.
systemProperty - Boolean value that denotes whether the property is system-generated or not. Custom fields are treated as non-system properties.
propertyType - Type of the property. Values supported are:
Property type
| Property value type
|
Text
| String value
|
TextList
| JSON array containing only string values as elements.
|
Enum
| This is a string value that supports countable values. The possible values vary, based on the context.
|
Boolean
| Boolean value
|
Date
| Date in the yyyy-mm-dd format
|
DateTime
| Timestamp value
|
Duration
| Integer value that represents the duration in seconds.
|
Numeric
| Numeric value — it can be an integer or a float value.
|
Entity
| JSON object that represent a single entity, such as agent, customer, ticket, activity, blueprint, and so on. A more detailed explanation is given below.
|
EntityList
| JSON array of Entity objects
|
PropertyGroup
| JSON array of Property objects
|
PropertyGroupList
| JSON array of PropertyGroup arrays
|
ValueTransition
| JSON object that represents a field update. A more detailed explanation is given below.
|
Entity
The structure of this object is as follows:
{
"id": "Long",
"name": "String",
"type": "EntityTypeEnum"
}
id - ID of the entity
name - Name of the entity. In case of a ticket, the ticket number is considered and in case of an activity, the subject of the activity is considered.
type - Type of the entity, which is an enumerable constant. The values supported are:
- Agent
- Contact
- Department
- Team
- Ticket
- Call
- Event
- Task
- Activity
- Blueprint
- Transition
- Layout
If an entity is deleted and its corresponding data is not available in the system, it is presented as a deleted entity. Details of deleted entities are displayed in the following format:
{
"id": "Long/null",
"name": "DELETED-ENTITY",
"type": "EntityTypeEnum-Deleted"
}
Below is an example of details of a deleted team.
{
"id": "57890890789568",
"name": "DELETED-ENTITY",
"type": "Team-Deleted"
}
Note: If an activity is deleted, the exact type of the activity cannot be identified. So, the API returns the type as just "Activity". For activities that are not deleted, the exact type is returned.
ValueTransition
This object returns information related to a field update. The structure of this object is as follows:
{
"previousValue": "# data type will vary based on type",
"updatedValue": "# data type will vary based on type",
"type": "ValueTransitonTypeEnum"
}
The values of both the previousValue and updatedValue keys will always be of the same data type. The type of value will change, based on the type key.
All property types except PropertyGroup, PropertyGroupList, and ValueTransition are supported by value transitions.
To view the list of history events supported and an example for each event, refer to
this document.