A placement gets marked started in the ATS. The contractor shows up Monday. On Thursday somebody notices there is no Section 2 on file, and the client's badge office wants to know why.
This is the onboarding gap, and it is the cheapest one to catch because the start date gives you every deadline in advance. This tutorial builds the watchlist an agent needs to catch it. It drafts and escalates. It never marks anything verified.
What the clock actually is
For the Form I-9, the employee completes Section 1 no later than the first day of employment. The employer completes Section 2 within three business days of the first day of work. Work authorization that expires needs a reverification date on your calendar. Read the current USCIS Handbook for Employers and ask your counsel about edge cases; the agent encodes your firm's reading of the rule, not a legal opinion.
Other onboarding items run on the same pattern: background check returned, drug screen result, client-specific orientation, direct deposit form, and any credential the client requires before badge access. Each has a due rule relative to the start date.
The table
One row per contractor, per assignment, per requirement. Keep requirement rules in data, not in code.
create table onboarding_rule (
rule_id text primary key,
label text not null, -- 'I-9 Section 1'
due_basis text not null, -- 'calendar' | 'business'
due_offset int not null, -- days after start
owner_role text not null, -- 'recruiter' | 'onboarding' | 'contractor'
applies_where text -- optional client or state filter
);
create table onboarding_item (
assignment_id text not null,
rule_id text not null references onboarding_rule,
due_date date not null,
status text not null default 'open', -- open | received | waived
status_by text, -- the human who set it
status_at timestamptz,
last_nudge_at timestamptz,
primary key (assignment_id, rule_id)
);
Note status_by. The agent may set an item to open or flag it. Only a named person sets received or waived. That is the same split used in the credential watchlist, and it keeps the record honest.
Business days without guessing
Three business days is where hand-rolled logic goes wrong. Use a holiday table and count.
create table holiday (day date primary key);
create function add_business_days(start date, n int) returns date as $$
with days as (
select d::date as day
from generate_series(start + 1, start + 30, interval '1 day') d
where extract(isodow from d) < 6
and d::date not in (select day from holiday)
order by d limit n
)
select max(day) from days;
$$ language sql stable;
A contractor starting Wednesday before a Friday holiday gets a Tuesday deadline, not Monday. Test it with that case and with a start date on a Friday.
Generating items when a placement starts
When the ATS shows a new placement (see the webhooks-or-polling post for how to stay in sync), insert one onboarding_item per applicable rule, computing due_date from the start date. If the start date moves, recompute due_date for open items only and log the change. Never touch received items.
The daily query
select i.assignment_id, r.label, i.due_date, r.owner_role,
i.due_date - current_date as days_left
from onboarding_item i
join onboarding_rule r using (rule_id)
where i.status = 'open'
and i.due_date <= current_date + 1
order by i.due_date, i.assignment_id;
That is the whole detector. Items due tomorrow or already late.
The escalation ladder
Keep it short and written down.
- Two days before due: draft a reminder to the contractor or the owner role. A human approves it, or the firm has pre-approved the template.
- Due day, still open: put it on the daily exceptions list for the onboarding lead.
- One day late: flag the recruiter and the account manager. The client may need a heads-up, and that call is a person's.
- Never: the agent does not tell a client a contractor is cleared, and does not cancel a start.
Cap nudges to one per item per day using last_nudge_at. A contractor who gets four texts about a form will stop answering.
What to log
For every nudge and flag: assignment, rule, the due date the agent computed, the rule version, the message drafted, who approved it, and when. If someone later asks why a start went ahead with an open item, you can show who saw the flag.
Not yet
If you place fewer than a handful of starts a week, a shared spreadsheet and a calendar reminder will do this for less money. The agent pays back when starts are frequent, the checklist varies by client, and the gaps show up as lost billable days or a client complaint. Measure the count of items completed late over the last quarter first. If that number is small, wait.
Scope for a first build
Read placements from the ATS, write items to your own table, produce the daily exceptions list. Defer document storage and any E-Verify integration; those carry their own access and retention questions. A Workflow Assessment can tell you whether this beats the redeployment or timesheet work on your list.