Candidates and applications

A candidate is a person — a human being who's interacted with the platform. An application is one journey of that person through one requisition. The split sounds pedantic until you realize that one person can apply to many roles, can re-apply to the same role over time, can move between roles, can be re-engaged after a rejection — and you want all of those tracked without confusing the database into thinking they're different people.

The Candidates CRM, listing candidates with their stage and application.

Why split candidate from application

The naive thing is to have one table. Person + role + status, all in one row. That works for a hobby project and falls apart in production for three reasons:

1. People apply to more than one role. If the candidate applies to the Quezon City crew member role and also the Cebu kitchen role, you don't want two separate "candidate" records for the same human. You want one the candidate with two journeys. Two applications, one candidate.

2. People reapply. the candidate applies to Acme Co's, doesn't make it, comes back six months later and applies again. With the split, that's one candidate row and two application rows. Without the split, you'd either have duplicate candidate records (data quality nightmare) or you'd be overwriting history (auditing nightmare).

3. PII protection scales with the number of people, not the number of journeys. Encrypting the candidate's phone number and email is expensive (it has to live as ciphertext with per-row IVs, blind-indexed for lookup). Doing that once per person is fine; doing it on every application would multiply storage and CPU cost by 5-10x.

The two-table design — candidate carries the person, application carries the journey — is the right structural answer to all three.

How the two tables fit together

┌───────────────┐  one        many  ┌─────────────────┐
│   candidate   │ ─────────────────► │   application   │
│  (the person) │                    │ (one journey)   │
│               │                    │                 │
│  PII fields,  │                    │  current_stage, │
│  encrypted    │                    │  current_step,  │
│               │                    │  playbook_ver,  │
└───────┬───────┘                    │  fit_score,     │
        │                            │  last_activity, │
        │ workspace-scoped           │  ...            │
        ▼                            └────────┬────────┘
   ┌─────────┐                                │
   │  tenant │                                │ points at
   └─────────┘                                ▼
                                       ┌──────────────┐
                                       │ requisition  │
                                       └──────────────┘

