TypeAlias.CampaignStatus
type CampaignStatus = ObjectEnum<typeof CampaignStatus>;
Lifecycle status of a marketing campaign.
draft: under preparation in the wizard. The only mutable state — name, channels, targeting, content and schedule can still change, and the campaign can be deleted. Transitions toscheduled(planned send) orsending(immediate send).scheduled: a futuresendAtis set and a delayed job is queued. The campaign waits for its due date. Can be cancelled back todraftbefore the job fires. If the delayed trigger vanishes (Redis loss/flush, a double-fault rollback), the campaign would otherwise stayscheduledforever: an hourly recovery sweep detects a past-due schedule whose job is gone (scheduleJobLostflag) and auto-re-arms it to fire immediately. SeeCampaignScheduleRecoverConsumer.sending: the audience snapshot is frozen (audienceSnapshotCountset,CampaignDeliveryrows created) andsentAtis stamped. Transient state while the deliveries drain. Irreversible — the snapshot is never recomputed and it never goes back todraft. If the send job fails terminally (attempts: 1, crash/OOM), the campaign is left stranded insending: it is detected by an hourly sweep (warn log) and resumable viaPOST /:id/resume, which re-enqueues the idempotent send job (already delivered recipients are skipped). SeeCampaignSendConsumer.sent: every delivery has been processed (sent / excluded / failed). The conversion window runs fromsentAt. Failed deliveries can be retried without changing this status.finished: the conversion window has closed and the stats are frozen. Terminal.