Skip to main content

Hot transfer & forward

Read this when: the call should reach a human — merged live (hot transfer) or blind-forwarded.

Merge vs. forward​

  • Forward (forward_call action): the call is redirected to a target number immediately; the agent's call ends and there is no control afterwards — the contact hears ringing/hold music. Usually only phone_number is needed:
"fulfillment": [{ "timing": "performed",
"forward_call": { "phone_number": "+15551234567",
"pre_merge_message": "Connecting you now.",
"from_number": "{%agent_phone_number%}" } }]
  • Hot transfer / merge (new_call action): the engine starts a child call — a second agent dials the call center or human. The main agent stays with the contact (its idle messages switch to "still working on it" reassurance) until a human answers and approves; then both sides hear a pre-merge message and the calls merge.

The hot-transfer goal shape​

{
"name": "transfer to representative",
"goal_type": "say",
"isHotTransfer": true,
"hideSubgoals": true,
"uninterruptible": true,
"messages": [{ "message": "Let me check if one of our experts is available. It should only take a sec." }],
"conditions": "'sole decision maker' and 'transfer now'",
"fulfillment": [
{ "timing": "triggered_once", "isSystemFulfillment": true,
"new_call": {
"from_number": "{%agent_phone_number%}",
"pre_merge_message": "You are now being connected.",
"parent_fail_message": "Sorry, I didn't find an available agent. Goodbye!",
"contact_name": "Customer Agent",
"metadata": { "client_contact_name": "{contact_name}" },
"idle_messages": [
{ "text": "Sorry about that, I'm working to get a hold of them for you.", "timeout": 8 }
]
} },
{ "timing": "performed", "call_result": "converted" }
],
"goals": [
{
"name": "Hold while connecting",
"goal_type": "say",
"repeat": true,
"messages": [
{
"message": "The user is waiting for their call to be connected, it may take a moment, usually about one or two minutes.\nBe nice and reassure them that the call is being connected on the other line while they are waiting and you will connect them in a minute or two.\nYou may answer their questions to the best of your knowledge while they wait. Try to be brief.\n\nIf the user objects to being connected use the following objection handling strategies\n\nAlso check for relevant responses from the documentation, try to use a new response each time.",
"generative": true
}
]
}
]
}

Precede the transfer with an explicit consent ask. In a subagent script, the brief asks for consent and the phase takes its transfer exit only after a clear yes; no separate goal. In a structured script, use an approval goal ("agrees to transfer", "interested in transfer") whose yes is the transfer's gate — unless the use case explicitly doesn't need one (e.g. an inbound caller already asking for a human). The transfer then starts in flow order like any goal, and must fire only once the contact has opted in: either flow order already guarantees that (the consent goal's negative choices are all terminal — 01 §1.8), or gate it with conditions on the consent signal collected upstream (here 'sole decision maker' and 'transfer now'). Add proactive: false only in a script that intentionally models every hand-off with explicit transitions (01 §1.6); it then needs a transition or trigger phrase targeting this goal, or the transfer is unreachable.

Hard rules (these also live in the 05 digest):

  • The transfer goal must be uninterruptible — an external process is starting; an interruption mid-speech would derail it.
  • Exactly one child goal: the nested generative "Hold while connecting" goal, exactly as in the skeleton — it keeps the contact company while the child call dials (reassurance, brief answers, objection handling). Nothing else goes under the transfer goal; a merge-fail fallback goal lives at the top level, reached via trigger_goal_on_merge_fail. This is the one sanctioned exception to the rule that only container goals nest subgoals.
  • Agent id: new_call.agent is the id of the AI agent making the child call. If another hot-transfer goal in the config already has one, reuse that exact id; otherwise omit the field — never invent an id — and let the platform link or create the hot transfer agent. Both agents must share the same telephony account.
  • Leave phone_number and agent out of a new transfer. The transfer_setup card saves the number and the hot transfer agent into the goal, so never write them, and never invent a variable or metadata key for the number, such as {call_center_number}. Use a variable only when the user says the number differs per contact and names the field that carries it. Example scripts that set a number predate this rule. A forward's phone_number is still the number the user gave you, written out.
  • from_number is required: always set it to "{%agent_phone_number%}" (the agent's own number). Setting it to "{phone}" instead shows the contact's number to the human — this requires the any-caller-id capability on the telephony account; don't do it unless that's confirmed enabled.

Knobs​

new_call fields: phone_number (target), pre_merge_message (said to the contact at merge; default "You are now connected, good luck!"), parent_fail_message (what the main agent says if no human is reached), child_fail_message (what the child agent says if the main call drops), trigger_goal_on_merge_fail (jump to this goal instead of speaking the fail message — the flow keeps control of the failure path), idle_messages ({text, timeout} list replacing default silence-fillers on the main call), silence_timeout (seconds of tolerated silence while dialing, default 180), metadata (Field passthrough: values passed into the child call — kept unformatted so they stay live-synced as the main call updates them), contact_name (how the child call names its callee), from_number (caller id — required, see hard rule), stop_recording_on_merge (true = don't record the merged human conversation), check_dnc_registry (default false).

State: %child_call_start% and %merge_time% timestamps; %in_transfer_working_hours% (yes/no) gates transfers to configured call-center hours (04 §4.2).

Exit states​

Merge succeeded → the humans talk; a successful merge sets call_result: "converted" (the template also sets it explicitly on performed). No human answered → the main agent says parent_fail_message — or jumps to trigger_goal_on_merge_fail — and the flow continues (typically to a callback or goodbye goal — give it a path). While dialing, the nested "Hold while connecting" goal holds with the contact and answers questions.