HCC Docs

Warm transfers

A Rep puts the customer on hold, talks to a colleague, a queue's next Rep or a number, then hands over. The Desk does this with "Consult first" in its Transfer dialog. From your code:

import { number, queue, rep } from '@hcc/sdk';

const consult = await hcc.calls.consult(callId, { repId: 'rep_1', target: rep('rep_2') });
// or target: queue('sales'), or number('+14155550100')

await consult.complete(); // hand over: the customer is with the target, and the Rep leaves
await consult.cancel(); // back to the caller
await consult.merge(); // everyone together
  • The customer hears hold music and neither Rep hears them. complete and merge are refused (409) until the target has joined.
  • The target fails: back to the caller. Busy, no answer or a queue with nobody takes the customer off hold, and call.consult.ended says why. Nothing has been transferred, so nothing is thrown in the flow and there's no call.transfer.failed.
  • The Rep leaves. Once the target has joined, the call is handed over. While the target still rings it becomes a blind transfer, and a failure from there is like any other transfer's.
  • A consult into a queue isn't a queue visit: no queue_calls row and no queue.call.* Events. It goes to the front of the line, and an Offer unanswered for 60 s fails it.
  • The call's owner is the first Rep until completion, then the target. Only the owner's disposition lands on the call; anyone else's goes on the Timeline. disposition.recorded has owner: true or false.
  • Recording. The Reps' talk isn't on the recording, which follows the customer's leg. When a recording is live, an external party hears the recording notice alone as they join.
  • While one is live, a second consult, a transfer, hold, keypad tones and a supervisor's take-over are refused (409).
  • Scopes. Starting and acting on one need calls:write, reading one calls:read. A developer's live key can't have calls:write; their test key runs consults on simulated calls.
  • Events: call.consult.started, call.consult.connected, call.consult.merged and call.consult.ended (with outcome: completed, canceled, target_failed, target_left or caller_left). A completed one also publishes call.transfer.started and call.transfer.completed, with consultId.