Overview
This guide shows you how to bring accepted offers from an external Applicant Tracking System (ATS) into Rippling as draft hires (candidates that have been offered positions). You’ll retrieve offer data, stage it for review, map ATS values to Rippling IDs, and create a draft hire ready for onboarding.
When to use this solution
Use this approach when your hiring process starts in an external ATS and you want to:
- Review offer data in Rippling before creating a hire.
- Translate ATS values into the IDs Rippling requires.
- Create draft hires that can proceed through Rippling’s onboarding process.
What you'll build
- A custom pipeline to pull offers from the ATS.
- Custom objects to stage those offers.
- A transformation to map fields for the Create and Bulk Hire Draft Hires API.
- Functions to create the draft hires.
- Automations to run the sync.
- An optional custom app for HR review.
Architecture
- Create a staging object so each offer has a place to land before anyone is hired.
- Pull the offer into that object. If the ATS splits the offer across objects, use the path in Pull offers into staging.
- Map ATS values to Rippling IDs.
- Create draft hires from that dataset.
- Run the sync on a schedule, and let HR know when new draft hires are ready.
Figure 1: Offers leave the ATS, land in a staging object, and become draft hires after the transformation and function run.
The steps below follow that order. Job mapping and the review app are optional, and you can add them once draft hires are being created.
Requirements
Before you begin, you need:
- Rippling products: API SKU, Custom Objects, Functions, Automations, and Rippling AI.
- Permission to build a pipeline (Rippling AI subscription).
- Permission to create a function (Rippling Unity Pro subscription or higher).
- API access:
- Credentials for the ATS (API key or OAuth token).
- A Rippling API token with these scopes:
| Scope | Access |
|---|---|
draft-hires.read-write | Create and manage draft hires in HRIS, and push new employees into Rippling’s onboarding flow before they become workers. |
custom-objects.read-write | Create and manage custom objects. |
custom-object-records.read-write | Create and manage records (data rows) on custom objects. |
functions.read-write | Create and manage Rippling Functions in the Developer app. |
function-executions.read-write | Run deployed functions and retrieve function executions (status, outputs, and run history). |
These samples show how the pieces fit together. Before you rely on them in production, check the endpoints and auth against your ATS vendor's docs, match the payload to your fields, and add the error handling you need.
Video walkthrough
If you prefer a visual guide, watch one of our Forward Deployed Engineers build this solution using the steps in this guide.
Create the staging object
Add the staging fields
Create a custom object to hold ATS offers so you can review and map them before anyone becomes a draft hire.
- Navigate to Data > Catalog in Rippling.
- Click +New object and detail the following:
- Object name: "ATS Candidate Staging"
- API name (created automatically):
ats_candidate_staging__c - Description: "Staging table for candidates from external ATS"
- How would you like to create this object?: Import a CSV or create it manually
- Add the following fields by selecting Add field after the object has been created:
| Field name | API name | Field type | Data type | Description |
|---|---|---|---|---|
| External Candidate ID | external_candidate_id__c | Basic | Text | ATS candidate ID (one candidate can have multiple offers) |
| External Offer ID | external_offer_id__c | Basic | Text | Unique ATS offer ID (use this as the unique reference so a later offer isn’t treated as a duplicate) |
| First Name | first_name__c | Basic | Text | Candidate first name |
| Last Name | last_name__c | Basic | Text | Candidate last name |
email__c | Basic | Candidate email | ||
| Phone | phone__c | Basic | Phone Number | Candidate phone |
| Job Requisition ID | job_req_id__c | Basic | Text | ATS job requisition ID |
| Job Title | job_title__c | Basic | Text | Position title |
| Offer Status | offer_status__c | Basic | Choice | Pending, Accepted, Declined |
| Start Date | start_date__c | Basic | Date | Expected start date |
| Salary | salary__c | Basic | Currency | Offered compensation |
| Employment Type | employment_type__c | Basic | Choice | Full-time, Part-time, Contractor |
| Work Location | work_location__c | Basic | Text | Office location |
| Department | department__c | Basic | Text | Department name |
| Manager Email | manager_email__c | Basic | Hiring manager email | |
| Sync Status | sync_status__c | Basic | Choice | Pending, Processing, Completed, Failed, Needs cancellation |
| Error Message | error_message__c | Basic | Long Text | Error details if sync failed |
| Draft Hire ID | draft_hire_id__c | Basic | Text | Rippling Draft Hire ID after creation |
| Last Synced At | last_synced_at__c | Basic | Date Time | Last sync timestamp |
Add a job mapping object (optional)
If your ATS job requisitions need mapping to Rippling entities, create an additional custom object:
- Object name: "ATS Job Mapping"
- API name:
ats_job_mapping__c
Add the following fields:
| Field name | API name | Field type | Data type | Description |
|---|---|---|---|---|
| ATS Job ID | ats_job_id__c | Basic | Text | Job ID in external ATS |
| Rippling Department ID | rippling_department_id__c | Basic | Text | Mapped Rippling department |
| Rippling Work Location ID | rippling_work_location_id__c | Basic | Text | Mapped work location |
| Rippling Employment Type ID | rippling_employment_type_id__c | Basic | Text | Mapped employment type |
| Rippling Legal Entity ID | rippling_legal_entity_id__c | Basic | Text | Mapped legal entity |
Pull offers into staging
Choose how the ATS returns the offer
The sync_ats_candidates function below assumes your ATS returns a single offer record. If your data is structured differently, choose the closest matching path built by Rippling’s Forward Deployed Engineering (FDE) team for real customer implementations like Retool, Away Travel, Symplr and more.
| If your ATS looks like this | Build this | Works with | | --- | --- | --- | --- | | Offer, application, and candidate are separate objects | Land each object as its own pipeline stream, then join them in the transformation on application id and candidate id so you only create a draft hire for the accepted offer. | Ashby, Greenhouse | | The offer is one record, and candidate details need a second call | Pull offers on one stream and load the candidate from a sub-stream. You can skip the SQL join, because the pipeline already assembled the offer. | Gem, iCIMS | | You hire when the applicant reaches a stage, not when an offer is accepted | Sync applicants in the pipeline, and have a function create the draft hire only after the applicant reaches that stage. | Fountain |
For these cases, use a custom pipeline to ingest each ATS object as a separate stream, then join the streams in the Map ATS values to Rippling IDs transformation.
Use sync_ats_candidates only for the single-offer case. It writes records directly to the staging custom object, whereas a function used as a pipeline stream must return records for the pipeline to store.
Save the API credentials
The sync function reads these settings, and the draft hire function uses the same Rippling token later.
- Open Developer, then select Custom Settings under Build. If your sidebar groups apps under Tools, open Tools > Developer first.
- Click New and add the following settings:
| Display name | Input type | Value |
|---|---|---|
rippling_api_token | Secret | API token |
ats_api_key | Secret | External ATS API key |
ats_base_url | String | External ATS base URL |
After creating the functions below, link these settings to sync_ats_candidates. Link rippling_api_token to the draft hire function as well. Each function needs its own links before it can read the settings through context.settings.
Create the sync function
This function is the single-offer case. sync_ats_candidates calls the ATS and writes one staging row per accepted offer, and Pull new offers runs it on the cadence you choose.
- Navigate to Tools > Developer > Functions.
- Click +New, name the function
sync_ats_candidates, and select Save. - Customize the following code for your setup:
import RipplingSDK, {
FunctionContext,
FunctionEvent,
FunctionResponse,
} from "@rippling/rippling-sdk";
export async function onRipplingEvent(
event: FunctionEvent,
context: FunctionContext
) {
const token = context.settings["rippling_api_token"];
const ripplingSDK = new RipplingSDK({ bearerToken: token });
const atsApiKey = context.settings["ats_api_key"];
const atsBaseUrl = context.settings["ats_base_url"];
try {
const offers = await fetchATSOffers(atsApiKey, atsBaseUrl);
let processed = 0;
let errors = [];
for (const offer of offers) {
try {
const existingRecords = await ripplingSDK.customObjects.records.query(
"ats_candidate_staging__c",
{
query: `external_offer_id__c = '${offer.id}'`,
limit: 1
}
);
if (existingRecords.results.length === 0) {
await ripplingSDK.customObjects.records.create(
"ats_candidate_staging__c",
{
external_candidate_id__c: offer.candidate_id,
external_offer_id__c: offer.id,
first_name__c: offer.first_name,
last_name__c: offer.last_name,
email__c: offer.email,
phone__c: offer.phone,
job_req_id__c: offer.job_id,
job_title__c: offer.job_title,
offer_status__c: "Accepted",
start_date__c: offer.start_date,
salary__c: offer.salary,
employment_type__c: offer.employment_type,
work_location__c: offer.location,
department__c: offer.department,
manager_email__c: offer.hiring_manager_email,
sync_status__c: "Pending",
last_synced_at__c: new Date().toISOString()
}
);
processed++;
} else {
const existingRecord = existingRecords.results[0];
if (existingRecord.sync_status__c !== "Completed") {
await ripplingSDK.customObjects.records.update(
"ats_candidate_staging__c",
existingRecord.id,
{
offer_status__c: offer.offer_status,
start_date__c: offer.start_date,
last_synced_at__c: new Date().toISOString()
}
);
}
}
} catch (err) {
errors.push({ offerId: offer.id, error: err.message });
}
}
return new FunctionResponse({
statusCode: 200,
body: { processed, errors },
headers: {},
message: `Synced ${processed} offers with ${errors.length} errors`
});
} catch (error) {
console.error("ATS sync failed:", error);
return new FunctionResponse({
statusCode: 500,
body: { error: error.message },
headers: {},
message: "Failed to sync offers from ATS"
});
}
}
async function fetchATSOffers(apiKey: string, baseUrl: string) {
const response = await fetch(`${baseUrl}/v1/offers?status=accepted`, {
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json"
}
});
if (!response.ok) {
throw new Error(`ATS API error: ${response.status}`);
}
const data = await response.json();
return data.offers;
}
The above example fetches accepted offers only and skips updates when sync_status__c is Completed. If you also need to flag a declined offer, extend this function so it:
- Fetches declined offers as well as accepted ones (your ATS may use a second request or a status filter).
- On create, sets
offer_status__cfrom the ATS value instead of hardcodingAccepted. - On update, still writes
offer_status__cwhensync_status__cisCompleted; otherwise a later decline never reaches staging and the automation never runs.
- Select the three dots in the right-hand corner > Update allowed domains > Allow Rippling and additional domains > enter the ATS API domain > Save.
- Save and deploy the function.
Check that staging rows landed
After the sync runs, verify that:
- New staging records appear in the custom object.
- Each record uses the correct
external_offer_id__cas the unique key. sync_status__cstarts asPendingfor newly created offers.
Map ATS values to Rippling IDs
Create a transformation that reads the staging row and fills in the Rippling IDs the draft hire API expects.
The SQL below assumes each staging row is already one offer. If you landed offer, application, and candidate as separate pipeline streams, join each stream in this query on application id and candidate id, and keep only the accepted offer.
Write the transformation
- Navigate to Data > Transformations and select +New transformation.
- Customize the following SQL for your setup:
SELECT
s.id AS staging_record_id,
s.external_candidate_id__c,
s.external_offer_id__c,
s.first_name__c,
s.last_name__c,
s.email__c,
s.job_title__c,
s.start_date__c,
s.salary__c,
COALESCE(m.rippling_department_id__c, d.id) AS department_id,
COALESCE(m.rippling_work_location_id__c, w.id) AS work_location_id,
COALESCE(m.rippling_employment_type_id__c, e.id) AS employment_type_id,
COALESCE(m.rippling_legal_entity_id__c, l.id) AS legal_entity_id,
mgr.id AS manager_id
FROM ats_candidate_staging__c s
LEFT JOIN ats_job_mapping__c m
ON s.job_req_id__c = m.ats_job_id__c
LEFT JOIN department d
ON LOWER(s.department__c) = LOWER(d.name)
LEFT JOIN work_location w
ON LOWER(s.work_location__c) = LOWER(w.name)
LEFT JOIN employment_type e
ON LOWER(s.employment_type__c) = LOWER(e.name)
LEFT JOIN legal_entity l
ON l.is_primary = true
LEFT JOIN worker mgr
ON LOWER(s.manager_email__c) = LOWER(mgr.work_email)
WHERE s.sync_status__c = 'Pending'
AND s.offer_status__c = 'Accepted'
When you publish the transformation, Rippling creates a custom object for the result, such as ats_dataset__c. Each row is an accepted offer that has not been hired yet, with the Rippling IDs filled in:
{
"staging_record_id": "6849d307154911bfc2ac5867",
"external_candidate_id__c": "CAND-456",
"external_offer_id__c": "OFFER-123",
"first_name__c": "Jane",
"last_name__c": "Doe",
"email__c": "jane.doe@example.com",
"job_title__c": "Software Engineer",
"start_date__c": "2026-10-01",
"salary__c": 120000,
"department_id": "58d7f8c0a0a0a0a0a0a0a0a1",
"work_location_id": "58d7f8c0a0a0a0a0a0a0a0a2",
"employment_type_id": "58d7f8c0a0a0a0a0a0a0a0a3",
"legal_entity_id": "58d7f8c0a0a0a0a0a0a0a0a4",
"manager_id": "58d7f8c0a0a0a0a0a0a0a0a5"
}
Publish the dataset
- Select Publish, and configure the following:
- Category: Custom object
- Display name: e.g., "ATS Dataset"
- API name: Auto-created based on the display name (the API name cannot be edited after the transformation is published)
- SQL name: e.g.,
ats_dataset
- Select Continue.
Custom objects from transformations refresh on a schedule, nightly, or when you click Refresh data. A new staging row does not appear in ats_dataset__c until that refresh runs.
Create the draft hires
This function reads the published dataset and creates the draft hires. After you publish, replace ats_dataset__c in the code with the API name Rippling assigned. That name comes from the display name, and you cannot change it later.
Create the draft hire function
- Navigate to Tools > Developer > Functions.
- Create a new function called
create_draft_hires_from_staging. - Customize the following code for your setup:
import RipplingSDK, {
FunctionContext,
FunctionEvent,
FunctionResponse,
} from "@rippling/rippling-sdk";
export async function onRipplingEvent(
event: FunctionEvent,
context: FunctionContext
) {
const token = context.settings["rippling_api_token"];
const ripplingSDK = new RipplingSDK({ bearerToken: token });
try {
const pendingRecords = await ripplingSDK.customObjects.records.query(
"ats_dataset__c",
{
limit: 5
}
);
if (pendingRecords.results.length === 0) {
return new FunctionResponse({
statusCode: 200,
body: { message: "No pending records to process" },
headers: {},
message: "No pending candidates"
});
}
const draftHires = [];
const recordsToCreate = [];
const results = { success: [], failed: [] };
for (const record of pendingRecords.results) {
try {
await ripplingSDK.customObjects.records.update(
"ats_candidate_staging__c",
record.staging_record_id,
{ sync_status__c: "Processing" }
);
if (!record.work_location_id) {
throw new Error(
`Work location not mapped for offer ${record.external_offer_id__c}`
);
}
if (!record.employment_type_id) {
throw new Error(
`Employment type not mapped for offer ${record.external_offer_id__c}`
);
}
draftHires.push({
personal_info: {
name: {
first: record.first_name__c,
last: record.last_name__c
},
invite_email: record.email__c
},
employment_info: {
start_date: record.start_date__c,
title: record.job_title__c,
department_id: record.department_id,
employment_type_id: record.employment_type_id,
work_email: record.email__c
},
work_location_info: {
location_id: record.work_location_id
},
compensation_info: {
salary: record.salary__c
}
});
recordsToCreate.push(record);
} catch (err) {
await ripplingSDK.customObjects.records.update(
"ats_candidate_staging__c",
record.staging_record_id,
{
sync_status__c: "Failed",
error_message__c: err.message
}
);
results.failed.push({
offerId: record.external_offer_id__c,
id: record.staging_record_id,
error: err.message
});
}
}
if (draftHires.length > 0) {
const response = await fetch(
"https://rest.ripplingapis.com/draft-hires/",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ draft_hires: draftHires })
}
);
const result = await response.json();
for (let i = 0; i < result.successful_results.length; i++) {
const draftHireResult = result.successful_results[i];
const transformedRecord = recordsToCreate[i];
await ripplingSDK.customObjects.records.update(
"ats_candidate_staging__c",
transformedRecord.staging_record_id,
{
sync_status__c: "Completed",
draft_hire_id__c: draftHireResult.draft_hire_role_id
}
);
results.success.push({
offerId: transformedRecord.external_offer_id__c,
id: transformedRecord.staging_record_id,
draftHireId: draftHireResult.draft_hire_role_id
});
}
}
return new FunctionResponse({
statusCode: 200,
body: results,
headers: {},
message: `Created ${results.success.length} draft hires, ${results.failed.length} failed`
});
} catch (error) {
console.error("Draft hire creation failed:", error);
return new FunctionResponse({
statusCode: 500,
body: { error: error.message },
headers: {},
message: "Failed to create draft hires"
});
}
}
- Ensure
rest.ripplingapis.comis added as an allowed domain. - Save and deploy the function.
Run the sync on a schedule
Once the functions work on their own, use automations to run them. One automation pulls new offers on a schedule, and the other creates draft hires after the transformation has refreshed.
Pull new offers
- Navigate to Tools > Automation Studio and select Create automation.
- Select the pencil icon in the top left-hand corner and name the automation "ATS Candidate Sync".
- Select Choose your automation trigger > On a set schedule. Configure the schedule (for example, nightly) and click Select > Continue.
- Add the Run Function step and drag it under the automation trigger in the editor.
- Click Run Function > Editor and select
sync_ats_candidatesfrom the Function dropdown. Select Continue. - Select Save > Save and publish.
Create draft hires after the dataset refreshes
create_draft_hires_from_staging reads ats_dataset__c, not the staging object, so run it after the transformation refreshes. A staging row you just wrote will not show up in that dataset until the refresh finishes.
- Create another automation:
- Automation name: "Process ATS Candidates to Draft Hires"
- Trigger: When something happens > Object creation and updates > select when an "ATS Candidate Staging" custom object is created
- Add steps:
- Delay: 5 minutes, which gives a few staging rows time to land before the function runs. If a nightly batch is enough, skip this trigger and use the schedule instead.
- Run Function:
create_draft_hires_from_staging - Send an email: Notify HR of the new draft hires
Flag a declined offer (optional)
Use this if an offer can be declined after Rippling already created a draft hire.
This automation only runs if staging is updated to Declined, including when sync_status__c is Completed. Complete the optional declined-offer changes in Pull offers into staging first.
The Draft Hires API cannot delete or archive a draft hire, so an admin must cancel or remove it manually in Rippling.
- Create automation:
- Automation name: "Handle Unhired Candidates"
- Trigger: When something happens > Object creation and updates > select when an "ATS Candidate Staging" custom object is updated (for example,
offer_status__c= "Declined")
- Add steps:
- Condition: Check if a draft hire was already created (
draft_hire_id__cis set) - Update record: Set
sync_status__cto "Needs cancellation" - Send a notification: Alert HR with the candidate, offer ID, and draft hire ID
- Condition: Check if a draft hire was already created (
- An admin must then cancel or remove the draft hire manually in Rippling (HR > Hire > People > New hires > Draft hire). The automation only flags the record and notifies HR; it cannot cancel the draft hire.
Let HR review candidates (optional)
Create a custom app for HR admins to review and approve candidates before draft hire creation. The view can be customized to include a table, dashboard, and filters.
- Navigate to Tools > App Studio and select Create app.
- Configure the app name as "ATS Candidate Review".
- Select +Add page and choose the + sign in the top left-hand corner to select from the available components. You can choose a table, dashboard, or similar.
- Filter the table or dashboard (for example,
sync_status__c = 'Pending') and add columns to display name, email, job title, start date, and status.
Test the flow
Test the sync
- Navigate to Tools > Developer > Functions.
- Select the
sync_ats_candidatesfunction. - Click Test console and provide sample input:
{
"parameters": {}
}
- Click Run test to check the test output. A successful run looks like this:
{
"statusCode": 200,
"body": {
"processed": 1,
"errors": []
},
"headers": {},
"message": "Synced 1 offers with 0 errors"
}
- Verify staging records are created in the custom object.
Test draft hire creation
- Verify staging records exist with
sync_status__c = 'Pending'. - Run the
create_draft_hires_from_stagingfunction. - Check if draft hires appear in HR > Hire > People > New hires > Draft hire and if staging records are updated to
sync_status__c = 'Completed'.
Test the full path
- Create a test candidate in your ATS with an accepted offer.
- Run
sync_ats_candidatesfrom the test console, or run the ATS Candidate Sync automation. - Verify candidate appears in staging.
- Verify draft hire is created.
- Complete the hiring flow in Rippling.
When a row fails
Common errors and solutions
| Error | Cause | Solution |
|---|---|---|
| "Work location not mapped for offer…" | Location name mismatch | Create job mapping or standardize names |
| "Employment type not mapped for offer…" | Type name mismatch | Create job mapping or update ATS |
| "API rate limit exceeded" | Too many API calls | Increase batch intervals |
| "Invalid email format" | Malformed email in ATS | Add validation in staging |
After the sync is running, check the staging object for rows that need attention. A Failed status includes the reason in error_message__c. A row that stays Pending for more than a day usually means the transformation has not refreshed, or the draft-hire automation did not run.
Set up monitoring
Use the function log, a report on the staging object, and an automation.
| What to watch | Where to look |
|---|---|
Whether sync_ats_candidates or create_draft_hires_from_staging ran, and what it returned | Get Started with Functions |
Which staging rows failed or are still pending, and the reason in error_message__c | Build the report with Get started with reports, then narrow it with Filters and time frames in reports. The staging object is a custom object, so you can also see Get started with custom objects. |
When a row fails or stays Pending | Add a notification the same way as Flag a declined offer. For more information, see Get started with automations. |
See also
- Create and Bulk Hire Draft Hires
- Create and Manage Custom Objects
- Get started with custom objects
- Get started with reports
- Filters and time frames in reports
- Create and Manage Functions
- Get Started with Functions
- Set Up a Custom Pipeline
- Get Started with automations
- Hello World Example Using Functions