Skip to main content

Work a dialer campaign from the agent view

The dashboard route /voice/dialer/[id]/agent is the per-agent workspace for one dialer campaign. Where the live campaign console shows supervisors aggregates, this page is the single-agent loop: see the next contact, place the call, save the disposition, advance. Open it from the campaign detail page with Open agent view. Everything the page calls is on the Dialer API.

1. What the agent view shows

The page is a single centered column scoped to one campaign and one agent session.
  • Header — campaign name, a mode badge (Preview or Auto-dial), and an “Agent view” label so the agent can tell this screen apart from the supervisor console. A back link returns to the campaign detail page.
  • Campaign-state banner — when the campaign is not active or paused, the page stops polling and shows one of: Campaign not started, Campaign paused (“Waiting for the campaign to resume. Stand by.”), Campaign completed, or Campaign aborted. Completed and aborted campaigns have no more contacts available; a draft or paused campaign resumes feeding the agent automatically when the campaign state flips back to active.
  • Next contact card (Preview mode) — the pending contact the campaign assigned to this agent: display name (or “Unknown contact”), E.164 phone number, prior attempt count, and contact ID. A green Initiate call button originates the call. While a leg is active the button switches to a disabled “Call in progress” state with a hint to hang up before dialing the next contact.
  • Auto-dial standby (Progressive / Predictive mode) — a “Waiting for calls” state with a live-status pulse. The pacing engine delivers calls through the agent’s softphone; there is no manual dial button in auto-dial modes.
  • Preview standby — when no contact is available, a “Standby” state notes the queue is checked every 5 seconds.
  • Post-call disposition form — appears as soon as the call ends, replacing the contact card (see §4).
  • Query footer — during active polling a footer notes the contact queue is checked every 5 seconds; an Exit agent view button returns to the campaign console.

2. Run-control: pause, resume, and exit

The run controls an agent owns on this page are session-local — they affect this agent’s polling, not the campaign:
  • Pause / Resume (top of the contact card) stops and restarts the 5-second next-contact poll for this browser session. While paused, a “Polling paused” state replaces the card with a Resume button. Pausing never pauses the campaign — other agents keep receiving contacts, and the campaign-level control stays with the supervisor on the detail page.
  • Initiate call is disabled during an in-flight origination and while a call leg is active, so the same contact cannot be double-originated.
  • Exit agent view leaves the workspace and returns to /voice/dialer/[id].
Campaign-level pause, resume, and abort are not offered on the agent view; they live on the live campaign console under the dialer:write scope.

3. The real-time next-contact envelope

Preview-mode agents poll GET /api/v1/dialer/next-call?campaign_id={campaignId} every 5 seconds (only while the browser tab is focused). The API answers with the standard envelope; the payload is the next claimed contact:
For progressive and predictive campaigns the endpoint returns 204 No Content (the UI treats that as the auto-dial standby state, not an error), because the pacing engine claims and delivers contacts server-side. A contact: null body in preview mode means the queue has no eligible contact right now.

4. Dispositions and wrap-up codes

When the softphone leg transitions out of an active call — cleanly or on a failed call — the page swaps the contact card for the Post-call disposition form. The disposition is mandatory: until one is saved the contact stays in flight and the return-eligibility guard keeps reclaiming it.
  • Outcome (required) — the disposition picker lists the campaign’s configured codes (disposition_codes in the campaign metadata). When the campaign has no custom list, the picker falls back to the standard set: connected, no answer, busy, voicemail, callback later, not interested, wrong number. The strings route to contact statuses exactly as in the disposition matrix.
  • Callback time — choosing a callback-class disposition (e.g. callback_later) reveals a required date-time picker prefilled to tomorrow 10:00 local. The value must be in the future and no more than 90 days ahead; both the form and the API enforce this, and the scheduled time becomes the contact’s next attempt time.
  • Notes (optional) — up to 1000 characters, posted with the disposition.
  • Extend wrap-up — while the form is open, an “Extend wrap-up” control adds 60 seconds of after-call-work per click with a selectable reason code, up to a 10-minute cumulative cap. This keeps long note-taking from counting against the agent’s adherence without flipping the agent to an away state.
  • Save & next contact — submits and auto-advances to the next pending contact.
Submitting uses POST /api/v1/dialer/campaigns/{campaignId}/dispositions against the attempt ID minted when the call was originated:
A “Cannot save disposition — attempt ID is missing” note with a disabled submit means the origination response never delivered an attempt ID; refresh the page to re-establish the session. A dial failure re-queues the contact and shows an inline error under the contact card — the contact is not lost.

5. Preview vs auto-dial — and vs the aggregate console

The agent view is also deliberately different from the live campaign console: the console aggregates the whole run (per-contact status buckets, 24-hour outcomes, abandon-rate metering, pause/abort lifecycle) for supervisors, while the agent view exposes only the current agent’s loop — the next contact, the disposition owed on it, and session-local polling controls. Agents never see campaign-wide pacing numbers on this page.

6. Walkthrough: one contact, start to finish

  1. Open /voice/dialer/[id] and choose Open agent view; the header shows the campaign name with a Preview or Auto-dial badge.
  2. In preview, the next-contact card renders the name, number, and prior attempt count; click Initiate call. The button enters a “Starting call…” spinner, then locks to “Call in progress” once the leg is up.
  3. During the live call the softphone carries the call; the page shows the active-call hint and disables the dial button.
  4. Hang up. The card swaps to “Call ended — save disposition”: pick an outcome, set a callback time if the code needs one, add notes, and optionally extend the wrap-up window.
  5. Click Save & next contact. The form clears and the poll advances to the next pending contact.
  6. Stepping away: hit Pause to stop the poll, Resume to rejoin, or Exit agent view to leave the campaign entirely.

See also