Get records from Zoho Recruit
Table of ContentsUp
Overview
The zoho.recruit.getRecords task is used to fetch records from Zoho Recruit. This integration task is based on the Zoho Recruit API - Get Records.
Syntax
<variable> = zoho.recruit.getRecords(<module_name>, <fromIndex>, <toIndex>, <(selectColumns)>, <sortColumnString>, <sortOrderString>, <connection>);
where:
Parameter | Data type | Description |
<variable> | KEY-VALUE | The response returned by Zoho Recruit. |
<module_name> | TEXT | Module from which the records will be fetched. Applicable modules:
|
<fromIndex> | NUMBER | The starting index of the records that will be retrieved. |
<toIndex> | NUMBER | The last index of the records that will be retrieved. Note: Using <fromindex> and <toindex> params you can fetch upto 200 records. So, if the difference between the <fromindex> and <toindex> exceeds 200, only the first 200 records will be fetched. |
<selectColumns> | TEXT | Field names whose values will be included in the fetched records. Multiple column names can be specified each separated by a comma and enclosed in brackets. Eg: (Last Name,Website,Email) If this param is supplied with ALL or an empty value, all field values will be included in the fetched records. Note: The field names should be provided as specified in the Zoho Recruit API document. |
<sortColumnString> | TEXT | The field based on which the fetched records will be sorted. Note: The field names should be provided as specified in the Zoho Recruit API document |
<sortOrderString> | TEXT | Order in which the records will be sorted.
|
<connection> | TEXT | The link name of the Zoho Recruit connection. Note:
|
Example 1: Fetch record from Candidates module
The following script fetches records from the "Candidates" module, based on the specified fromIndex and toIndex, in Zoho Recruit.
response = zoho.recruit.getRecords("Candidates" , 0, 20, "ALL", "Last Name", "asc", "recruit_connection");
where:
"Candidates"
0
20
"ALL"
"Last Name"
"asc"
"recruit_connection"
The success response returned is of the following format:
{
"Is Locked":"false",
"Candidate ID":"ZR_23_CAND",
"CANDIDATEID":"1687000000102009",
"Is Unqualified":"false",
"Updated On":"2015-08-05 18:41:34",
"Created By":"dinesh.d",
"Is Attachment Present":"true",
"Source":"Resume",
"MODIFIEDBY":"1687000000077003",
"Created Time":"2015-08-05 18:41:34",
"Modified By":"dinesh.d",
"SMOWNERID":"1687000000077003",
"Candidate Status":"New",
"Last Activity Time":"2015-08-05 18:41:34",
"SMCREATORID":"1687000000077003",
"Email Opt Out":"false",
"Is Hot Candidate":"false",
"Last Name":"No name",
"Experience in Years":"0",
"Candidate Owner":"dinesh.d"
},
{
"Is Locked":"false",
"Candidate ID":"ZR_24_CAND",
"CANDIDATEID":"1687000000102031",
"Is Unqualified":"false",
"Updated On":"2015-08-05 18:47:53",
"Created By":"dinesh.d",
"Is Attachment Present":"true",
"Source":"Resume",
"MODIFIEDBY":"1687000000077003",
"Created Time":"2015-08-05 18:47:53",
"Modified By":"dinesh.d",
"SMOWNERID":"1687000000077003",
"Candidate Status":"New",
"Last Activity Time":"2015-08-05 18:47:53",
"SMCREATORID":"1687000000077003",
"Email Opt Out":"false",
"Is Hot Candidate":"false",
"Last Name":"No name",
"Experience in Years":"0",
"Candidate Owner":"john"
}
To fetch the IDs of the records execute the following script:
{
info var.get("<module>ID").toLong(); // example for <module>ID is CANDIDATEID
}
Example 2: Fetch records based on selectColumn param
The following script fetches records from the "Candidates" module in Zoho Recruit, based on the specified selectColumns param
response = zoho.recruit.getRecords("Candidates", 1,4, "(Last Name,Email,Mobile)", "Email", "desc", "recruit_connection");
where:
"Candidates"
1
4
"(Last Name,Email,Mobile)"
"Email"
"desc"
"recruit_connection"
The success response returned is of the following format:
{
"Email":"henry@zylker.com",
"CANDIDATEID":"3342000000157003",
"Last Name":"T",
"Mobile":"08940270215"
},
{
"Email":"richardPatrick@zylker.com",
"CANDIDATEID":"3342000000266010",
"Last Name":"Patrick"
},
{
"Email":"richard@zylker.com",
"CANDIDATEID":"3342000000267001",
"Last Name":"Richard",
"Mobile":"+91 9988776655"
},
{
"Email":"john@zylker.com,tony@zylker.com",
"CANDIDATEID":"3342000000161049",
"Last Name":"No name"
}