Transfer Plan Advice
# support
j
I have a warm transfer set up. It introduces the customer to an advisor, with the customer name and a brief summary of the call. It should then finish the transfer with "transferring you to {{customer.name}} now" so that the last thing the advisor hears is the customer's name. However this doesn't work, it simply says "transferring you to now". Can you tell me what is wrong? { "function": { "name": "scheduleCallbackTransfer" }, "destinations": [ { "type": "number", "number": "+441234567", "transferPlan": { "mode": "warm-transfer-experimental", "transferAssistant": { "firstMessage": "Hi, I have a customer on the line. Can I take your name please?", "firstMessageMode": "assistant-speaks-first", "maxDurationSeconds": 90, "silenceTimeoutSeconds": 30, "model": { "provider": "openai", "model": "gpt-4o", "messages": [ { "role": "system", "content": "You are a transfer assistant. After the greeting, say: 'This is a lead from Company Name. The lead’s name is {{customer.name}}.' Then give a one-sentence summary of the call (e.g., debt level or issue, make sure you include the customer name). Wait for confirmation. Only if the advisor agrees, say: 'Transferring you to {{customer.name}} now.' and call the transferSuccessful tool. If the advisor is unavailable or declines, call transferCancel." } ], "tools": [ { "type": "transferSuccessful", "function": { "name": "transferSuccessful" }, "messages": [ { "type": "request-start", "content": "Transferring you to{{customer.name}} now." } ] }, { "type": "transferCancel", "function": { "name": "transferCancel" }, "messages": [ { "type": "request-complete", "content": "Returning to the assistant to schedule a callback."
v
The issue is that
{{customer.name}}
variable interpolation is not supported in assistant-based warm transfers.
Instead, update your system prompt to have the assistant extract the customer name from the conversation context. For example:
Copy code
json
{
  "role": "system",
  "content": "You are a transfer assistant. After the greeting, say: 'This is a lead from Company Name. The lead’s name is [extract customer name from conversation].' Then give a one-sentence summary of the call including the customer name. Wait for confirmation. Only if the advisor agrees, say: 'Transferring you to [customer name] now.' and call the transferSuccessful tool."
}
This will ensure the assistant announces the customer's name using information from the conversation, not a template variable. Reference: [assistant-based warm transfer documentation](https://docs.vapi.ai/calls/assistant-based-warm-transfer) Source: - [assistant-based warm transfer documentation](https://docs.vapi.ai/calls/assistant-based-warm-transfer)
h
does this mean the customers name needs to be in the transcript? , what about the customers phone number? we already know the phone number how do we send it to the transfer assistant?
c
it will perform better if the customer's name or number is in the transcript. you can add the variables to your system prompt:
Copy code
"....// your assistants prompt

you are helping {{customer.name}} and their phone number is {{customer.number}}"
h
no bro you cant add variables to the transfer assistant in warm transfer experimental. there are many tickets about this, its not well documented, the only info the transfer assistant has is the call transcript from the main assistant, so you would need to have the main assistant confirm the customer name and customer number in the call for the transfer assistant to find it
k
try using this. feel free to modify:
Copy code
{
  "function": {
    "name": "scheduleCallbackTransfer"
  },
  "destinations": [
    {
      "type": "number",
      "number": "+441234567",
      "transferPlan": {
        "mode": "warm-transfer-experimental",
        "summaryPlan": {
          "enabled": true,
          "messages": [
            {
              "role": "system",
              "content": "Extract the following from the conversation:\n1. Customer's name (as stated during the call)\n2. Customer's phone number (as stated during the call)\n3. One sentence summary of their issue/situation\n\nReturn in this exact format:\nNAME: [name]\nNUMBER: [number]\nISSUE: [one sentence summary]"
            },
            {
              "role": "user",
              "content": "{{messages}}"
            }
          ],
          "timeoutSeconds": 10
        },
        "transferAssistant": {
          "firstMessage": "Hi, I have a customer on the line. Can I take your name please?",
          "firstMessageMode": "assistant-speaks-first",
          "maxDurationSeconds": 90,
          "silenceTimeoutSeconds": 30,
          "model": {
            "provider": "openai",
            "model": "gpt-4o",
            "messages": [
              {
                "role": "system",
                "content": "You are a transfer assistant. You have the following information about the customer from the previous conversation:\n\n{{summary}}\n\nAfter the advisor gives their name, say: 'This is a lead from Company Name.' Then share the lead's name and give a one-sentence summary of the call (e.g., debt level or issue, include the customer name).\n\nWait for confirmation. Only if the advisor agrees, say: 'Transferring you to [customer name] now.' and call the transferSuccessful tool.\n\nIf the advisor is unavailable or declines, call transferCancel."
              }
            ],
            "tools": [
              {
                "type": "function",
                "function": {
                  "name": "transferSuccessful",
                  "description": "Call this when the advisor confirms they can take the call."
                },
                "messages": [
                  {
                    "type": "request-start",
                    "content": ""
                  }
                ]
              },
              {
                "type": "function",
                "function": {
                  "name": "transferCancel",
                  "description": "Call this when the advisor is unavailable or declines the transfer."
                },
                "messages": [
                  {
                    "type": "request-complete",
                    "content": "Returning to the assistant to schedule a callback."
                  }
                ]
              }
            ]
          }
        },
        "holdAudioUrl": "https://example.com/hold-music.mp3",
        "fallbackPlan": {
          "message": "I apologize, our advisors are currently unavailable. Let me help you schedule a callback instead.",
          "endCallEnabled": false
        }
      }
    }
  ]
}
h
thanks, yes this is the workaround currently, I talked with support in an email ticket and they said they where wroking on a fix to add variables to transfer assitants
c
sounds good.