Body
Overview
HCOM Human Resources would like to import all candidates that apply to a position into Salesforce from Oracle using DataLoader. This article explains how to find existing candidates and update their Candidate record with a new HR Application for a Position and how to create new Candidates and HR Applications for a Position using reports and DataLoader.
Find Existing Candidates/Create New HR Application
If a candidate already exists in Salesforce, you won't want to create a new one, you'll want to create a new HR Application record related to the Candidate for the Position they are applying for. To do this, follow the steps below.
- Pull this report from Salesforce of all existing Candidates.
- Do a vLookup on your report from Oracle based on email to find their 18-digit record ID.
- On your Oracle sheet, create a column for 18-digit record Id
- In the first cell, enter the vlookup function (=vlookup) and use the table to enter in the:
- Lookup Value (email address from the candidate on your oracle sheet)
- Table Array (columns A (email) & B (record ID 18) from your Salesforce report)
- Col_Index_Num (this will always be 2 if your report format stays the same, otherwise it's the column number from the left with the data you want returned)
- Range_Lookup (always 'FALSE')

- After your vlookup is complete, you can see which candidates already exist in Salesforce, so we won't be creating those records, we'll be updating them. Filter out the records who don't already exist and save them on a new spreadsheet - we'll use them later.
- Are any of the candidates an existing employee? If so, you'll want to add a column to your file for 'Employee 18-digit ID', search for their employee record in Salesforce and populate that column with their ID.
- Create a new column on your spreadsheet for 'Position'. In this column, you will enter the 18-digit record ID of the position these people are applying for. To find it, follow the steps below.
- Navigate to your Position in Salesforce. and in the URL, grab the code between the slashes that starts with 'a4g'.

- Paste that into the 'Position' column on your spreadsheet for all candidates. Save your file as a .CSV.
- Create new HR Applications using DataLoader
- Open DataLoader and click the 'Insert' button

- Find 'HR Application' in the pop-up window and navigate to your CSV file of existing candidates. Click 'Next'.

- Skip Step2b (optional) window by clicking 'Next'.
- Next is the mapping, telling DataLoader which fields from your csv file you want mapped to Salesforce. First, click 'Create or Edit Map' then, 'Clear all Mapping'. Salesforce tried to auto-map and we don't need that.

- The column headers on the left are from your CSV file and the column headers on the right are in Salesforce. Search the fields in the above section, and drag and drop them to the appropriate row.
- Candidate__r-Id is mapped to the 18-digit Candidate ID in your CSV
- Position__r-Id is mapped to the Position ID in your CSV
- If you have employees, map Employee__r-Id to their 18-digit ID in your CSV
- No other fields need mapped, click 'OK' then 'Next'.
- On the Step 4 - Save your results window, be sure to save your results to a folder you can easily navigate back to, you might need to find the success/error files from this load. Then click 'Finish'. Once complete, DataLoader will tell you how many successful/errored loads there were.
- Review in Salesforce that you can see the new HR application for the Candidate for the appropriate position. Ensure all data is populated correctly.
Create New Candidate Records
To create new candidates and HR applications, two separate loads will have to be completed via DataLoader.
First, start with creating new Candidates.
- Find the list you saved earlier of candidates from Oracle who do not already have Salesforce candidate records and make sure all contact information is filled out.
- Open DataLoader and select 'Insert'.

- Search for the 'Candidate' object and import from your saved file. Click 'Next'.

- Skip Step 2b.
- Click 'Create or Edit Map' then, 'Clear all Mapping'. Salesforce tried to auto-map and we don't need that.
- Drag and Drop the appropriate Salesforce fields to match the column headers of your CSV file accordingly.
- First Name
- Middle Initial
- Last Name
- Phone
- Email

- Click 'OK' then 'Next'.
- On the 'Step 4 - Save your results' window, be sure to save your results to a folder you can easily navigate back to, you will need to find the success/error files from this load. Then click 'Finish'. Once complete, DataLoader will tell you how many successful/errored loads there were.
- Review in Salesforce that the new Candidate records have been created.
Create New HR Applications for the Newly Created Candidates
Next, the Candidate records need to be linked to new HR applications. To do this, follow the steps below.
- Find the 'Success' csv file from the load you completed in the previous step. This file provides the 18-digit Candidate ID it created.
- Add a column to this file for 'Position' and populate it with the 18-digit ID of the position these people are applying to. Save the file as a CSV.
- Open DataLoader and select 'Insert'. HR Application will be the object you import to.

- Select the file you saved above. Click 'Next'.
- Clear the mapping as you've done in previous steps. You only need to map 2 fields.
- Candidate__r-Id is mapped to the 18-digit Candidate ID in your CSV
- Position__r-Id is mapped to the Position ID in your CSV
- Click 'OK' then 'Next'.
- On the 'Step 4 - Save your results' window, be sure to save your results to a folder you can easily navigate back to, you might need to find the success/error files from this load. Then click 'Finish'. Once complete, DataLoader will tell you how many successful/errored loads there were.
- Review in Salesforce that the new HR Application records have been created and related to appropriate Candidates/Positions.
Get help from HCOM IT