Sequence and task models
SequenceTemplate
Table sequence_templates.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
|
|
|
Also fed to the AI writer |
|
|
Marks this as the default template for that campaign kind |
|
|
|
|
|
default |
Index: subscriptionId. Relations: steps, contactSequences.
SequenceTemplateStep
Table sequence_template_steps.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
Unique per template |
|
|
|
|
|
The delay amount for |
|
|
|
|
|
How long a rep has on a |
|
|
Human and AI context |
|
|
|
|
|
Hint to the AI writer; also used as the subject fallback |
|
|
|
|
|
default |
|
|
A fixed |
Data gate fields
| Field | Type | Notes |
|---|---|---|
|
|
e.g. |
|
|
|
|
|
|
|
|
Deprecated single-condition form, still read |
|
|
Branch targets |
|
|
When set, a failure waits and re-checks instead of branching |
|
|
Cap on re-checks; |
CRM fields
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
Task body |
|
|
Due-date offset from execution time |
|
|
For |
Unique: (templateId, stepIndex). Index: templateId.
ContactSequence
Table contact_sequences. One contact’s enrollment.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
default |
|
|
default |
|
|
|
|
|
The Inngest run id driving this enrollment; shared by all its step logs |
|
|
What triggered the enrollment |
|
|
Indexes: contactId, (status, nextStepAt) for the scheduler, executionId, subscriptionId,
campaignId, campaignTargetId, emailCampaignTargetId.
|
"One active sequence per contact" is enforced in application code
( |
ContactSequenceStep
Table contact_sequence_steps. One row per executed step.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
|
|
|
Mirrors |
|
|
|
|
|
Re-check count for gate steps |
|
|
Whatever the step produced |
|
|
|
|
|
|
|
|
Full execution payload — provider ids, CRM event body, gate evaluation. One row per execution, never overwritten |
Indexes: sequenceId, executionId, templateStepId, callId, emailId, followUpTaskId,
activityId.
SalesRep
Table sales_reps. Workspace-scoped human seller identity.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
Optional — a rep can exist before having a login |
|
|
|
|
|
Assigns tasks and contacts in HubSpot |
|
|
Attributes Nooks calls and assigns sequences |
|
|
HubSpot active list backing the rep’s sequences |
|
|
HubSpot call segment for call attribution |
|
|
default |
Unique: (subscriptionId, email). Indexes: subscriptionId, profileId, hubspotOwnerId,
nooksUserId.
Relations: subscription, profile, followUpTasks, calls.
FollowUpTask
Table follow_up_tasks.
| Field | Type | Notes |
|---|---|---|
|
|
|
|
|
Assignee |
|
|
The lead |
|
|
What created the task |
|
|
|
|
|
|
|
|
Nullable — a workspace may run only one integration |
|
|
|
|
|
|
|
|
Stored so a completed task can cancel its own pending escalation |
|
|
|
|
|
|
|
|
|
|
|
Indexes: subscriptionId, salesRepId, contactId, campaignTargetId, status, dueAt,
hubspotTaskId, nooksTaskId.
Relations: subscription, salesRep, contact, campaignTarget, contactSequence,
activities, contactSequenceSteps.