Worker onboarding
graph TD;
A["Worker signs up in Cruits (self-registration, no restrictions)"] --> B["Create Worker user in Cruits"];
B --> C["Create Worker profile in Cruits"];
C --> D["Search SF for Candidate Contact by Email"];
D --> E{"Found matching Contact?"};
E --> EY["Yes"];
E --> EN["No"];
EY --> F["Link Worker to existing SF Contact"];
F --> Z["Done"];
EN --> G["Find current Candidate Account bucket (e.g., Kandidaat Account - N)"];
G --> H{"Bucket under capacity?"};
H --> HY["Yes"];
H --> HN["No"];
HY --> I["Use existing Candidate Account"];
HN --> J["Create new Candidate Account (Kandidaat Account - N+1) in SF"];
I --> K["Create new SF Contact (RecordType = Candidate) under that Account"];
J --> K;
K --> L["Save ContactId (salesforce_ref) in Cruits Worker"];
L --> Z["Done"];