Build an Automation for Creating Interviewer Records
Learning Objectives
In this project, you’ll:
- Build automations in an HR recruiting app that streamline workflow for creating interviewer records and approving new positions.
- Create a flow for the app to simplify the process of rating candidates and make the rating process consistent.
Introduction
As AW Computing grows, you continue to look for new talent. You’ve already taken care of a number of requests from Ling Wu, the vice president of Human Resources, to improve her team’s recruiting app. Now she’d like you to add automation to the mix.
Ling would like to automate the creation of interviewer records for hiring managers. She’d like to establish an approval process for new positions. And she wants a more user-friendly process for candidate scoring.
Set Up a Flow
The first thing to tackle is automated interviewer records. To set this up, use Flow Builder, which automates tasks using conditions and actions. With Flow Builder, you establish the criteria that records must meet to trigger the flow.
Once your criteria are in place, immediate or time-dependent actions are set in motion. These actions can include creating a record, updating a record, sending an email, posting to Slack, initiating an action, submitting for approval, or calling an Apex class.
First things first, deactivate a previously created validation rule.
- From Setup, click the Object Manager tab.
- Click Position then Validation Rules.
- Click Every_Position_Must_Have_a_Hiring_Mgr to open this Validation Rule.
- Click Edit.
- Deselect the Active checkbox and Save.
Next, build a flow to create the interviewer record.
- From Setup, enter
flows
in the Quick Find box and select Flows. - Click New Flow.
- Select Record-Triggered Flow and click Create.
- Enter and select Position for the Object.
- Select A record is created in the Configure Trigger section.
- In the Condition Requirements, select All Conditions Are Met (AND).
- Set the conditions.
- For Field, select Hiring_Manager__c
- Operator: Is Null
- For Value, select GlobalConstant.False
- Ensure Actions and Related Records is selected.
- On the flow canvas, hover over and click to add an element.
- In the Add Element search box, enter
create
and select Create Records. - Fill in the details for the new record:
- Label:
Create Interviewer Record
- How Many Records to Create: One
- How to Set the Record Fields: Use separate resources, and literal values
- Label:
- In the Create a Record of This Object section, search and select the Interviewer.
- In the Set Field Values for the Interviewer section, click Add Field to add a 2nd field.
- Fill in the details:
- Field 1: select Employee__c
- Value 1: select $Record > Hiring_Manager__c
- Field 2: select Position__c
- Value 2: select $Record > Id
- Click Save.
- Enter
Create Interviewer Record
for the Flow Label. - Click Activate.
- Click to return to setup.
Test the Flow
Now that the flow is activated, you can test the automation you just created. But first, add a hiring manager user.
- From Setup, enter
Users
in the Quick Find box and select Users. - Click New User and fill in the details.
Field | Value |
---|---|
First Name |
|
Last Name |
|
|
enter your own email |
Username |
kcooper@[your initials + your favorite color].com (e.g., |
Nickname |
|
Title |
|
Role |
Customer Support, North America |
User License |
Salesforce Platform |
Profile |
Standard Platform User |
- Deselect Generate new password and notify user immediately.
- Click Save.
Now test the automation you created.
- Click to open the App Launcher, then select Recruiting.
- Click the Positions tab, then New.
- Select the record type Nontechnical Position, then click Next and fill in the details.
Field | Value |
---|---|
Title |
|
Status |
New |
Department |
Support |
Location |
US |
Hiring Manager |
Kathy Cooper |
Job Description |
|
Pay Grade |
S-200 |
- Click Save.
- Click the Related tab.
- From the Interviewers related list, click an Interviewer number and note the values in the Employee and Position fields.
Now that you’ve set up an automation for creating interviewer records, move on to the next step, where you do some necessary prep work before you can set up an approval process for creating positions.