Zoho Recruit Custom functions help you to update data in related Recruit modules or third-party applications by executing simple program scripts. When a record matches the workflow criteria, workflow engine automatically triggers the custom function and updates the Recruit records. With custom functions, you can program scripts using Deluge Script (powered by Zoho Creator), associate them with workflow rules, and automate the recruitment process. See Also Deluge Script - Reference Guide .
Business Scenario
Candidate screening is a time-consuming process. In order to simplify, you can create a custom function with Zoho Recruit. By doing this, the recruiter can prioritise their follow-ups and other engagements with candidates.
Ideal Users
- Recruit Administrators who set up workflow rules for Users
- Programmers with REST API and Deluge Script skills
Availability
Profile Permission Required: Users with the "Manage Workflow" permission can access this feature.
Set Up Custom Functions
You can set up custom functions in three steps:
- Create a custom function.
- Associate custom function to a workflow rule.
- Test custom functions integration.
To create a custom function
- Go to Setup > Automation > Actions > Custom Function.
- In the Workflow Custom Functions page, click the Configure Custom Function.
In the Configure Custom Function page, select a function from Gallery, existing function or write a new one using Deluge Script.
- Click Save.
To associate custom function to a workflow rule
- Click Setup > Automation > Actions > Rules.
- In the Workflow Rules page, click the Create Rule.
- In the Create New Rule tab, specify workflow rule parameters.
- Select Custom Function, under Instant Actions.
- Now select the custom function to be triggered.
- Click Save.
To test the custom function integration
- Add test data in Zoho Recruit according to your workflow rule criteria.
- Check for the data received from Zoho Recruit via custom function, in your application.
- Modify your custom function code in Zoho Recruit, if data is not received or if there is a data mismatch.
- Continue this test until you obtain the required data from Zoho Recruit to your Application.
Important Notes
Business Scenario
Candidate Screening Summary:
Candidates can be screened according to the custom set criteria. By mapping the arguments of the custom function to rank the candidates. We have taken the Phone number, E-mail address, Job title, Skill set and industry details of the candidates to rank them.
- id: Choose "Candidate Id" column from the list of fields.
- phone: Choose "Phone" column from the list of fields.
- email: Choose "Email" column from the list of fields.
- title: Choose "Job Title" column from the list of fields.
- skillSet: Choose "Skill set" column from the list of fields.
- resume: Choose "Is Attachment Present" column from the list of fields.
- authtoken: (Custom Value) Provide the authentication token required to access your Zoho Recruit account using an API call
Candidate status like: Junk Candidate, Unqualified, Rejected, Waiting for Evaluation will be assigned when the given set of criteria is met.
The Deluge Script for the above scenario goes like this:
if(phone.length() == 0 && email.length() == 0 && title.length() == 0 && skillSet.length() == 0 && resume == "false")
{
status = "Junk Candidate";
}
else if(phone.length() == 0 || email.length() == 0)
{
status = "Unqualified";
}
else if(title.length() == 0 && skillSet.length() == 0 || resume == "false")
{
status = "Rejected";
}
else
{
status = "Waiting-for-Evaluation";
}
updateMap = Map();
updateMap.put("candidateStatus",status);
updateMap.put("authtoken",authtoken);
updateMap.put("candidateIds",id.toString());
updateMap.put("scope","recruitapi");
updateMap.put("version","2");
response = postUrl("http://recruit.zoho.com/recruit/private/json/Candidates/changeStatus%22,updateMap);
To configure this custom function:
- Log in to Zoho Recruit.
- Setup > Automation > Actions > Rules > Create Rule.
You can create a new rule by specifying Module and Rule Name.
- Click Next.
- Choose when you want to execute this rule. Now select Create or Edit option under execute based on a record action.
- Click Next.
- Choose to which records you want to execute the rule. Select Records Matching the condition option and set the criteria.
- Click Next.
- Now choose Custom Function as Instant action.
- In the Call Custom Function pop-up, Click on +New Deluge to create or add Custom function.
- Click on the Gallery to use the pre-defined Custom Function.
- Click on Configure given against the Custom Function name- Screen Candidates.
- Edit the Title, Description and Deluge Script as per your requirements.
Refer Error Codes
When the execution of custom function fails, one of the following error messages will be displayed in Zoho Recruit:
HTTP Status Codes
- 400 Bad Request - Often missing a required parameter.
- 401 Unauthorized - No valid API key provided.
- 402 Request Failed - Parameters were valid but request failed.
- 404 Not Found - The requested item doesn't exist.
- 500, 502, 503, 504 Server errors - Error in the third-party application.
- Error Code 1 - Temporarily not able to connect to the API server. Check API server logs, firewalls settings for requests sent from Recruit.
Custom Errors
- Internal process failure - When the custom function is not executed due to errors in processing of the script.
- Day limit reached - When the company has reached the maximum limit for the day.
- Deluge Script - When the execution of workflow triggers fail due to errors in Deluge Script.