Temporal Workflows
Lead Qualification Workflow
3-step AI-powered lead scoring and intelligent routing workflow.
Lead Qualification Workflow
A 3-step Temporal workflow that enriches lead data, scores leads using AI (0-100), and routes them to the appropriate GTM motion.
Workflow Definition
Steps
Enrich Lead Data
Activity: enrichLeadData
Gathers additional data about the lead:
- Company firmographics (size, industry, funding, tech stack)
- Contact role and seniority
- Recent activity signals (website visits, content downloads)
- Existing relationship context from memory
AI Scoring
Activity: scoreLeadWithAI
Model: Claude CLI
AI-powered scoring using the enriched data. The model evaluates against qualification criteria (BANT + MEDDIC hybrid) and returns a score from 0-100 with reasoning.
Route Lead
Activity: routeLead
Routes the lead based on score:
| Score Range | Route | Action |
|---|---|---|
| 80-100 | AE Direct | Create meeting, assign to territory AE |
| 50-79 | BDR Nurture | Add to 5-touch outreach sequence |
| 0-49 | Marketing Drip | Add to marketing automation nurture |
Queries
| Query | Returns |
|---|---|
status | Current step, lead score (if computed), route decision |
Scoring Criteria
The AI scoring model evaluates across these dimensions:
| Criteria | Weight | Signals |
|---|---|---|
| ICP Fit | 30% | Company size, industry, tech stack alignment |
| Budget | 20% | Funding stage, ARR, stated budget |
| Authority | 20% | Contact seniority, decision-making role |
| Need | 15% | Pain signals, competitive mentions, use case fit |
| Timeline | 15% | Urgency signals, contract renewal dates |
Memory Integration
- Scoring criteria stored in
orgscope (shared across all workers) - Historical scoring baselines stored in
teamscope - Individual lead context stored in
workerscope for the assigned BDR