Choose where you’d like to start

Add record in Zoho Recruit

Overview

The zoho.recruit.addRecord task is used to create records in Zoho Recruit. This task is based on the Zoho Recruit API - Add records.

Syntax

<variable> = zoho.recruit.addRecord(<module_name>, <data_map>, <duplicate_check>, <workflow_trigger>, <connection>);

where,

ParameterData typeDescription

<response> 

KEY-VALUE

Response returned by Zoho Recruit.

<module_name>

TEXT

Name of the module in which the record will be created.

Following are the applicable modules:

  • Candidates
  • JobOpenings
  • Contacts
  • Clients
  • Interviews
  • Custom Modules

<data_map>

KEY-VALUE

Fields and their values to create the record with the required data.

Note: Keys and values should be specified as given in the Zoho Recruit API

<duplicate_check>NUMBER
Allowed values: 0,1,2
  • If the param is supplied with 1, it will throw an error if the same record already exists. 
  • If the param is supplied with 2, it will search and update the record if it already exists. 
  • If the param is supplied with 0, the record will be added as a new record.
<workflow_trigger>BOOLEAN
  • If this param is supplied with true, all the workflows configured for the specified module will be triggered for the current record.
  • If this param is supplied with false, no workflow will be triggered.

<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 - Add records API while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Create a record in Candidates module

The following script creates a record in the "Candidates" module in Zoho Recruit.

 candidatesMap = Map();
 candidatesMap.put("Last name","Richard");
 candidatesMap.put("Email","richard@zoho.com");
 candidatesMap.put("Mobile","+91 998877665");
 candidatesMap.put("Experience in years","5");
 candidatesMap.put("Current Job Title","Assistant Manager");
 candidatesMap.put("Skill Set","MCA");
 candidatesMap.put("Experience Details","Working in UTS for 5 years");

 response= zoho.recruit.addRecord("Candidates", candidatesMap, 0, false, "recruit_connection");

where:

 candidatesMap
is a KEY-VALUE that holds the values of the new record that will be created.
 "Last name"
 "Email"
 "Mobile"
 "Experience in years"
 "Current Job Title"
 "Skill Set"
 "Experience Details"
are TEXT keys that represent the label names of fields in Zoho Recruit which will constitute the record.
 "Richard"
 "richard@zoho.com"
 "+91 9988776655"
 "Assistant Manager"
 "MCA"
 "Working in UTS for 5 years"
are TEXT values that represents the values of fields in Zoho Recruit which will constitute the record.
 "Candidates"
is the TEXT that represents the module in which the record will be created.
 0
is the NUMBER that indicates that the record will be added as a new record.
false
is a BOOLEAN that indicates no workflow will be triggered.
 "recruit_connection"
is the TEXT that represents the link name of the connection.

Sample Response

The following is a sample success response:

{  
   "message":"Record(s) added successfully",
   "Created Time":"2015-11-19 18:04:55",
   "Modified By”:”john”,”Id":"1687000000116001",
   "Modified Time":"2015-11-19 18:04:55",
   "   Created By”:”john”
}

To get the ID of the newly created record, execute the following script:

<variable> = <response_variable>.get("Id").toLong();

The failure response returned, when mandatory params are not specified, is of the following format:

{  
   "message" :" Unable to populate data, please check if mandatory value is entered correctly.",
   "code":"4401"
}

Related Links

Get Started Now

Execute