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:
- The caller asks the sales assistant for support. The sales stub gets an
_update_from_voicedelegation, and its backend agent decides to hand the call over. - The sales stub calls an action on the support stub, eg with Send Action or Create Stub, and passes the
voice_session_uuid. - That action on the support stub runs this task.
- The sales stub gets
session_transferred_out. The support stub getssession_transferred_in, with the whole conversation so far and the delegation that asked for the transfer. - The support stub answers that delegation, eg with a
commentaryvoice notification: "Sure, I've put you through to support."
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
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
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
What happens after a transfer
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:
Then, on the session_transferred_in update, keep the conversation and answer the request that caused the transfer: