Issue with Assistant-to-Assistant Call Transfer in...
# support
k
Hi Vapi team, I’m attempting to use assistant-to-assistant call transfer within a dynamically defined squad in the /call endpoint. However, the transfer to the “Supervisor” assistant never seems to trigger, even though the main assistant responds with the correct transfer phrase. I’ve defined both assistants in the squad.members array and set up assistantDestinations pointing to the supervisor by name. Here’s what I suspect: • The assistantDestinations may not be functioning as expected • The transfer trigger phrases might be insufficient • I may need to use a different endpoint or define something in the dashboard manually Could you clarify: 1. Is using the squad key in the /call endpoint enough to enable assistant transfer logic? 2. Is it required to manually pre-create squads or assistants in the Vapi dashboard for transfer to work? 3. Are there additional flags or trigger mechanisms we need in the assistant configuration to initiate the transfer? Happy to share sample payloads or logs if needed. Thanks for the guidance! Call ID: ce53a642-63b8-4159-b0c6-e8136e5c05c8 00:18 - Assistant recognises that I require a transfer to a supervisor but doesn't trigger a transfer properly.
v
You do not need to pre-create squads or assistants in the dashboard if you provide all assistant configurations and
assistantDestinations
in your
/call
payload.
To ensure assistant-to-assistant transfer works, double-check that the
assistantName
in your
assistantDestinations
exactly matches the
name
property of the target assistant in your squad. Here’s a minimal example:
Copy code
json
"squad": {
  "members": [
    {
      "assistant": { "name": "Main", ... },
      "assistantDestinations": [
        {
          "type": "assistant",
          "assistantName": "Supervisor",
          "message": "Transferring you to a supervisor."
        }
      ]
    },
    {
      "assistant": { "name": "Supervisor", ... }
    }
  ]
}
Make sure your transfer phrase is clear and matches the model’s expected trigger. If the transfer still does not trigger, verify the assistant names and try a more explicit transfer phrase in your prompt or model output. Sources: - [Vapi Squads Documentation](https://docs.vapi.ai/squads) - [Squads Example](https://docs.vapi.ai/squads-example)
k
My code does match these conditions so im not sure why the transfer doesn't trigger properly
k
Using the squad key in the /call endpoint is sufficient if both assistants and assistantDestinations are fully defined, assistants don’t need to be pre-created unless referenced by ID, and the source assistant must include the transferCall tool and correctly trigger it like, via prompt or tool call with exact assistantName matching the destination..
k
Yup I dynamically defined the assistants and I ensured that the assistantName matches the name property of the target assistant exactly, however I can't seem to see why there isn't a proper transfer. The first assistant will say "I'll transfer you now", detecting a transfer but doesn't proceed with a successful transfer after
k
Your logs show the tool was invoked? otherwise, the assistant may say it’s transferring without actually executing it..
k
My logs does mention that the assistant will transfer me to the "Supervisor" but theres no indication that the assistant invoked the transferCall tool
k
If your logs don’t show a transferCall tool invocation after the assistant says it’s transferring, then the tool wasn’t actually executed..
So check that the assistant includes a proper function call in its response and that the tool is correctly configured in the dashboard..
k
if it isnt present what can i add to my code to ensure that the transferCall tool is invocated correctly?
c
Add it to the assistant’s tools config with destination numbers, prompt the assistant to call it, and emit the correct function call structure in your code..
k
I'm still having issues with it so ill send a sample api payload because it still isnt working properly. Also, do i have to create the assistants and tools directly in VAPI platform? interface VapiRequestBody { assistant: VapiAssistant; name: string; customer: { number: string; name: string; }; phoneNumber: { twilioAccountSid: string; twilioAuthToken: string; twilioPhoneNumber: string; }; squad?: { members: Array<{ assistantId: string; assistantDestinations: Array<{ type: string; assistantName: string; message: string; description: string; keywords?: string[]; }>; } | { assistant: VapiAssistant; }>; }; }
c
Could you please send the latest call id where this issue occurred?
k
okay sure 9cb28423-b6db-45b7-9447-3ae370e0901c
c
We are reviewing the details of your request and will reach out to you when we have an update or if we need additional information.
Please make sure you have a transfer call tool configured attached to the assistant in the squad that directs to the supervisor assistant
k
Do i have to manually create the assistants on VAPI?
I configured the transfer call tool in VAPI that directs the call from the assistant to the supervisor, however it still doesnt work, do you need to see my code?
c
Yes please could you provide some call ids, squad ids, assistant ids, and the transferCall tool id?
k
Okay here they are: call ids: c630c7f5-4476-49ac-85df-32f0ae4d4a20 squad ids: 32b83845-ef4c-4ac7-b7b6-9f8698642b50 assistant ids: 4800786c-2647-4042-99b7-5efd4dff7e88 (supervisor), 5a1f0070-668b-48f1-aa77-cd3563399155 (assistant) transfer call tool id: 44697041-1c67-4a4a-ad67-fc5a458bd103 let me know if you want to see anything else
c
I performed some tests and got the best results without any tools. As long as the assistant destination is configured within the squad with clear instructions on when to transfer the call, you will be able to transfer without the tool. Remove the tool from the assistant and the assistant prompt as well as the squad prompt.
4 Views