Merge tickets

Merge tickets in Zoho Desk

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,

ParamsData typeDescription

<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:   
- Desk.tickets.UPDATE

*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,

response
is the variable which will hold the response returned by Zoho Desk. It represents the values of the merged ticket.
641XXXXXX
is the NUMBER that represents the organization ID
168XXXXXXXXXXXX001
is the NUMBER that represents the ID of the ticket to which other tickets are merged
paramValue
is the KEY-VALUE variable that holds the parameters
"ids"
is the TEXT that represents the parameter name as given in the Zoho Desk API. It holds the list of ticket IDs that need to be merged with the source ticket.
168XXXXXXXXXXXX031 
168XXXXXXXXXXXX205 
are the NUMBER values that represent the IDs of the tickets that need to be merged with the specified source ticket
"desk_connection"
is the TEXT that represents the name of the 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."
      }

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com