Campaign lifecycle
Summary
This page gives the states of a campaign and of its recipients, and the commands that each campaign state accepts. It also covers redial, retry, suppression and calling windows. It does not cover how to create and run a campaign; see Run an outbound campaign.
Facts
Campaign states
cancelCampaign moves every state that is not terminal to cancelled.
Commands in each state
Each cell gives the state after the command, or the error code of its refusal (409).
A command checks other conditions before the state, so it can answer another code first:
Recipient states
attempts on a recipient lists each dial, with its disposition and call_session_id. Each
attempt is a call: read it with getCall.
Row outcomes
checkCampaignRecipients and uploadCampaign give each row of a recipient list one outcome.
checkCampaignRecipients saves nothing.
Redial and retry
Rasen redials a recipient on its own only within the campaign’s attempt budget:
retryCampaign dials recipients again on your request:
- Without
dispositions, it selects the recipients whose last outcome was notanswered, within their remaining attempts. - With
dispositions, it selects exactly those outcomes,answeredtoo, and adds one attempt when a recipient has none left. An empty list selects nothing. - It never selects a recipient that is
suppressed,cancelled, still in a call, or held after an uncertain dial. - The answer’s
retryobject givesselected,retriedandbudget_exhausted. - A retry of a
completedorfailedcampaign reopens it todialing. A retry of adialingorpausedcampaign keeps its state.
Suppression
suppressCampaignDestination adds a number to the workspace’s suppression list, with reason
do_not_call or opt_out. No operation removes it: a suppression is permanent. A number that is
already on the list answers added: false.
Rasen checks the list when you create a campaign, and again before every dial. A recipient whose
number is on the list becomes suppressed, also in a campaign that is already dialing.
Calling windows
Rasen checks the window before each dial. Outside the daily hours, recipients stay pending until
the next opening. After window_end_at, the pending recipients become suppressed with
suppression_reason window_closed. Without daily hours, Rasen dials at any time of day.
The daily hours apply on every day of the week, weekends included. A campaign has no weekday
field. To skip a day, pause the campaign before it (pauseCampaign) and resume it after
(resumeCampaign).
planCampaign answers ceiling and window. ceiling gives effective, requested,
workspace_entitlement and source. window.disposition is open, hold (with
next_opening) or closed (with a reason).
Cancel and pause
cancelCampaignplaces no new dial. Calls already placed run to their end.- Each
pendingrecipient becomescancelled. A recipient indialingbecomescancelledwhen its dial ends without an answer. pauseCampaignplaces no new dial and leaves every recipient as it is. Calls already placed run to their end.pauseCampaignandresumeCampaignrefuse astalledcampaign. Wait for it to return todialing, or cancel it.
Rules
- MUST send the campaign’s current
ETaginIf-Matchand a newIdempotency-Keywith each command. - MUST read the campaign again after a refusal, and check its
statebefore the next command. - MUST NOT send
startCampaignafter a refused plan or admission. - MUST treat a suppression as permanent. No operation removes a number from the list.
- MUST NOT treat a recipient in
dialingas safe to call again. Rasen holds an uncertain dial and never redials it on its own. - MUST keep an unknown campaign or recipient
state, and never read it as success.