Choose where you’d like to start

Search records in Zoho Recruit

Overview

The zoho.recruit.searchRecords task is used to search and fetch required records from Zoho Recruit. This task is based on the Zoho Recruit API - GetSearchRecords.

Syntax

<variable> = zoho.recruit.searchRecords(<module_name>, <searchCondition>, <fromIndex>, <toIndex>, <selectColumns>, <connection>);

where:

ParameterData typeDescription

<variable>

 LIST

The response returned by Zoho Recruit. 

<module_name>

 TEXT

The module in which the records will be searched.

Applicable modules:

  • Candidates
  • JobOpenings
  • Contacts
  • Clients
  • Interviews
  • Custom Module

<searchCondition>

 TEXT

The condition based on which the records will be fetched.

The condition must be in the following format: 
"<fieldName>|<operator>|<fieldValue>" 

Note:

<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.

<connection>

TEXT

The link name of the Zoho Recruit connection.

Note:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory in order for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter until you manually delete the authtoken from accounts.
  • Add relevant scopes mentioned in Zoho Recruit API while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Fetch records from Candidates module by specifying a criteria

The following script fetches records from the "Candidates" module, based on the specified criteria, fromIndex, toIndex and selected columns in Zoho Recruit.

response = zoho.recruit.searchRecords("Candidates", "State|=|California", 1, 3, "Last Name,Email");

where:

"Candidates"
is the TEXT module from which the records will be fetched.
"State|=|California"
is the TEXT that represents the criteria based on which the records will be fetched.
1
is the NUMBER that represents the index of the first record which will be fetched.
3
is the NUMBER that represents the index of the last record which will be fetched.
"Last Name,Email"
is the TEXT value that represents the selected column names of the records which will be fetched.

Response Format

Success Response
  • The success response will be returned in the following format:
      {
       "Email":"john@zylker.com",
       "CANDIDATEID":"3342000000267001",
       "Last Name":"Richard"
       }

To get the IDs of the records returned, execute the following script:

 for each rec in <response>
 {
 info rec.get("<MODULENAME>ID");
 // example for <MODULENAME> is CANDIDATE and example for <MODULENAME>ID is CANDIDATEID
 }
Failure Response
  • The failure response for invalid or incorrect parameter will be returned in the following format:
      {
       "message":"Invalid parameter value",
       "code":"4832"
       }

Related Links

Get Started Now

Execute