Transfer Tools

Transfer tools hand the live call off to a human, a queue, another system, or another Phonic Agent. Both transfer types cannot have parameters and always run in sync mode.

See Tool Definition for the shared fields and Tool Behavior Configuration for the behavior toggles.

Transfer to Phone Number

The built_in_transfer_to_phone_number tool transfers the call to a phone number — a human, a queue, or even another system. In the dashboard choose Transfer to phone number.

Key fields:

  • Phone number (phone_number) — the E.164 number to transfer to. Toggle Agent chooses to let the agent determine the number at runtime (phone_number stored as null).
  • DTMF (dtmf) — optional digits to send after the transfer. Toggle Agent chooses (dynamic_dtmf) to let the agent decide.
    Tip: include w in the sequence to insert a pause (silence) between digits — useful when the receiving system needs time to respond to a prompt.
  • Use agent phone number for transfer (use_agent_phone_number) — when enabled, Phonic transfers using the agent’s phone number. When disabled, it transfers using the connected party’s number (a SIP REFER), and DTMF is not sent.
  • Allow Phonic to detect and handle voicemail (detect_voicemail) — only available when using the agent’s phone number.
1import { PhonicClient } from "phonic";
2
3const apiKey = process.env.PHONIC_API_KEY;
4const client = new PhonicClient({ apiKey });
5
6async function createTool() {
7 await client.tools.create({
8 name: "transfer_to_support",
9 description: "Transfers the call to the support team",
10 type: "built_in_transfer_to_phone_number",
11 execution_mode: "sync",
12 phone_number: "+15551234567", // E.164 format
13 });
14}
15
16createTool()

Transfer to Agent

The built_in_transfer_to_agent tool hands the conversation off to another Phonic Agent. In the dashboard choose Transfer to agent and select one or more agents in Agents to transfer to (agents_to_transfer_to). Use the tool’s description to tell the agent which target to pick (e.g. route Enterprise vs Starter callers to different agents).

1await client.tools.create({
2 name: "transfer_to_finance",
3 description:
4 "For finance queries, transfer to 'finance-enterprise-agent' for Enterprise plans, else 'finance-starter-agent'.",
5 type: "built_in_transfer_to_agent",
6 execution_mode: "sync",
7 agents_to_transfer_to: ["finance-enterprise-agent", "finance-starter-agent"],
8});