Skip to main content

Function: enrollCandidate()

enrollCandidate(svc, companyId, candidateId, trigger, createdBy?): Promise<{ enrolled: boolean; }>

Defined in: src/server/services/followUp.ts:17

Enroll a candidate into the active sequence for a trigger (e.g. 'new_application'). Idempotent per (candidate, sequence): a second call while an active enrollment exists is a no-op. Sets the first due date from step 1's day_offset. The runner below advances it.

Parameters

svc

SupabaseClient

companyId

string

candidateId

string

trigger

string

createdBy?

string | null

Returns

Promise<{ enrolled: boolean; }>