Split A Ticket In Zoho Desk
Table of Contents
Overview
This task is used to split a reply from an existing ticket as a new ticket.
Syntax
<variable> = zoho.desk.ticket.split(<orgID>, <ticket_ID>, <thread_ID>, <connection>);
where,
Params | Data type | Description |
<variable> | KEY-VALUE | specifies the variable which hold the response returned by Zoho Desk. It represents the values of the new record created. |
<orgID> | NUMBER | specifies the organization ID of the account in which the ticket exists. This can be found in Zoho Desk Settings > Developer Space > API. |
<ticket_ID> | NUMBER | specifies the ID of the ticket from which a thread (reply) will be split as a new ticket. Learn how to fetch the record ID after creating or fetching records. |
<thread_ID> | NUMBER | specifies the ID of the thread (reply) that will be split as a new ticket. To get thread ID of a reply, use zoho.desk.getRelatedRecords task with the module name - threads, the parent module name - tickets, and the parent ID - <ticket_Id>. |
<connection> (optional)* | TEXT | specifies the name of the connection. The scope which needs to be selected is: *Note: This is a mandatory param when used in Zoho Creator. |
Example
The following script splits a reply with thread ID - 168XXXXXXXXXXXX005 of the ticket with ID - 168XXXXXXXXXXXX001 into a new ticket.
response = zoho.desk.ticket.split(641XXXXXX, 168XXXXXXXXXXXX001, 16XXXXXXXXXXXXX044, "desk_connection");
where,
response
641XXXXXX
1689XXXXXXXXXXXXXX
16XXXXXXXXXXXXX044
"desk_connection"
Sample Response
Success Response
The success response returned is of the following format.
{
"ticketNumber": "685",
"modifiedTime": "2019-02-26T10:37:50.000Z",
"subCategory": null,
"statusType": "Open",
"subject": "Re: [## 677 ##] Ticket Updated",
"customFields": {
"Mailing Zip": null,
"TAM": null,
"Quote number": null,
"TestData": null,
"LightAgents": null,
"attachmentLinks": null,
"Contract Type": null,
"Serial Number": null,
"Mailing Country": null,
"Total Age": null,
"Start Date": null,
"bugID": null,
"PreviousTicketOwner": null,
"Managed Firewall": null,
"Manufacturer": null,
"Sales Lead?": "false",
"advisory": null,
"LIS Customer": null,
"Single Date": null,
"DateCF": null,
"Event_Scheduled": null,
"Office Name": null,
"previousClosedTime": null,
"Incoming Count": null,
"offbusinesshour": "false",
"SAM": null,
"Every issue no.": null,
"Setup Sub Category": null,
"TicketOwnerUpdatedTime": null,
"Every issue link": null,
"PotentialId": null,
"TestNumber": null,
"Ticket type": null,
"Invoice Number": null,
"Access Information": null,
"NewTicketNumber": null,
"Type of Category": null,
"account type": null,
"Service Frequency": null,
"SalesLead_alertSend": "false",
"SATcase Serial Number": null,
"Mailing City": null,
"Mailing State": null,
"OldTicketNumber": null,
"Department Responsible": null,
"Mailing Street": null,
"Model": null,
"TestDate": null,
"Outgoing Count": null,
"NewContact": "false"
},
"dueDate": null,
"departmentId": "168XXXXXXXXXXXX907",
"channel": "Email",
"description": null,
"onholdTime": null,
"resolution": null,
"sharedDepartments": [
],
"closedTime": null,
"approvalCount": "0",
"timeEntryCount": "0",
"channelRelatedInfo": null,
"responseDueDate": null,
"isDeleted": false,
"isTrashed": false,
"createdTime": "2019-02-26T10:37:50.000Z",
"modifiedBy": "168XXXXXXXXXXXX005",
"id": "168XXXXXXXXXXXX001",
"isResponseOverdue": false,
"email": "shawn@zylker.com",
"customerResponseTime": "2019-02-26T10:37:49.000Z",
"productId": null,
"contactId": "168XXXXXXXXXXXX001",
"threadCount": "1",
"priority": null,
"classification": null,
"assigneeId": null,
"commentCount": "0",
"taskCount": "0",
"accountId": null,
"phone": null,
"webUrl": "https://desk.zoho.com/support/smith/ShowHomePage.do#Cases/dv/bf5c8f5ad85afXXXXXXXXXXXXXXXXXXXX19abeecaa48",
"teamId": null,
"attachmentCount": "0",
"category": null,
"status": "Open"
}
Failure Response
The failure response returned for incorrect or non-existent organization ID is of the following format.
{
"errorCode":"UNPROCESSABLE_ENTITY",
"message":"The value passed for the 'orgId' parameter is invalid."
}The failure response returned for incorrect or non-existent record ID is of the following format.
{
"errorCode":"FORBIDDEN",
"message":"You are not authorized to access this resource."
}