Fetch record Zoho Desk using record ID
Table of Contents
Note:
- Each time the zoho.desk.getRecordById 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.getRecordById 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 fetch record using its ID from the specified Zoho Desk module.
Syntax
<variable> = zoho.desk.getRecordById(<orgId>, <module_name>, <record_id>, <connection>);
where,
| Parameter | Data type | Description |
| <variable> | KEY-VALUE | variable which will contain the response returned by Zoho Desk. It represents the values of the record fetched from the required module. |
| <orgId> | NUMBER | specifies the organization ID of the account from which the record will be fetched. This can be found in Zoho Desk Settings > Developer Space > API. ![]() |
| <module_name> | TEXT | specifies the module from which the record will be fetched. The following is the list of supported modules.
|
| <record_id> | NUMBER | specifies the ID of the record that will be fetched. Learn how to fetch the record ID after creating, searching or fetching records. |
<connection> (optional)* | TEXT | specifies the name of the connection. The scopes which need to be selected are: *Note: This is a mandatory param when used in Zoho Creator. |
Example
The following script fetches the record with ID - 168XXXXXXXXXXXX001 from the Zoho Desk module - Tickets.
response = zoho.desk.getRecordById(641XXXXXX, "tickets", 168XXXXXXXXXXXX001, "desk_connection");
where,
response641XXXXXX"tickets"168XXXXXXXXXXXXX001"desk_connection"Sample Response
Success Response
The success response returned is of the following format.
{
"ticketNumber": "677",
"modifiedTime": "2019-01-24T12:48:23.000Z",
"subCategory": null,
"statusType": "Open",
"subject": "Testing ticket create",
"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": "168XXXXXXXXXX044",
"channel": "Phone",
"description": null,
"onholdTime": null,
"resolution": null,
"closedTime": null,
"approvalCount": "0",
"timeEntryCount": "0",
"channelRelatedInfo": null,
"responseDueDate": null,
"isTrashed": false,
"isDeleted": false,
"createdTime": "2019-01-24T12:48:23.000Z",
"modifiedBy": "168XXXXXXXXXXXX005",
"id": "168XXXXXXXXXXXX001",
"isResponseOverdue": false,
"followerCount": "0",
"email": "john@zylker.com",
"customerResponseTime": "2019-01-24T12:48:22.000Z",
"isFollowing": false,
"productId": null,
"contactId": "168XXXXXXXXXXXX005",
"threadCount": "0",
"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/bf5c8fXXXXXXXXXXXXXXXXX1e02adafb6719abeecaa48",
"teamId": null,
"tagCount": "0",
"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 an incorrect or non-existent record ID is of the following format.
{
"errorCode":"URL_NOT_FOUND",
"message":"The URL you requested could not be found."
}
