Lead Activities
Every touchpoint and action on a lead is logged to the lead_activities table, forming a full timeline for each contact.
Data model
lead_activities
| Column | Type | Notes |
|---|---|---|
tenant_id | uuid FK → tenants | |
lead_id | uuid FK → leads | |
type | enum | See activity types below |
description | text | Human-readable summary of the activity |
actor_type | enum | human | agent | system |
actor_id | varchar(255) | User ref_id or agent role |
metadata | jsonb | Type-specific data (see below) |
Activity types
| Type | Logged when |
|---|---|
note | A human or agent adds a note to the lead |
email_sent | An outbound email is sent to the lead |
email_received | A reply or inbound email is received from the lead |
call | A phone call is logged |
status_change | The lead’s status field is updated |
enrichment | Auto-enrichment runs and populates enrichment_data |
score_updated | Scoring engine recalculates and updates score/band |
nurture_enrolled | Lead is enrolled into a nurture sequence |
nurture_step_scheduled | A nurture step is queued for future execution |
nurture_step_executed | A nurture step is executed (email/task/call reminder) |
nurture_paused | Sequence is paused manually or by rule |
nurture_resumed | Paused sequence is resumed |
nurture_exited | Lead exits sequence due to conversion/disqualification/reply |
Metadata examples
status_change
{
"fromStatus": "new",
"toStatus": "qualified"
}email_sent
{
"emailSubject": "Following up on your inquiry",
"messageId": "msg_abc123"
}enrichment
{
"linkedinUrl": "https://linkedin.com/in/example",
"companySize": "11-50",
"industry": "SaaS",
"website": "https://example.com"
}score_updated
{
"previousScore": 46,
"newScore": 68,
"previousBand": "warm",
"newBand": "hot",
"modelVersion": "v1.0",
"topFactors": [
"job_title_match",
"opened_2_emails",
"visited_pricing_page"
]
}nurture_step_executed
{
"sequenceId": "seq_123",
"stepId": "step_2",
"channel": "email",
"templateId": "tmpl_followup_2",
"deliveryStatus": "sent"
}Actor types
Activities can be logged by:
human— a tenant user or DM team member acting via the dashboardagent— an AI agent (e.g. enrichment agent, follow-up drafter)system— automated system events (e.g. lead form webhook ingestion)
Related
- Leads — lead data model
- Pipeline — status transitions
- Database schema