1. Tasks
  2. Voice Session Transfer

Tasks

Voice Session Transfer

Takes a live voice call over from another stub. Useful for processes split over templates, eg handing a caller from the sales assistant to the support assistant without ending the call.

Run this task on the stub that should have the call: it claims the call from the stub that has it now. The caller stays on the line and hears no interruption. From then on, the new stub gets the call's _update_from_voice updates and steers it with voice notifications and the voice_* tasks, the same as the stub that started it.

It works for every voice call: webchat, WhatsApp calls and phone calls.

A typical handover from a sales stub to a support stub:

  1. The caller asks the sales assistant for support. The sales stub gets an _update_from_voice delegation, and its backend agent decides to hand the call over.
  2. The sales stub calls an action on the support stub, eg with Send Action or Create Stub, and passes the voice_session_uuid.
  3. That action on the support stub runs this task.
  4. The sales stub gets session_transferred_out. The support stub gets session_transferred_in, with the whole conversation so far and the delegation that asked for the transfer.
  5. The support stub answers that delegation, eg with a commentary voice notification: "Sure, I've put you through to support."
NOTE

The chat side doesn't move with the call. For a WhatsApp or webchat call, also take the chat over with Manage Stubsession in the same action, so the caller's messages after the call reach the new stub too.

Basic usage

loading...

Parameters

voice_session_uuid
required
string

The voice call to take over. Pass it from the stub that has the call, eg from its Start Voice Chat result or from stubpost.data._incoming_voice_data.voice_session_uuid on any of its _update_from_voice updates. The call must be in your organization.


instructions
optional
string

Instructions for the assistant once the call is on this stub, eg its new role.

A transfer doesn't change the assistant's voice or the instructions it started with: those are fixed when the call starts. These instructions are added on top and steer the assistant from now on, the same as Voice Instructions.

Result

loading...

Properties

payload.from_stubref
string

The stub that had the call.


payload.to_stubref
string

This stub, which has the call now.


payload.transferred
boolean

true when the call moved. false when it was already on this stub: nothing changed, and no updates were sent.

Errors

message Meaning
voice_session_uuid is required The voice_session_uuid param is missing
no_active_voice_session No live voice call with this voice_session_uuid in your organization
voice_session_not_active The call is already ending
voice_session_already_active This stub has a live voice call of its own. A stub can only have one. error.details.voice_session_uuid is that call

What happens after a transfer

What Goes to
delegation and interval updates the stub that has the call
voice notifications and voice_* tasks accepted from the stub that has the call. From a stub the call left, they fail with voice_session_transferred
session_ended the stub that started the call, with the charges, and also the stub that had the call when it ended
recording_ready every stub the call was on, each with the recording attached
charges the stub that started the call

A call can be transferred as often as needed, including back to a stub it was on before.

See Update From Voice for the session_transferred_out and session_transferred_in updates.

Examples

Hand a call from sales to support

On the support stub, in the action the sales stub calls, take the call and the WhatsApp chat over:

loading...

Then, on the session_transferred_in update, keep the conversation and answer the request that caused the transfer:

loading...