Salesforce practice project: recruitment and hiring app
On this page (9 sections)
Task 1: Build the data modelTask 2: Formulas and validation rulesTask 3: Security and accessTask 4: Automation with FlowTask 5: Reports and dashboardsTask 6: Agentforce agentsFinal check: test the whole appInterview questions this project prepares you forCommon questionsBuild an applicant tracking app: candidates, job positions, recruiters and interviews. It calculates salary hikes and notice buyouts, emails interview invites and reminders, and keeps salary data private.
Skills you will practise: custom objects and junction objects, percentage formulas, field-level security for salary data, all main flow types, reports for recruiters, Agentforce.
Build everything in a free Salesforce Developer Edition org. Each task has a check so you know when it is done, and a model answer you can open if you get stuck. Try it yourself first: the struggle is where the learning happens.
Task 1: Build the data model
Create five custom objects. Interview links a candidate and a job position, and Position Recruiter links positions and recruiters.
Candidate (Candidate__c)
| Field | Type |
|---|---|
| Candidate ID | Auto number: CAND-{0000} |
| Applied | Date/Time |
| Email / Phone | Email / Phone |
| URL | |
| Years of Experience | Number (2, 0) |
| Current Salary / Expected Salary | Currency |
| Notice Period (days) | Number (3, 0) |
| Status | Picklist: Applied, Screening, Interviewing, Offered, Hired, Rejected |
| Skills | Multi-select picklist: Salesforce, Java, Python, LWC, Agentforce, AWS |
| Willing to Relocate | Checkbox |
| Resume | Rich text area |
| HR Notes | Text (encrypted) |
| Interviews | Roll-up summary: COUNT of Interviews |
Job Position (Job_Position__c)
| Field | Type |
|---|---|
| Department | Picklist |
| Min / Max Budget | Currency |
| Urgent | Checkbox |
| Description | Long text area |
Recruiter (Recruiter__c)
| Field | Type |
|---|---|
| Work Email | |
| Active | Checkbox |
Position Recruiter (Position_Recruiter__c), junction object
| Field | Type |
|---|---|
| Job Position | Master-detail to Job Position |
| Recruiter | Master-detail to Recruiter |
| Lead Recruiter | Checkbox |
Interview (Interview__c), junction object
| Field | Type |
|---|---|
| Candidate | Master-detail to Candidate |
| Job Position | Master-detail to Job Position |
| Scheduled | Date/Time |
| Round | Picklist: HR, Technical 1, Technical 2, Manager |
| Rating | Number (1, 0), 1 to 5 |
| Feedback | Long text area |
| Offer Extended | Checkbox |
Create the objects and fields
Admin basicsCreate each object above in Object Manager, then add the fields with the types shown. Create the master-detail fields before the roll-up summary fields, because a roll-up can only summarise a master-detail child.
- One candidate can interview for several positions.
- Interviews on the candidate counts their interviews.
Show a model answer
Order matters here. Create the objects that Position Recruiter, Interview point to before them, because a junction object needs both masters to exist. The Interviews roll-up on Candidate can only be added after the master-detail field on the child exists. Interview needs both Candidate and Job Position, so create those two first. Keep salary fields as Currency so they work in reports and formulas.
Task 2: Formulas and validation rules
Formula: Experience Level
On CandidateIF(Years_of_Experience__c <= 2, "Entry",
IF(Years_of_Experience__c <= 6, "Mid", "Senior"))Base this on a Years of Experience field. Working it out from age, as some examples do, gives wrong answers for career changers.
- Create test records and confirm Experience Level shows the expected value for each branch of the formula.
Formula: Expected Hike %
On CandidateIF(Current_Salary__c > 0,
(Expected_Salary__c - Current_Salary__c) / Current_Salary__c,
0)Return type Percent, so no need to multiply by 100.
- Create test records and confirm Expected Hike % shows the expected value for each branch of the formula.
Formula: Within Budget
On InterviewAND(
Candidate__r.Expected_Salary__c >= Job_Position__r.Min_Budget__c,
Candidate__r.Expected_Salary__c <= Job_Position__r.Max_Budget__c
)A checkbox formula that compares fields on two different parents.
- Create test records and confirm Within Budget shows the expected value for each branch of the formula.
Validation rule: No interviews in the past
On InterviewBlock the save with the message "Interviews cannot be scheduled in the past.".
- Try a record that breaks the rule: the save is blocked and the message appears.
- Try a valid record: it saves normally.
Show a model answer
AND(ISNEW(), Scheduled__c < NOW())Validation rule: Senior candidates need LinkedIn
On CandidateBlock the save with the message "A LinkedIn profile is required for candidates expecting more than 200,000.".
- Try a record that breaks the rule: the save is blocked and the message appears.
- Try a valid record: it saves normally.
Show a model answer
AND(Expected_Salary__c > 200000, ISBLANK(LinkedIn__c))Validation rule: Rating needs feedback
On InterviewBlock the save with the message "Please add feedback when you give a rating.".
- Try a record that breaks the rule: the save is blocked and the message appears.
- Try a valid record: it saves normally.
Show a model answer
AND(NOT(ISBLANK(Rating__c)), ISBLANK(Feedback__c))Task 3: Security and access
Set up sharing, roles and permissions
SecurityOrganisation-wide defaults:
- Candidate: Private
- Job Position: Public Read Only
- Interview: Controlled by Parent
Role hierarchy: VP of HR, then HR Manager, then Recruiter.
Profiles: Recruiter and Interviewer.
Permission set "Compensation Administrator": read and edit access to Current Salary and Expected Salary on Candidate.
- Log in as an interviewer: the salary fields are not visible.
- Log in as a user higher in the role hierarchy and confirm they can see their team's records.
Show a model answer
Set the defaults in Setup, Sharing Settings. Interview has no setting of its own: a detail record always follows its master. For the permission set, remove the sensitive fields from the new profiles first; otherwise the permission set adds nothing. Interviewers should not see salaries at all, so hide the fields on the Interviewer profile completely rather than making them read-only. Test with Login As (switch it on in Setup, Login Access Policies).
Task 4: Automation with Flow
You will build one of every main flow type: two screen flows, a subflow, two record-triggered flows and a schedule-triggered flow.
Screen flow 1: home page welcome banner
Screen flowShow a greeting on the app's home page using global variables. Add a Display Text component with:
Welcome to the Recruitment Portal, {!$User.FirstName} {!$User.LastName}!
Your role: {!$UserRole.Name}
Your profile: {!$Profile.Name}
Today: {!$Flow.CurrentDate}Add the flow to the home page with Lightning App Builder.
- The banner shows your own name, role and profile name.
- Log in as another user: the banner changes to their details.
Show a model answer
Use $UserRole.Name and $Profile.Name rather than $User.UserRoleId and $User.ProfileId, which show record IDs instead of names. A screen flow on a home page needs no Start conditions: drag the Flow component onto the page and choose the flow.
Screen flow 2: candidate registration
Screen flowScreen 1 collects: name, email, phone, expected salary and skills.
Screen 2 appears only when expected salary is above 200,000: make LinkedIn required.
Then: create the candidate and open the record.
- Run the flow with values that meet the condition: screen 2 appears and both records are created and linked.
- Run it again without meeting the condition: screen 2 is skipped.
Show a model answer
Put a Decision element between the screens, or use one screen with component visibility rules. Create the parent record first, then use its ID (the Create Records element stores it automatically) when you create the child. Add a fault path to each Create Records element that shows the error on a screen.
Subflow: notice period buyout
SubflowBuild an autolaunched flow that other flows can call.
Inputs: Notice Days (number), Current Salary (currency).
Outputs: Buyout Cost (currency).
Logic: If the notice period is over 60 days, the buyout costs one month of salary. Otherwise it is 0.
- Debug the subflow on its own with sample inputs and check each output.
- Call it from the record-triggered flow below and confirm the result is saved.
Show a model answer
Mark the input variables "Available for input" and the outputs "Available for output". A formula resource keeps the maths in one place, for example:
IF({!varNoticeDays} > 60, {!varCurrentSalary} / 12, 0)Record-triggered flow: interview invitation
Record-triggered flowRuns when: an interview is created.
- Email the candidate the date, time and round.
- Email the lead recruiter for the position.
- Schedule an interview and confirm both emails.
Show a model answer
Choose "Actions and Related Records" (after save), because a before-save flow cannot call a subflow or send email. Set the entry condition to "Only when a record is updated to meet the condition requirements" so it runs once, not on every edit.
Record-triggered flow: notify on Scheduled change
Record-triggered flowWhen Scheduled changes, email the candidate and the panel with the new value.
- Change Scheduled on a test record and confirm the email arrives (check Setup, Email Log Files or your inbox).
- Edit another field: no email is sent.
Show a model answer
Use the entry condition formula ISCHANGED({!$Record.Scheduled__c}) (or the "Is Changed" operator), and a text template for the email body that uses {!$Record.…} merge fields. Make sure Setup, Deliverability is set to "All email" in a Developer Edition org.
Schedule-triggered flow: interview day reminder
Schedule-triggered flowSchedule: every day at 7:00 AM.
Records: interviews scheduled for today.
Action: email the candidate and the interview panel.
- Use Debug (it runs against real records) and confirm only the right records are picked.
- Check Setup, Scheduled Jobs to see the next run time.
Show a model answer
Use a formula checkbox DATEVALUE(Scheduled__c) = TODAY(), or a scheduled path on the invitation flow set to a few hours before Scheduled.
Task 5: Reports and dashboards
Build the reports and dashboard
Reports- Candidates by status and skill: summary report grouped by Status. Multi-select picklists cannot be grouped, so use a filter such as Skills includes Salesforce.
- Interviews per position: summary report on Interviews grouped by Job Position and Round.
Then create the dashboard Talent Acquisition with: a donut chart of candidates by status and a bar chart of interviews per position.
- Each report returns rows and the groupings match the task.
- The dashboard refreshes and each chart shows the right report.
- Set the dashboard's running user, then check what a lower-role user sees.
Show a model answer
Multi-select picklists such as Skills cannot be used for grouping, so filter on them instead, or add a separate Primary Skill picklist if you need to group. Dashboards show data as their running user unless you choose "Run as logged-in user", so decide who should see the full Talent Acquisition figures.
Task 6: Agentforce agents
Agentforce is available in Developer Edition orgs that have Agentforce turned on. You can build the four roles below as four separate agents, or as one agent with four subagents. One agent with four subagents is easier to maintain and closer to how most real projects work.
Sourcing agent
AgentforceRegisters candidates through chat using the registration flow.
Interview coordinator
AgentforceLists today's interviews and reminds the panel.
Offer agent
AgentforceCalculates the expected hike and notice buyout for a candidate.
Hiring operations agent
AgentforceShows each recruiter's open positions.
Write the subagent instructions
AgentforceFor the sourcing agent and the offer agent, write a classification description that says when each subagent applies, plus three to five instructions that say what the agent must and must not do. Name each action clearly and describe its inputs, because the agent reads those descriptions to decide what to call.
- In Agentforce Builder's conversation preview, ask a question for each subagent and confirm the right subagent and action are chosen.
- Ask something off-subagent (formerly called topic) and confirm the agent declines politely.
Show a model answer
Invocable actions need a description on the method and on each input variable. Keep each subagent narrow. If the agent picks the wrong subagent, sharpen the subagent descriptions rather than adding more instructions.
Final check: test the whole app
End-to-end test
Final check- Log in as an interviewer: salary fields are hidden.
- Schedule an interview in the past: blocked.
- Schedule a valid interview: the candidate gets an invitation.
- Ask the offer agent for a candidate's expected hike and buyout cost.
- Every step behaves as described. If one fails, fix it before you add the project to your CV.
Interview questions this project prepares you for
- Admin interview questions
- Security interview questions
- Flow interview questions
- Agentforce questions for experienced
Built the project and want feedback? Our Salesforce training and mock interviews include a review of your build, and the questions an interviewer would ask about it.
Common questions
01Does this replace a real applicant tracking system?
Does this replace a real applicant tracking system?
No. It shows how Salesforce can run a hiring process, which is a common request from HR teams. A real build would add a careers site with Experience Cloud and email-to-case for applications.
02Why use Years of Experience instead of age?
Why use Years of Experience instead of age?
Age says nothing reliable about experience, and using it could look like age discrimination. Interviewers notice this kind of judgement.
03How long does it take?
How long does it take?
About 12 hours. The security checks are the part people most often get wrong.