/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 inSTEPS:
| Step | Fields | Notes |
|---|---|---|
| Basics | Campaign name, bot | Bots from GET /api/v1/bots |
| Number Pool | Outbound DID checkboxes | DIDs from GET /api/v1/carriers, inbound-only DIDs excluded |
| Upload CSV | CSV drag/drop or browse | Must contain a phone_number column; client previews first 6 rows |
| Dialler Config | Concurrency, mode, time window, retries, callback detection | Rendered from CampaignConfig |
| Review | Read-only summary | Confirms 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 fromcreateDefaultCampaignConfig() in src/pages/campaignDefaults.ts:
| Setting | Default |
|---|---|
concurrency_limit | 50 |
campaign_mode | single_day |
time_window | 09:00–18:00, timezone from display preference |
redial_rules.max_attempts | 3 |
redial_rules.retry_delay_minutes | 30 |
redial_rules.retry_on_system | no_answer, rejected, RNR, error, timeout |
redial_rules.retry_on_custom | empty |
callback_detection.enabled | false |
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 theCampaignConfig:
- Concurrency Limit — max simultaneous connected conversations. Number input uses the blur-validate pattern (empty intermediate, resets to 50 if cleared/below 1).
- Campaign Mode —
single_daystops at the cutoff and does not resume;multi_daypauses 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.
Related docs
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.