Get record by ID from SDP cloud
Table of Contents
Overview
The zoho.sdp.getRecordById task fetches a record from the specified module of SDP Cloud using its ID.
This integration task is based on the SDP Cloud API - Get Request.
Syntax
<response> = zoho.sdp.getRecordById(<module>, <record_id>, <app_account_name>, <connection>);
Params | Data type | Description |
<response> | KEY-VALUE | The details of the record that will be fetched. |
<module> | TEXT | The name of the module from which the record will be fetched. Currently, only "Request" is the applicable module. |
<record_id> | NUMBER | The ID of the record that needs to be fetched. Learn how to fetch the record ID after creating or fetching records. |
<app_account_name> | TEXT | The name of the account in which this task will be performed. Note:
|
<connection>
| TEXT | The name of the connection. Note:
|
Example
The following script fetches the record of ID - 317XXXXXXXXXX655 from the SDP Cloud module - Request:
response = zoho.sdp.getRecordById("Request", 317XXXXXXXXXX655, "", "sdp_connection");
where:
response
"Request"
317XXXXXXXXXX348
""
"sdp_connection"
Response Format
Success Response
The success response will be returned in the following format:
{
"request": {
"subject": "OS installation",
"resolution": null,
"linked_to_request": null,
"mode": null,
"lifecycle": null,
"is_read": false,
"assets": [
],
"is_trashed": false,
"id": "3173000000115348",
"assigned_time": null,
"group": null,
"requester": {
"email_id": null,
"is_technician": false,
"sms_mail": null,
"phone": null,
"name": "Tom",
"mobile": null,
"id": "3173000000115338",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=-1&t=user&height=60&width=60",
"is_vip_user": false,
"department": null
},
"email_to": [
],
"created_time": {
"display_value": "Sep 20, 2019 05:01 PM",
"value": "1568979088854"
},
"item": null,
"level": null,
"approval_status": null,
"impact": null,
"sla": null,
"resolved_time": null,
"priority": null,
"created_by": {
"email_id": "shawn@zylker.com",
"is_technician": true,
"sms_mail": null,
"phone": null,
"name": "Shawn",
"mobile": null,
"id": "3173000000115318",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=58956160&t=user&height=60&width=60",
"is_vip_user": false,
"department": null
},
"first_response_due_by_time": null,
"is_escalated": false,
"last_updated_time": {
"display_value": "Sep 20, 2019 05:01 PM",
"value": "1568979089117"
},
"has_notes": false,
"udf_fields": {
},
"impact_details": null,
"subcategory": {
"name": "Windows XP",
"id": "3173000000006747"
},
"deleted_time": null,
"email_cc": [
],
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "3173000000006657"
},
"template": {
"name": "Default Request",
"id": "3173000000006655"
},
"email_ids_to_notify": [
],
"attachments": [
],
"request_type": null,
"display_id": "1",
"time_elapsed": "0",
"notification_status": null,
"description": null,
"responded_time": null,
"is_service_request": false,
"urgency": null,
"has_request_initiated_change": false,
"department": null,
"is_reopened": false,
"has_draft": false,
"has_attachments": false,
"has_linked_requests": false,
"is_overdue": false,
"technician": null,
"has_problem": false,
"due_by_time": null,
"is_fcr": false,
"has_project": false,
"site": null,
"is_first_response_overdue": false,
"completed_time": null,
"email_bcc": [
],
"category": {
"deleted": false,
"name": "Operating System",
"id": "3173000000006705"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Failure Response
The failure response for incorrect or non-existent record ID will be returned in the following format:
{
"response_status": {
"status_code": 4000,
"messages": [
{
"status_code": 4007,
"type": "failed",
"message": "Invalid URL accessed"
}
],
"status": "failed"
}
}
Related Links
- SDP Cloud API
- Common error codes can be viewed here
- The possible response formats can be viewed here