Enums

Database enums constrain values at the storage layer; TypeScript const enum`s in `lib/enums.ts carry values that are not stored (event names, skip reasons).

Campaign and calling

CampaignType

call, email

CampaignStatus

draft, running, paused, stopped, completed

TargetState

pending, in_progress, dialing, completed, failed, canceled, skipped, DNC, WN, MAX, DT_PENDING, VOICEMAIL

The uppercase values are legacy. Current handler code produces pending, in_progress, dialing, completed, failed, skipped and DNC only — see Target lifecycle.

Note the spelling: the enum value is canceled (one l). Some UI code normalises to cancelled.

CallStatus

created, dialing, answered, ended

AI agents

AiAgentType

analysis, caller, sms, other

AiAgentLlmModelType

gpt, claude — legacy fallback used when AiAgent.modelId is unset

Contacts and sellers

ContactSource

campaign, hubspot, import, manual

Stored on Contact.source as a String, not as this enum — a migration widened the column.

ContactLifecycleStage

subscriber, lead, marketingqualifiedlead, salesqualifiedlead, opportunity, customer, evangelist, other — mirrors HubSpot lifecyclestage

ContactLeadStatus

new, open, in_progress, open_deal, unqualified, attempted_to_contact, connected, bad_timing — mirrors HubSpot hs_lead_status

ContactHeatStatus

hot (active follow-up), warm (rep acted, deal open), warming (task failed, automated track running), idle (30 days silent)

ContactHubspotSyncStatus

synced, pending, failed, skipped

SellerPlatform

amazon, walmart, shopify

SellerDatasource

smartscout, manual

SellerLifeCycleStage

new, enriched, qualified, opportunity, closed_won, closed_lost

Registries

LineTypes

mobile, landline, fixedVoip, nonFixedVoip, tollFree, sharedCost, premium, voicemail, pager, voip, uan, unknown, other

RiskLevel

low, medium, high, critical

Only low (or null) is dialable — see Registries.

Email

EmailTargetStatus

pending, requested, sent, opened, bounced, unsubscribed, blocked, suppressed, failed

There is deliberately no clicked value — a click is a clickedAt timestamp, not a status. suppressed means Resend dropped the send because the address is on its suppression list.

EmailTargetCategory

interested, not_interested, question, out_of_office, unsubscribe, wrong_person, other — LLM classification of a reply

EmailVariationStatus

pending_generation, active, archived

EmailDirection

outbound / inbound direction on Emails

EmailInboxCategory

in-app inbox folder on Emails

DomainWarmupStatus

warming_up, active — a label only; it does not gate sending

Sequences and tasks

SequenceType

onboarding, re_engagement, not_connected_outreach

SequenceStatus

pending, active, paused, completed, abandoned, exited

SequenceStepChannel

email, call_task, sms, wait, data_gate, crm_task, crm_event

FollowUpTaskType

call, email, sequence_enrollment

FollowUpTaskStatus

pending, in_progress, completed, skipped, failed

Segmentation

SegmentPurpose

reengagement, email_campaign, reporting, other

SegmentAssignmentMode

round_robin, keep_owner, unassigned

SegmentRunStatus

running, completed, failed

SegmentPrioritySource

sql_view, strategy_rules

Which of the two ways a segment’s priority number is produced. lost_deal and supplier_account compute a weighted score in their BigQuery view and the producer only rounds it; the rest compute priority in producer code.

ReengagementArm

control, treatment

Other

ActivityType

sms, email, call, task, meeting, note, reminder

SubscriptionUserRole

owner, admin, member

TypeScript enums (lib/enums.ts)

Not stored in the database.

CampaignTargetStateEnum

pending, in_progress, completed, failed, cancelled

A legacy subset with the British spelling cancelled, unlike the Prisma canceled.

CampaignEventTypeEnum

CALL_STARTED, CALL_ENDED

CrmWorkflowEventTypeEnum

Crm.DialerCallEnded, Crm.DealUpdate

JustCallEventTypeEnum

justcall_call.initiated, justcall_call.answered, justcall_call.incoming, justcall_call.completed, justcall_call.updated

CallSkipReason

prior_disposition, warm_lead, lifecycle_stage, dnc, campaign_not_running, invalid_e164, target_not_found, no_phone_number_available, outside_call_window, retell_error

Returned by the dial pipeline instead of thrown, so an ineligible target does not consume a retry.

Disposition sets (lib/constants.ts)

RetellDisposition is a TypeScript enum of every disposition value. The sets built from it decide routing:

Set Values

HUBSPOT_WHITE_LISTED_DISPOSITIONS

Qualified_Lead, Amazon_Seller, Callback_Requested, Wrong_Number, Do_Not_Call, Not_a_Seller, AI_Issue

HUBSPOT_BLOCKED_DISPOSITIONS

AI_Screening, Voicemail_Detected, dial_busy, dial_no_answer, invalid_destination, Gatekeeper, IVR

NEGATIVE_DISPOSITIONS_TO_RECALL

Gatekeeper, IVR, dial_no_answer, dial_busy, AI_Screening

SKIP_CALL_DISPOSITIONS

Do_Not_Call, Not_a_Seller, Amazon_Seller

TECHNICAL_FAILURE_REASONS

dial_no_answer, dial_busy, dial_failed, inactivity, machine_detected

DOUBLE_TAP_REASONS

voicemail_reached, machine_detected, dial_no_answer, user_declined

BLACKLISTED_AI_ANALYSIS_REASONS

voicemail_reached, dial_busy, dial_no_answer, dial_failed, telephony_provider_unavailable, user_declined, invalid_destination, telephony_provider_permission_denied

UNCALLABLE_DISCONNECTION_REASONS

invalid_destination, telephony_provider_unavailable, error_retell, error_no_audio_received, marked_as_spam, telephony_provider_permission_denied, error_unknown

NOOKS_ANALYSIS_SKIP_DISPOSITIONS

"No Answer", "Voicemail", "Busy"

NOOKS_CLOSED_LOST_DISPOSITIONS

"Not Interested", "Do Not Call", "Marketplace not supported", "No longer selling/shut down"

SKIP_CALL_LIFECYCLE_STAGES

customer, marketingqualifiedlead

HUBSPOT_WARM_LEAD_LIFECYCLE_STAGES

salesqualifiedlead, opportunity, closedwon, closedlost

DOUBLE_TAP_REASONS and TECHNICAL_FAILURE_REASONS overlap but are not the same: the former uses Retell’s disconnection_reason vocabulary, the latter mixes disposition and disconnection values.

RETRY_CONSTANTS:

Constant Value

DOUBLE_TAP_WAIT_MS

60000 (1 minute)

DEFAULT_COOLING_OFF_HOURS

24

MIN_VALID_CONVERSATION_SECONDS

10

DEFAULT_MAX_ATTEMPTS

4