Go back to dialerseat.comsales@dialerseat.com
Build

Components and headless

The dialer's parts, each on its own anywhere on your page, as HTML tags or attach(); or no dialer screen at all, driven from your own buttons.


One dialer holds the session and places the calls. Any number of its parts can sit elsewhere on the page and stay in step with it: pressing a button in any part is pressing it in the dialer.

The parts

  • queue: the lead queue, with the lead being dialed lit, REDIAL and FILTER.
  • callbar: a slim bar with who is on the line, the timer and the buttons for this moment. Fits a CRM header.
  • lead: the lead on the line, their fields and the call script.
  • dispositions: the wrap-up sheet with your outcomes. Quiet until a call needs one.
  • stats: today's metric tiles.
  • team: a manager's board of their people (managers and admins only).

As HTML tags

No JavaScript of your own. <dialerseat-dialer> asks your server for a session itself (a POST to session-url with the visitor's cookies, answered with { "token": "dss_..." }). Each part names the dialer it belongs to with for=.

html
<script src="https://dev.dialerseat.com/embed/v1.js" data-key="dpk_test_..."></script>

<dialerseat-dialer id="dialer" session-url="/your-server/dialer-session"></dialerseat-dialer>
<dialerseat-callbar for="dialer"></dialerseat-callbar>
<dialerseat-queue for="dialer" height="480"></dialerseat-queue>

Attributes on <dialerseat-dialer>: session-url or session, campaign, theme (light or dark), height, publishable-key, and headless (no screen of its own). It fires the dialer's events on itself as DOM events named dialerseat:call, dialerseat:disposition and so on, and has a .leads property and a .dialer with every method below.

With JavaScript

js
const dialer = DialerSeat.mount('#dialer', { session, leads })
dialer.attach('callbar', '#top-bar')
dialer.attach('stats', document.querySelector('#sidebar'), { theme: 'dark' })

Headless

DialerSeat.connect({ session, leads }) starts a dialer with no screen. It still holds the phone line, places the calls, detects answering machines, plays the audio and sends every webhook. Your page draws whatever it likes from the state event and drives it with the methods below.

js
const dialer = DialerSeat.connect({ session: SESSION_TOKEN, leads })

dialer.on('state', (s) => {
  // s.status: idle, calling, connected, ended, preview_ready
  // s.lead, s.call, s.queue, s.stats, s.showDisposition, s.dispositions, s.presence ...
  render(s)
})
startButton.onclick = () => dialer.setAvailable().start()
endButton.onclick = () => dialer.hangup()
outcome.onclick = () => dialer.disposition('APPT_SET', notes.value)

Driving the dialer

  • dial(lead) or dial('+15125550142'): click to call. Dials this one lead now, adding it to the queue if it is not there.
  • setAvailable(on), start(), stop(): the same as SET AVAILABLE, INITIATE DIAL SEQUENCE and STOP.
  • hangup(), skip(): end the call, or end it and move on without an outcome.
  • dialPreview(), skipPreview(): in preview mode.
  • disposition(code, notes): save the outcome; the dialer moves on.
  • setMode(mode), setCampaign(id), setRedial(1 | 2 | 3), mute(on), hold(on).
  • setLeads(leads) or setLeads(leads, { campaign }): replace the list, or one campaign's part of it.
  • showCard({ title, body, items }), hideCard(): a guidance card in front of the agent for this call, for example the answer to an objection your page just detected. It clears itself when the call is dispositioned.
  • getState(): the latest state.

Click to call from any link

Any element with data-dialerseat-call dials its number in the page's dialer when clicked, including elements your CRM renders later. Add data-dialerseat-name, data-dialerseat-id (your contact id) and data-dialerseat-campaign if you have them.

html
<a href="#" data-dialerseat-call="+15125550142" data-dialerseat-name="Dana Ruiz" data-dialerseat-id="c_5501">Call</a>

Related:Seats and sessions, Teams, roles and access, Campaigns and leads and Dispositions.