The campaign wizard creates and edits outbound campaigns. The same component serves both /dashboard/campaigns/new and /dashboard/campaigns/:id/edit, switching on whether an id param is present. It lives in src/pages/CampaignCreate.tsx.

Steps

The wizard has five steps, defined in STEPS:
StepFieldsNotes
BasicsCampaign name, botBots from GET /api/v1/bots
Number PoolOutbound DID checkboxesDIDs from GET /api/v1/carriers, inbound-only DIDs excluded
Upload CSVCSV drag/drop or browseMust contain a phone_number column; client previews first 6 rows
Dialler ConfigConcurrency, mode, time window, retries, callback detectionRendered from CampaignConfig
ReviewRead-only summaryConfirms before submit
canNext() gates step advancement: basics needs name + bot, number pool needs at least one number, and upload needs a CSV file on create (optional on edit).

Defaults

Defaults come from createDefaultCampaignConfig() in src/pages/campaignDefaults.ts:
SettingDefault
concurrency_limit50
campaign_modesingle_day
time_window09:00–18:00, timezone from display preference
redial_rules.max_attempts3
redial_rules.retry_delay_minutes30
redial_rules.retry_on_systemno_answer, rejected, RNR, error, timeout
redial_rules.retry_on_customempty
callback_detection.enabledfalse
applyDisplayTimezoneToCampaignConfig seeds a new campaign’s time-window timezone from the operator’s display timezone (only when still at the default), so a fresh campaign matches the tenant’s working timezone.

Dialler config fields

Step 4 edits the CampaignConfig:
  • Concurrency Limit — max simultaneous connected conversations. Number input uses the blur-validate pattern (empty intermediate, resets to 50 if cleared/below 1).
  • Campaign Modesingle_day stops at the cutoff and does not resume; multi_day pauses at the cutoff and resumes next day.
  • Time Window — start/end times plus a timezone selector (IST, GST, SGT, JST, GMT/BST, CET, EST, CST, PST, UTC).
  • Max Attempts / Retry Delay (minutes) — blur-validated, reset to 3 / 30 if cleared.
  • Retry on System Dispositions — checkboxes over no_answer, rejected, RNR, error, timeout.
  • Custom Retry Dispositions — comma-separated free text.
  • Callback Detection — toggle to detect callback requests in post-call analysis and schedule them within the campaign.

Submit and edit locking

On submit the wizard POSTs to /api/v1/campaigns (create) or PATCHes /api/v1/campaigns/{id} (edit), then uploads the CSV via POST /api/v1/campaigns/{id}/upload when a file is selected. isCampaignIdentityLocked() locks name, bot, and contacts once a campaign has run (run number > 1, has started_at/completed_at, or has restart history). When locked, the wizard sends only number_pool and config, and shows a notice that you can still rotate outbound numbers and adjust dialler config before pressing Start.
Only draft and paused campaigns are editable. The wizard surfaces a notice and disables submit for any other status. On a draft, uploading a new CSV replaces the existing contact list.

Campaign list

Search, filter, and lifecycle actions.

Upload leads

CSV format and variable mapping.

Callbacks

How callback detection and scheduling work.

Carriers

Where outbound DIDs come from.