For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
guide

Build an ATS to draft hire solution

Build an end-to-end pipeline from ATS offer to draft hire with custom objects and automations.

Use with AI:Rippling AI ChatGPT Claude Cursor

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​

Architecture​

  1. Create a staging object so each offer has a place to land before anyone is hired.
  2. Pull the offer into that object. If the ATS splits the offer across objects, use the path in Pull offers into staging.
  3. Map ATS values to Rippling IDs.
  4. Create draft hires from that dataset.
  5. 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:
ScopeAccess
draft-hires.read-writeCreate and manage draft hires in HRIS, and push new employees into Rippling’s onboarding flow before they become workers.
custom-objects.read-writeCreate and manage custom objects.
custom-object-records.read-writeCreate and manage records (data rows) on custom objects.
functions.read-writeCreate and manage Rippling Functions in the Developer app.
function-executions.read-writeRun deployed functions and retrieve function executions (status, outputs, and run history).
Code samples are illustrative

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.

  1. Navigate to Data > Catalog in Rippling.
  2. 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
  3. Add the following fields by selecting Add field after the object has been created:
Field nameAPI nameField typeData typeDescription
External Candidate IDexternal_candidate_id__cBasicTextATS candidate ID (one candidate can have multiple offers)
External Offer IDexternal_offer_id__cBasicTextUnique ATS offer ID (use this as the unique reference so a later offer isn’t treated as a duplicate)
First Namefirst_name__cBasicTextCandidate first name
Last Namelast_name__cBasicTextCandidate last name
Emailemail__cBasicEmailCandidate email
Phonephone__cBasicPhone NumberCandidate phone
Job Requisition IDjob_req_id__cBasicTextATS job requisition ID
Job Titlejob_title__cBasicTextPosition title
Offer Statusoffer_status__cBasicChoicePending, Accepted, Declined
Start Datestart_date__cBasicDateExpected start date
Salarysalary__cBasicCurrencyOffered compensation
Employment Typeemployment_type__cBasicChoiceFull-time, Part-time, Contractor
Work Locationwork_location__cBasicTextOffice location
Departmentdepartment__cBasicTextDepartment name
Manager Emailmanager_email__cBasicEmailHiring manager email
Sync Statussync_status__cBasicChoicePending, Processing, Completed, Failed, Needs cancellation
Error Messageerror_message__cBasicLong TextError details if sync failed
Draft Hire IDdraft_hire_id__cBasicTextRippling Draft Hire ID after creation
Last Synced Atlast_synced_at__cBasicDate TimeLast 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 nameAPI nameField typeData typeDescription
ATS Job IDats_job_id__cBasicTextJob ID in external ATS
Rippling Department IDrippling_department_id__cBasicTextMapped Rippling department
Rippling Work Location IDrippling_work_location_id__cBasicTextMapped work location
Rippling Employment Type IDrippling_employment_type_id__cBasicTextMapped employment type
Rippling Legal Entity IDrippling_legal_entity_id__cBasicTextMapped 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.

  1. Open Developer, then select Custom Settings under Build. If your sidebar groups apps under Tools, open Tools > Developer first.
  2. Click New and add the following settings:
Display nameInput typeValue
rippling_api_tokenSecretAPI token
ats_api_keySecretExternal ATS API key
ats_base_urlStringExternal 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.

  1. Navigate to Tools > Developer > Functions.
  2. Click +New, name the function sync_ats_candidates, and select Save.
  3. 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;
}
Accepted vs declined 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__c from the ATS value instead of hardcoding Accepted.
  • On update, still writes offer_status__c when sync_status__c is Completed; otherwise a later decline never reaches staging and the automation never runs.
  1. Select the three dots in the right-hand corner > Update allowed domains > Allow Rippling and additional domains > enter the ATS API domain > Save.
  2. 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__c as the unique key.
  • sync_status__c starts as Pending for 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​

  1. Navigate to Data > Transformations and select +New transformation.
  2. 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​

  1. 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
  2. Select Continue.
Refresh transformation before draft hire creation

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​

  1. Navigate to Tools > Developer > Functions.
  2. Create a new function called create_draft_hires_from_staging.
  3. 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"
});
}
}
  1. Ensure rest.ripplingapis.com is added as an allowed domain.
  2. 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​

  1. Navigate to Tools > Automation Studio and select Create automation.
  2. Select the pencil icon in the top left-hand corner and name the automation "ATS Candidate Sync".
  3. Select Choose your automation trigger > On a set schedule. Configure the schedule (for example, nightly) and click Select > Continue.
  4. Add the Run Function step and drag it under the automation trigger in the editor.
  5. Click Run Function > Editor and select sync_ats_candidates from the Function dropdown. Select Continue.
  6. 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.

  1. 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
  2. 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.

  1. 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")
  2. Add steps:
    • Condition: Check if a draft hire was already created (draft_hire_id__c is set)
    • Update record: Set sync_status__c to "Needs cancellation"
    • Send a notification: Alert HR with the candidate, offer ID, and draft hire ID
  3. 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.

  1. Navigate to Tools > App Studio and select Create app.
  2. Configure the app name as "ATS Candidate Review".
  3. 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.
  4. 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​

  1. Navigate to Tools > Developer > Functions.
  2. Select the sync_ats_candidates function.
  3. Click Test console and provide sample input:
{
"parameters": {}
}
  1. 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"
}
  1. Verify staging records are created in the custom object.

Test draft hire creation​

  1. Verify staging records exist with sync_status__c = 'Pending'.
  2. Run the create_draft_hires_from_staging function.
  3. 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​

  1. Create a test candidate in your ATS with an accepted offer.
  2. Run sync_ats_candidates from the test console, or run the ATS Candidate Sync automation.
  3. Verify candidate appears in staging.
  4. Verify draft hire is created.
  5. Complete the hiring flow in Rippling.

When a row fails​

Common errors and solutions​

ErrorCauseSolution
"Work location not mapped for offer…"Location name mismatchCreate job mapping or standardize names
"Employment type not mapped for offer…"Type name mismatchCreate job mapping or update ATS
"API rate limit exceeded"Too many API callsIncrease batch intervals
"Invalid email format"Malformed email in ATSAdd 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 watchWhere to look
Whether sync_ats_candidates or create_draft_hires_from_staging ran, and what it returnedGet Started with Functions
Which staging rows failed or are still pending, and the reason in error_message__cBuild 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 PendingAdd a notification the same way as Flag a declined offer. For more information, see Get started with automations.

See also​