Drive the dialer from your server
Tell a user's open dialer to dial, hang up, pause, resume, set the outcome, add leads or show a message, from your own server. VICIdial's Agent API, for the embedded dialer.
Your page can drive the dialer with its own buttons. Sometimes the decision is made on your server instead: a workflow fires, a lead books a callback, a manager moves someone to another list. POST /v1/seats/{id}/commands sends that user's open dialer a command, and it does it exactly as if the agent had pressed the button.
curl https://api.dialerseat.com/v1/seats/usr_829/commands -H "Authorization: Bearer dsk_test_..." -H "Content-Type: application/json" -d '{ "action": "dial", "phone": "+15125550142", "lead": { "external_id": "c_5501", "first_name": "Dana" } }'The answer is 202 with the command's id once it is on its way, or 409 seat_offline when the user has no dialer open. What the command does then arrives the usual way: call.started, call.dispositioned, seat.status_changed, and the dialer's own events on your page, including a command event with the same id.
Commands
- dial: call phone now, with the lead's fields (and campaign) if you have them. The lead joins the top of the queue if it is not in it.
- hangup: end the call. skip: skip the lead on screen, or end the call and skip it.
- disposition: set the outcome of the call being wrapped up, with code and optional notes.
- pause and resume: make the agent unavailable or available. start and stop: start or stop the auto-dialing.
- add_leads: add up to 500 leads to the queue, at the top or the bottom, without replacing it.
- update_lead: change what a lead's card shows (name, city, state or any other field), by your
external_id. - show_card and hide_card: put a message in front of the agent (title, body, up to 8 lines), or take it away.
- set_campaign and set_mode: switch the campaign (null for all) or the dial mode.
The same rules as the button
A command never goes around the dialer. A dial still passes the user's campaign access, your do-not-call list and the lead's calling hours on the server. A command the dialer cannot do right now, such as a dial in the middle of a call or a disposition with no call to wrap up, is ignored, as the button would be. set_mode works where this user may switch modes themselves, and only to a mode they are allowed.
Who has a dialer open
A dialer that is open but whose agent has not made themselves available reads paused; a closed one reads offline. GET /v1/seats?online=true lists everyone with a dialer open, and each seat's presence says where they stand. Send commands to those.
Looking calls up
GET /v1/calls?phone=+15125550142 returns every call to one number, ?lead= every call to one of your leads, and ?seat= one user's calls: what a record page in your CRM shows.
Coming from VICIdial
- external_dial is dial; external_hangup is hangup; preview_dial_action SKIP is skip.
- external_status is disposition; external_pause PAUSE and RESUME are pause and resume.
- external_add_lead is add_leads; update_fields is update_lead; send_notification is show_card.
- logged_in_agents is
GET /v1/seats?online=true; agent_status is the presence onGET /v1/seats/{id}. - phone_number_log and lead_search are
GET /v1/calls?phone=; callid_info isGET /v1/calls/{id}. - add_lead and update_lead (non-agent) are leads sent with the session or add_leads; add_dnc_phone is
POST /v1/dnc. - There is no blind_monitor or barge: DialerSeat has no live listening.
Every request is JSON with your secret key in the Authorization header, instead of user and pass in the address, and every error is JSON with a code and a plain message.
Related:Seats and sessions, Teams, roles and access, Campaigns and leads and Dispositions.