Merge tickets in Zoho Desk
Table of Contents
Note:
- Each time the zoho.desk.ticket.merge integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.desk.ticket.merge integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
This task is used to merge two or more records in the Zoho Desk module - Tickets.
Syntax
<variable> = zoho.desk.ticket.merge(<orgID>, <ticket_ID>, <param_value>, <connection>);
where,
| Params | Data type | Description |
| <variable> | KEY-VALUE | specifies the variable which will hold the response returned by Zoho Desk. It represents the values of the merged ticket. |
| <orgID> | NUMBER | specifies the organization ID of the account in which the tickets will be merged. This can be found in Zoho Desk Settings > Developer Space > API. ![]() |
| <ticket_ID> | NUMBER | specifies the ID of the ticket to which other tickets are merged. Learn how to fetch the record ID after creating or fetching records. |
| <param_value> | KEY-VALUE | specifies the IDs of the tickets that need to be merged with the source ticket. It can also include other parameters as given in the Zoho Desk API. Note: The parameter "ids" is mandatory. |
<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 merges the tickets - 168XXXXXXXXXXXX031 and 168XXXXXXXXXXXX205 with the source ticket of ID - 168XXXXXXXXXXXX001.
paramValue = {"ids":{168XXXXXXXXXXXX031, 168XXXXXXXXXXXX205}}; response = zoho.desk.ticket.merge(641XXXXXX, 168XXXXXXXXXXXX001, paramValue, "desk_connection");
where,
response641XXXXXX168XXXXXXXXXXXX001paramValue"ids"168XXXXXXXXXXXX031 168XXXXXXXXXXXX205
"desk_connection"Sample Response
Success Response
The success response returned is of the following format.
{
"ticketNumber": "684",
"modifiedTime": "2019-02-28T12:10:14.000Z",
"subCategory": null,
"statusType": "Open",
"subject": "Re: [## 677 ##] Test ticketupdated",
"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": "2019-02-26",
"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": "1",
"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": "1",
"NewContact": "false"
},
"dueDate": null,
"departmentId": "168XXXXXXXXXXXXXX907",
"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-26T09:56:23.000Z",
"modifiedBy": "168XXXXXXXXXXXX005",
"id": "168XXXXXXXXXXXX001",
"isResponseOverdue": false,
"email": "shawn@zylker.com",
"customerResponseTime": "2019-02-26T09:56:23.000Z",
"productId": null,
"contactId": "168XXXXXXXXXXXX001",
"threadCount": "2",
"priority": null,
"classification": null,
"assigneeId": "168XXXXXXXXXXXX005",
"commentCount": "0",
"taskCount": "0",
"accountId": null,
"phone": null,
"webUrl": "https://desk.zoho.com/support/smith/ShowHomePage.do#Cases/dv/bf5c8f5ad85afXXXXXXXXXXXXXXXXXXXXfb6719abeecaa48",
"teamId": null,
"attachmentCount": "0",
"category": null,
"status": "Open"
}
Failure Response
The failure response returned for missing mandatory field is of the following format.
{
"errorCode":"INVALID_DATA",
"message":"The data is invalid due to validation restrictions",
"errors":[{"fieldName":"/ids","errorType":"missing"}]
}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."
}
