Marketplace Platform v2.3 deprecation:We’re continuing to improve the Marketplace Platform to deliver stronger security, better performance, and new capabilities. As part of this evolution, Marketplace Platform v2.3 will be deprecated. To learn the dates and next steps, see Migration guide.
onTicketCreate
When a new ticket is created in the Freshservice system, the onTicketCreate event is triggered.
Subscribe to the onTicketCreate event and register the callback by using the following sample manifest.json content.
"events": {
"onTicketCreate": {
"handler": "onTicketCreateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onTicketCreateCallback: function(payload) {
console.log("Logging arguments from onTicketCreate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the system, agent, or requester who triggered the onTicketCreate event in the Freshservice system.
- profile_idinteger
Identifier of the actor who triggered the product event.
- requesterobject
Information pertaining to the requester who raised the ticket in the Freshservice system.
- id
Identifier of the requester object, auto-generated when a new requester is added to the Freshworks system.
- created_at
Timestamp of when the requester object is created in the Freshworks system, specified in the UTC format.
- email
Primary email address of the requester.
- language
Primary language of the requester.
- mobile
Mobile number of the requester.
- name
Name of the requester.
- phone
Telephone number of the requester.
- ticket
Information pertaining to the ticket raised in the Freshservice system. Submitting a ticket triggers the onTicketCreate event.
- idinteger
Identifier of the ticket object, auto-generated when a ticket is created in the Freshservice system.
- created_atdatetime
Timestamp of when the ticket is created in the Freshworks system, specified in the UTC format.
- updated_atstring
Timestamp of when the ticket details are last updated in the Freshworks system, specified in the UTC format.
For onTicketCreate, this attribute value is the same as the created_at value.
- assetsarray of objects
Assets associated with the ticket.
- asset_idinteger
Identifier of the asset associated with the ticket.
- asset_impactstring
Impact of the asset associated with the ticket.
- asset_namestring
Name of the asset associated with the ticket.
- associated_changesarray of objects
Details of the changes associated with the ticket.
- idinteger
Identifier of the change associated with the ticket.
- namestring
Name of the change associated with the ticket.
- attachmentsarray of objects
Details of the attachment(s) uploaded to the ticket.
- attachment_urlinteger
URL of the attachment file.
- namestring
Name of the attachment file.
- categorystring
Category to which the ticket created is associated.
Tickets can be classified, tracked, and prioritized based on the categories
- cc_emailarray of strings
Additional email addresses added in the cc field of an email that the agent sends as a response to the ticket, specified as an array.
- changeobject
Attribute to be deprecated soon.
Details of the change associated with the ticket.
- idinteger
Identifier of the change associated with the ticket.
- namestring
Name of the change associated with the ticket.
- custom_fieldsobject
To obtain additional ticket information, custom fields could be configured in the Freshworks system.
The custom_field attribute contains the custom field names and corresponding values, as a valid JSON object of key (custom field name)-value (custom field’s value) pairs.
- department_idinteger
Identifier of the department to which the ticket created is associated.
- department_namestring
Identifier of the department to which the ticket created is associated.
- descriptionstring
Summary of the issue raised in the ticket, in HTML format. The value is truncated if the size exceeds 10KB.
- description_textstring
Summary of the issue raised in the ticket, in plain text format. The value is truncated if the size exceeds 10KB.
- due_bystring
Timestamp indicating when the ticket is due to be resolved, specified in the UTC format.
- email_config_idinteger
Identifier of the customized email address, which is configured to automatically create a new ticket from the email received to the support email.
- frDueBystring
Timestamp indicating when the first response is due for the ticket, specified in the UTC format.
- fr_escalatedboolean
Specifies whether the ticket has been escalated for delay in sending the first response.
Possible values: true, false
- fwd_emailsarray of strings
Email addresses added to the Forward to field of the ticket when the agent forwards a response of the ticket, specified as an array.
- group_idinteger
Identifier of the group associated with the ticket.
- group_namestring
Name of the group associated with the ticket.
- impactinteger
An agent who creates a ticket in the Freshservice system can assign an impact status to the ticket created. impact identifies the impact assigned to the ticket.
Possible values:
1: Low impact
2: Medium impact
3: High impact - impact_namestring
Impact assigned to the ticket by an agent.
- is_description_text_truncatedboolean
Specifies whether the description text of the ticket is truncated.
Possible values: true, false
- is_description_html_truncatedboolean
Specifies whether the description in HTML format is truncated.
Possible values: true, false
- is_escalatedboolean
Specifies whether the ticket has been escalated for any reason.
Possible values: true, false
- priorityinteger
Identifier of the priority assigned to the ticket.
Possible values:
1: Low priority
2: Medium priority
3: High priority
4: Urgent priority - priority_namestring
Priority assigned to the ticket.
- problemarray of objects
Details of the problem linked to the ticket.
- problem_idinteger
Identifier of the problem linked to the ticket.
- problem_nameinteger
Name of the problem linked to the ticket.
- reply_cc_emailsarray of strings
Email addresses added in the cc field of an email that the agent sends as a reply to the ticket, specified as an array.
- requester_idinteger
Identifier of the requester who created the ticket.
- requester_namestring
Name of the requester who created the ticket.
- responder_emailstring
Email address of the agent to whom the ticket has been assigned.
- responder_idinteger
Identifier of the agent to whom the ticket has been assigned.
- responder_namestring
Name of the agent to whom the ticket has been assigned.
- sourceinteger
The channel through which the ticket was created. The default channels and the corresponding values are,
Possible values:
- 1: Email
- 2: Portal
- 3: Phone
- 4: Chat
- 5: Feedback Widget
- 6: Yammer
- 7: AWS CloudWatch
- 8: Pagerduty
- 9: Walk-up
- 10: Slack
In addition to the default sources defined, new channels can be added.
- source_namestring
Channel through which the ticket was created.
- spamboolean
Specifies whether the ticket has been marked as spam.
Possible values: true, false
- statusinteger
Identifier of the status of the ticket in the Freshworks system.
Possible values:
- 2: Open
- 3: Pending
- 4: Resolved
- 5: Closed
- status_namestring
Status of the ticket in the Freshworks system.
- sub_categorystring
Sub-category under which the ticket is grouped.
- subjectstring
Subject of the ticket created in the Freshworks system.
- tagsarray of strings
Keywords associated with the ticket, specified as an array.
- to_emailsarray of strings
Email addresses added in the reply to field of the ticket.
- typeinteger
Identifier of the type of the ticket.
- type_nameinteger
Type of issue the ticket is addressing.
For more information, see what is a ticket type.
Possible values: Incident, Service Request, Major Incident, Case, Query, Issue, Request, Alert
- urgencyinteger
Identifier of the urgency assigned to the ticket.
Possible values: 1: Low 2: Medium 3: High
- urgency_namestring
Urgency assigned to the ticket.
- workspace_idinteger
Important:When the onTicketCreate event is triggered in accounts without workspaces or with the MSP mode enabled, this attribute is not returned in the payload. MSP mode does not support workspaces.
In accounts with workspaces, tickets belong to specific workspaces. A workspace is a configurable, team or department-specific space where team-members can collaborate while maintaining the operational integrity of team-only data.
workspace_id is the identifier of the workspace where the ticket is created. It is auto-generated when a new workspace is created in Freshservice. For information about workspaces, read What is a workspace. To retrieve all the workspaces that are created in an account, through APIs, use the List all workspaces API.Note:workspace_id is displayed as part of the account URL when you (or the app user) navigate to the admin settings of the workspace. For example, when you navigate to the primary workspace’s admin settings, if the corresponding URL is /ws/2/admin/home, the workspace’s ID is 2.
- workspace_namestring
Name of the workspace where the ticket is created.
Important:When the onTicketCreate event is triggered in accounts without workspaces or with the MSP mode enabled, this attribute is not returned in the payload. MSP mode does not support workspaces.
onTicketUpdate
The onTicketUpdate event is triggered in the Freshservice system when,
- The status changes
- The priority changes
- The group changes
- The agent changes
- A ticket is deleted
- A ticket is marked as spam
- The type changes
- The source changes
- A ticket is escalated for any reason
- A ticket is escalated due to breaching the first response time.
The onTicketUpdate event is not triggered when:
- The custom field are updated.
- The tags are updated.
Note:Replies or note additions are not considered ticket updates, you need to use the onConversationCreate event to handle them.
Subscribe to the onTicketUpdate event and register the callback by using the following sample manifest.json content.
"events": {
"onTicketUpdate": {
"handler": "onTicketUpdateCallback"
}
}Define the corresponding callback by using the following sample server.js content:
exports = {
onTicketUpdateCallback: function(payload) {
console.log("Logging arguments from onTicketUpdate event: " + JSON.stringify(payload));
}
}Attributes of the data object
- actorobject
Information pertaining to the system, agent, or requester who triggered the onTicketUpdate event in the Freshservice system.
- profile_idinteger
Identifier of the actor who triggered the product event.
- requesterobject
Information pertaining to the requester who raised the ticket in the Freshservice system.
- id
Identifier of the requester object, auto-generated when a new requester is added to the Freshworks system.
- created_at
Timestamp of when the requester object is created in the Freshworks system, specified in the UTC format.
- email
Primary email address of the requester.
- language
Primary language of the requester.
- mobile
Mobile number of the requester.
- name
Name of the requester.
- phone
Telephone number of the requester.
- ticket
Information pertaining to the ticket modified in the Freshservice system.
- idinteger
Identifier of the ticket object, auto-generated when a ticket is created in the Freshservice system.
- created_atdatetime
Timestamp of when the ticket is created in the Freshworks system, specified in the UTC format.
- updated_atstring
Timestamp of when the ticket details are last updated in the Freshworks system, specified in the UTC format.
For onTicketCreate, this attribute value is the same as the created_at value.
- assetsarray of objects
Assets associated with the ticket.
- asset_idinteger
Identifier of the asset associated with the ticket.
- asset_impactstring
Impact of the asset associated with the ticket.
- asset_namestring
Name of the asset associated with the ticket.
- associated_changesarray of objects
Details of the changes associated with the ticket.
- idinteger
Identifier of the change associated with the ticket.
- namestring
Name of the change associated with the ticket.
- attachmentsarray of objects
Details of the attachment(s) uploaded to the ticket.
- attachment_urlinteger
URL of the attachment file.
- namestring
Name of the attachment file.
- categorystring
Category to which the ticket created is associated.
Tickets can be classified, tracked, and prioritized based on the categories
- cc_emailarray of strings
Additional email addresses added in the cc field of an email that the agent sends as a response to the ticket, specified as an array.
- changeobject
Attribute to be deprecated soon.
Details of the change associated with the ticket.
- idinteger
Identifier of the change associated with the ticket.
- namestring
Name of the change associated with the ticket.
- changesobject
Changes that triggered the onTicketUpdate event, specified as a JSON object of the following format:
"changes": { //For non-array attributes "<ticket.attribute that changed>": ["Old value", "New value"] } - custom_fieldsobject
To obtain additional ticket information, custom fields could be configured in the Freshworks system.
The custom_field attribute contains the custom field names and corresponding values, as a valid JSON object of key (custom field name)-value (custom field’s value) pairs.
- department_idinteger
Identifier of the department to which the ticket created is associated.
- department_namestring
Identifier of the department to which the ticket created is associated.
- descriptionstring
Summary of the issue raised in the ticket, in HTML format. The value is truncated if the size exceeds 10KB.
- description_textstring
Summary of the issue raised in the ticket, in plain text format. The value is truncated if the size exceeds 10KB.
- due_bystring
Timestamp indicating when the ticket is due to be resolved, specified in the UTC format.
- email_config_idinteger
Identifier of the customized email address, which is configured to automatically create a new ticket from the email received to the support email.
- frDueBystring
Timestamp indicating when the first response is due for the ticket, specified in the UTC format.
- fr_escalatedboolean
Specifies whether the ticket has been escalated for delay in sending the first response.
Possible values: true, false
- fwd_emailsarray of strings
Email addresses added to the Forward to field of the ticket when the agent forwards a response of the ticket, specified as an array.
- group_idinteger
Identifier of the group associated with the ticket.
- group_namestring
Name of the group associated with the ticket.
- impactinteger
An agent who creates a ticket in the Freshservice system can assign an impact status to the ticket created. impact identifies the impact assigned to the ticket.
Possible values:
1: Low impact
2: Medium impact
3: High impact - impact_namestring
Impact assigned to the ticket by an agent.
- is_description_text_truncatedboolean
Specifies whether the description text of the ticket is truncated.
Possible values: true, false
- is_description_html_truncatedboolean
Specifies whether the description in HTML format is truncated.
Possible values: true, false
- is_escalatedboolean
Specifies whether the ticket has been escalated for any reason.
Possible values: true, false
- priorityinteger
Identifier of the priority assigned to the ticket.
Possible values:
1: Low priority
2: Medium priority
3: High priority
4: Urgent priority - priority_namestring
Priority assigned to the ticket.
- problemarray of objects
Details of the problem linked to the ticket.
- problem_idinteger
Identifier of the problem linked to the ticket.
- problem_nameinteger
Name of the problem linked to the ticket.
- reply_cc_emailsarray of strings
Email addresses added in the cc field of an email that the agent sends as a reply to the ticket, specified as an array.
- requester_idinteger
Identifier of the requester who created the ticket.
- requester_namestring
Name of the requester who created the ticket.
- responder_emailstring
Email address of the agent to whom the ticket has been assigned.
- responder_idinteger
Identifier of the agent to whom the ticket has been assigned.
- responder_namestring
Name of the agent to whom the ticket has been assigned.
- sourceinteger
The channel through which the ticket was created. The default channels and the corresponding values are,
Possible values:
- 1: Email
- 2: Portal
- 3: Phone
- 4: Chat
- 5: Feedback Widget
- 6: Yammer
- 7: AWS CloudWatch
- 8: Pagerduty
- 9: Walk-up
- 10: Slack
In addition to the default sources defined, new channels can be added.
- source_namestring
Channel through which the ticket was created.
- spamboolean
Specifies whether the ticket has been marked as spam.
Possible values: true, false
- statusinteger
Identifier of the status of the ticket in the Freshworks system.
Possible values:
- 2: Open
- 3: Pending
- 4: Resolved
- 5: Closed
- status_namestring
Status of the ticket in the Freshworks system.
- sub_categorystring
Sub-category under which the ticket is grouped.
- subjectstring
Subject of the ticket created in the Freshworks system.
- tagsarray of strings
Keywords associated with the ticket, specified as an array.
- to_emailsarray of strings
Email addresses added in the reply to field of the ticket.
- typeinteger
Identifier of the type of the ticket.
- type_nameinteger
Type of issue the ticket is addressing.
For more information, see what is a ticket type.
Possible values: Incident, Service Request, Major Incident, Case, Query, Issue, Request, Alert
- urgencyinteger
Identifier of the urgency assigned to the ticket.
Possible values: 1: Low 2: Medium 3: High
- urgency_namestring
Urgency assigned to the ticket.
- workspace_idinteger
Important:When the onTicketUpdate event is triggered in accounts without workspaces or with the MSP mode enabled, this attribute is not returned in the payload. MSP mode does not support workspaces.
In accounts with workspaces, tickets belong to specific workspaces. A workspace is a configurable, team or department-specific space where team-members can collaborate while maintaining the operational integrity of team-only data.
workspace_id is the identifier of the workspace where the ticket is updated. It is auto-generated when a new workspace is created in Freshservice. For information about workspaces, read What is a workspace. To retrieve all the workspaces that are created in an account, through APIs, use the List all workspaces API.Note:workspace_id is displayed as part of the account URL when you (or the app user) navigate to the admin settings of the workspace. For example, when you navigate to the primary workspace’s admin settings, if the corresponding URL is /ws/2/admin/home, the workspace’s ID is 2.
- workspace_namestring
Name of the workspace where the ticket is updated.
Important:When the onTicketUpdate event is triggered in accounts without workspaces or with the MSP mode enabled, this attribute is not returned in the payload. MSP mode does not support workspaces.