/dashboard/campaigns is the entry point for outbound calling. It shows every campaign with live progress, answer/completion rates, and inline lifecycle controls. The page lives in src/pages/Campaigns.tsx.
What the page does
- Fetches campaigns from
GET /api/v1/campaigns, optionally filtered by?status=. - Client-side search filters by campaign name or full ID.
- Each row links to the campaign detail page (
/dashboard/campaigns/:id). - Status badge colors are mapped in
STATUS_COLORS(draft,running,paused,completed,failed).
UI surfaces
| Surface | What it shows | Source |
|---|---|---|
| Search box | Filters by name or ID (case-insensitive) | Campaigns.tsx |
| Status filter | Dropdown: all / draft / running / paused / completed / failed | Campaigns.tsx |
| Name cell | Name, short ID with copy button, “Restarted by/at” note | getShortCampaignId in src/utils/campaignId.ts |
| Progress cell | Progress bar + processedPercent + connected count | buildCampaignProgressSummary in src/pages/campaignProgress.ts |
| Answer Rate | stats.attempt_answer_rate (falls back to connect_rate) | Campaigns.tsx |
| Completion | stats.completion_rate (falls back to connect_rate) | Campaigns.tsx |
| Action buttons | Edit, Clone, Restart, Start/Pause/Resume, Stop, Delete | Campaigns.tsx |
Progress computation
buildCampaignProgressSummary (in campaignProgress.ts) derives the progress indicator from campaign stats:
processedCount=completed + failed + abandoned + window_closed + manual_stopped + machine_detected_count.processedPercent=processedCount / total_calls, clamped 0–100.successPercent=completed / total_calls.baseDiallingCompletedis true when processed +callback_pendingcovers the total and callbacks are still pending.
shouldPollCampaignCalls helper treats a campaign as live (and worth polling) when its status is running, or any call is in a live status such as leased, ringing, amd_screening, attaching, dialling, in_progress, _processing, or callback_scheduled.
Lifecycle actions
Action buttons render conditionally based onstatus:
| Status | Buttons shown |
|---|---|
draft | Edit, Clone, Start, Delete |
running | Clone, Pause, Stop |
paused | Edit, Clone, Resume, Stop |
completed / failed | Clone, Restart |
Each action posts to
POST /api/v1/campaigns/{id}/{action} (start, pause, resume, stop, restart). Clone posts to /clone and navigates to the new campaign. Delete (DELETE /api/v1/campaigns/{id}) is only offered for draft campaigns and removes uploaded contacts.Related docs
Campaign wizard
Create or edit a campaign, upload CSV, configure the dialler.
Campaign detail
Live activity, attempt trail, and attempt reports.
Monitor campaigns
Ops guide for watching a running campaign.
Pacing and retries
How predictive pacing and retry rules behave.