Both tables are tenant-scoped. A candidate belongs to one workspace; their applications all live in that workspace. (If the same human exists at Acme Co and at Northwind, those are technically two candidate rows — one in each workspace. This is intentional. Workspaces are isolated and don't share PII.)

What a candidate stores

A candidate row holds the person's identity and contact information — the long-lived facts:

  • Name (encrypted, with a blind index for case-insensitive search).
  • Email (encrypted, blind-indexed for dedupe).
  • Phone (encrypted, blind-indexed for matching across applications).
  • Primary contact channel — how they prefer to be reached (WhatsApp, SMS, email, voice).
  • Geographic info — city, region, country (useful for proximity matching to sites).

What makes the design serious about PII:

  • Every PII column is stored as <field>_ciphertext — base64-encoded AES-256-GCM ciphertext, not plaintext. A database leak doesn't leak names and phones.
  • Per-row initialization vectors (IVs) mean two candidates with the same name have completely different ciphertext. You can't infer matches from the encrypted data.
  • Blind indexes are HMAC-SHA256 of the lowercased field, stored separately. They let the system answer "does another candidate have this email?" without ever decrypting. The blind index for applicant@example.com is a fixed hash — same hash for the same email, but the hash is one-way so a leak doesn't expose addresses.
  • Reading PII goes through an encryption layer in lib/crypto/field-cipher.ts. Code never touches ciphertext directly; the layer decrypts on read and re-encrypts on write. Audit logging hooks into that layer, so every PII read is recorded.

What an application stores

An application row holds the state of one journey, optimized for the runtime to read fast:

  • Foreign keys to the candidate, the requisition, the client campaign (if any), and the playbook version it's running on.
  • Current stage and current step — denormalized so the dashboard doesn't have to compute them from the history table.
  • Last activity timestamp — for surface "stale" applications (no movement in N days).
  • Fit score — an integer 0–10 if the agent runtime has scored this candidate against this role. Null if not scored yet.
  • Snapshot of the candidate's contact channel at the time of application — because if the candidate updates their preferences later, the snapshot tells the team what was in play for this specific journey.

The applications table is the hot read path for the recruiter UI and for the agent runtime. Every list view, every kanban board, every agent's "what's pending" query reads applications. The denormalized columns aren't a database sin — they're the read-path-first design that lets the UI render in one query instead of joining four tables.

How a candidate becomes an application

The simplified flow:

  1. A person interacts with a sourcing channel. They tap an ad on Facebook, fill out a form on a careers site, or send a WhatsApp message to a Talkpush-powered number.
  2. The sourcing system creates a candidate row in the right workspace (or finds an existing candidate by the blind-indexed email / phone match).
  3. The system creates an application row linking that candidate to the specific requisition they're applying for.
  4. The application enters the funnel at the playbook's intake stage (usually "Applied"). From here on, agents and recruiters work the application.

A single person who applies to three different Acme Co roles ends up with one candidate row and three application rows. Each application has its own state, its own history, its own outcome.

Constraints and gotchas

  • PII access is logged. Every read of a candidate's name, email, or phone passes through the encryption layer and leaves a trail. If 100 phone numbers were viewed during a campaign, the audit log shows 100 entries. Don't be surprised when an export query suddenly logs 5,000 reads.
  • The blind index is the only way to dedupe. You can't query "show me all candidates with email X" without computing the blind index first. The encryption layer does this transparently in code, but raw SQL queries can't look at ciphertext.
  • Moving an application keeps it one application. The Move application action on the candidate profile moves the same application to another campaign or requisition: its history comes with it, and its timeline marks the move ("Moved to …"). To start a fresh, independent copy instead, use Replicate, which leaves the original untouched. See The candidate profile view for the actions.
  • Deleting a candidate cascades to applications. A candidate row deletion cascades to all its application rows via ON DELETE CASCADE. This is the right shape (if you're erasing a person for GDPR reasons you want all their journeys gone too) but it's destructive — make sure the deletion is intentional.
  • Snapshot columns on application drift. candidate_primary_channel_snapshot on the application is captured at application time and never updated. If the candidate later changes their preferred channel, the application's snapshot doesn't follow. This is deliberate — historical journeys reflect what was in play then. If you want the live channel, join to candidate.

A concrete example

the candidate, a real person, applies to two Acme Co roles over six months.

June 2026: She taps a Facebook ad for "Crew member — Quezon City." A sourcing flow on WhatsApp asks her name, phone, and basic info. The system:

  • Creates candidate.cnd-7f3a... for the candidate in Acme Co's workspace. Her name, phone, and email are encrypted; her blind indexes are set.
  • Creates application.app-1b2c... linking her candidate row to the QC crew member requisition.

She progresses through the funnel, doesn't make the cut, and her application terminates in Rejected stage.

December 2026: Acme Co opens a new "Kitchen staff — QC" requisition. The system runs a re-engagement campaign, looking for previously-rejected candidates who might be a fit. the candidate's candidate row (still there, never deleted) shows up in the search by blind-indexed location. The system:

  • Reuses candidate.cnd-7f3a... — same person, same row.
  • Creates application.app-9e8f... — a new journey for this new role.

Her second application progresses through a different funnel (this is a kitchen role, the playbook differs). This time she gets hired. application.app-9e8f... ends in Hired. application.app-1b2c... from June still exists, still says Rejected. The candidate's history shows both journeys, side by side.

The team can now ask interesting questions: "How many of our December hires were previously rejected applicants?" — and the answer comes out of a clean join between candidate and application, not a guess.

Connected applications — hand-offs and duplicates

The same candidate can carry multiple applications in your workspace. Three patterns:

  • Independent applications — they applied to two different requisitions on their own. Two unrelated applications under one candidate, no connection between them.
  • Moved by a hand-off — a recruiter (with Move application) or a workflow's Hand Off node moved the candidate from one campaign or requisition into another. It is still ONE application: it moves to the destination with its history, and the profile shows the whole journey on one card, with each move marked along the way.
  • Replicated — a recruiter explicitly used Replicate to create a fresh, independent copy of an existing application into a chosen destination. The copy is its own application and does NOT become part of the source's journey — it's a separate, parallel run for the same person. Every copy carries a mandatory Reason for replicating picked from the workspace's Replicate Reasons (Replicate Reasons: why a candidate's application was replicated) — the reason chip surfaces on the application list, on the candidate profile, and on the source application's activity timeline so recruiters can see at a glance why a copy was made.

A journey can move across all three levels: from a GTM to a Client Campaign, and on to a Hiring Requisition. The candidate profile renders it as a single journey card with the original apply at the bottom and each move above it.

Candidate-initiated re-applies — when the same candidate hits the apply page and starts a new application — are governed by the workspace's Re-application Rules — the candidate duplicate-apply guard policy per GTM. Depending on the policy, the candidate is either resumed on their existing application, blocked with a branded screen, or allowed to create a fresh application. The rules never affect recruiter-initiated Duplicate or Move actions; those always proceed.

Viewing a candidate's profile

The candidate profile view surfaces all the information linked to a single candidate in one place: contact details, their application history, screening Q&A answers for each application, and a stage-by-stage history of where they've been in the funnel. Profile data updates in real time as the candidate moves through the pipeline, so the recruiter always sees the current state without needing to refresh. See The candidate profile view for the full layout.

The Candidates CRM

The Recruiter Candidates CRM (accessible from the main navigation) gives recruiters a consolidated view across all candidates in the workspace — not filtered to a single requisition. It's useful for searching, filtering by stage or source, and finding candidates across campaigns. See The Candidates CRM for details.

Candidates can also enter the pipeline through public sourcing share-links — a URL the recruiter generates that points to a specific requisition's application form. Anyone with the link can submit an application without needing a Crew account. Applications created via share-links appear in the same pipeline as any other application. See Creating and sharing application links for how to generate and manage them.

See also