Client Onboarding Workflow
5-step durable workflow for new client onboarding with compliance review and approval gates.
Client Onboarding Workflow
A 5-step Temporal workflow that manages the end-to-end onboarding of new clients — from account setup through compliance review to follow-up communications.
Workflow Definition
Steps
Fetch Account Data
Activity: fetchAccountData
Retrieves account information from the CRM — company profile, contacts, deal history, and engagement data.
Analyze Engagement
Activity: analyzeEngagement
AI-powered analysis of the account's profile and use case. Determines the optimal onboarding track (standard, accelerated, or white-glove).
Generate Proposal
Activity: generateProposal
Creates a customized onboarding plan with:
- Milestones and success criteria
- Timeline with day-by-day tasks
- Resource assignments
- Risk factors and mitigation plans
Compliance Review
Activity: complianceReview
Human-in-the-loop: Yes (approval gate)
Runs compliance checks against company policies. If issues are found, the workflow pauses and waits for human review.
On timeout: Escalates to manager with compliance hold.
Send Follow-up
Activity: sendFollowup
Sends welcome communications, schedules kickoff calls, and creates follow-up tasks in the CRM.
Signals
| Signal | Parameters | Purpose |
|---|---|---|
approveStep | { stepId, approved, notes } | Approve or reject at compliance gate |
skipStep | { stepId, reason } | Skip a step (audit logged) |
Queries
| Query | Returns |
|---|---|
status | Current step, completion %, compliance status |
Features
Durable Memory Integration
The workflow stores onboarding context in the Memory Store:
- Account profile and preferences (worker scope)
- Onboarding template used (team scope)
- Compliance decisions (org scope, pinned)
Compliance Hold
If compliance review identifies issues:
- Workflow status changes to
waiting - Assigned worker (Onboarding Bot) shows
waitingstatus - Notification sent via WebSocket and Slack
- All progress is preserved — no work is lost
- On approval, workflow resumes from Step 5