Skip to main content

Function: runFacilityCadenceEngine()

runFacilityCadenceEngine(svc, companyId): Promise<CadenceEngineResult>

Defined in: src/server/services/facility-cadence.ts:170

Cadence engine run (daily cron + admin "Refresh pipeline"): first auto-enroll triggered prospects, then heal every active enrollment — ensure its tasks exist and its progress is current; close out fully-resolved enrollments. Idempotent and safe to re-run.

Parameters

svc

SupabaseClient

companyId

string

Returns

Promise<CadenceEngineResult>