flat-fuchsia•11mo ago
TransferCall function setup with API
Hello, I have a question about transferCall funtion.
I tried to set it up so that my assistant can transfer the call to another one or a phone number. I set it up, but it was saying that the assistant doesn't exist.
https://docs.vapi.ai/api-reference/tools/create#request.body.transferCall.destinations.assistant.assistantName
This part wasn't working. I tried the name of the assistant and his ID. None of it worked. How do I set it up so it works that assistants in one organization can transfer to each other or call the phone number there?
74 Replies
Relevant threads
These are relevant threads you might take a look into before continuing further:
- <#1298708722218041446>
@Radim Kopp
Hello! I'm glad to assist you with the transferCall function. To ensure that assistants within the same organization can transfer calls to each other or to a specific phone number, you need to follow these steps:
1. Make sure that the assistant you're trying to transfer the call to exists and is properly configured within your organization.
2. Verify that you are using the correct assistant name or ID. The assistant name should be the one that was specified when the assistant was created.
3. Ensure that the forwardingPhoneNumber is correctly set up on the assistant you want to transfer the call to.
If you've checked these points and the issue persists, it could be a problem with the configuration on the backend or a temporary service issue. In that case, it would be best to reach out to the support team for further assistance.
If you provide me with the assistant's name or ID and the forwardingPhoneNumber, I can help you initiate the transferCall function. If you have any other questions or need further clarification, feel free to ask!
You can continue this conversation by mentioning me in the message.
flat-fuchsiaOP•11mo ago
@Vapi
firstId: b974d85a-4009-41a2-bdb2-1cc119bc28c6
secondId: d054d8cc-21b8-4cc4-af1e-a7eeb256db43
phoneNumber: +420xxxxxxxxx
@Radim Kopp
Thank you for providing the assistant IDs and the phone number. To set up the transferCall function correctly, you'll need to use the assistant ID to refer to the assistant you want to transfer the call to. Here's how you can set it up:
1. When configuring the transferCall function, use the
assistantId
field to specify the ID of the assistant you want to transfer the call to. For example, if you want to transfer a call from the first assistant to the second one, you would use secondId
as the assistantId
.
2. If you want to transfer the call to a phone number instead of an assistant, you would use the phoneNumber
field to specify the destination phone number.
Here's a sample configuration for transferring a call to another assistant:
And here's a sample configuration for transferring a call to a phone number:
Please replace +420xxxxxxxxx
with the actual phone number you wish to transfer the call to.
If you have already tried this and it's not working, please ensure that both assistants are active and properly configured in your organization. If the problem persists, it may be best to contact support for a more in-depth investigation.flat-fuchsiaOP•11mo ago
Can you merge it? I need these 3 to be in one function @Vapi
@Radim Kopp
Certainly! To merge the transfer to both assistants and the phone number into one function, you would configure the
transferCall
function with multiple destinations. Here's how you can set it up:
This configuration will allow the call to be transferred to either of the two assistants or the specified phone number. Please ensure that the assistant IDs and phone number are correct and that all destinations are properly set up to receive transfers within your organization.
If you need any further assistance or if you encounter any issues, please let me know!flat-fuchsiaOP•11mo ago
There is only assistantName in the API refference playround @Vapi
@Radim Kopp
I apologize for the confusion. If the API reference specifies
assistantName
as the field to use, then you should indeed use the name of the assistant rather than the ID. However, you mentioned that using the assistant name did not work for you.
In this case, it's important to ensure that the name you are using is exactly as it was defined when the assistant was created. Remember, the name is for internal labeling use and is case-sensitive.
Here's how you would structure the transferCall
function using assistantName
:
Please replace "First Assistant Name"
and "Second Assistant Name"
with the actual names of the assistants you wish to transfer the call to. The phoneNumber
should be the actual number you want to transfer the call to.
If you're still experiencing issues, it might be necessary to check with support to ensure that the assistant names are correct and that there are no issues with the transferCall setup in your organization's configuration.flat-fuchsiaOP•11mo ago
I tried this, but this doesnt work. It's fallsback to the fallBackDestination. I edited the phone number, I dont want it here. But this JSON doesnt work. @Vapi
{
"id": "2c4a658a-89c9-40a4-a74e-e9ee78b3e31f",
"createdAt": "2024-11-04T08:53:28.049Z",
"updatedAt": "2024-11-04T08:53:28.049Z",
"type": "transferCall",
"function": {
"name": "transferCall",
"description": "Slouží pro přepojování hovoru."
},
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"destinations": [
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"assistantName": "Eva"
},
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti",
"assistantName": "Linda"
},
{
"type": "number",
"number": "+420721xxxxxx",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím.",
"description": "Přepojení přímo do kliniky"
}
]
}
@Radim Kopp
I'm sorry to hear that the transfer isn't working as expected. If the call is falling back to the
fallBackDestination
, it suggests that there might be an issue with the destination details or the assistants may not be correctly configured to receive transfers.
Here are a few steps you can take to troubleshoot the issue:
1. Check Assistant Names: Ensure that the assistant names "Eva" and "Linda" are spelled correctly and match exactly with the names configured in your organization, including case sensitivity.
2. Assistant Availability: Verify that the assistants "Eva" and "Linda" are currently active and available to take calls.
3. Organization Configuration: Confirm that your organization ID 5866d026-db4b-40ed-abaf-854bc6c14d1c
is correct and that the assistants are associated with this organization.
4. Permissions and Settings: Make sure that there are no restrictions or settings preventing the assistants from receiving transferred calls.
5. API Version: Check if there have been any updates to the API that might affect how the transferCall function works.
6. Support Team: If you've verified all the above and the issue persists, it may be necessary to contact the support team for a more detailed investigation. They can check the backend logs and configurations to identify the root cause of the problem.
Since you've edited the phone number for privacy, please ensure that the actual number used in the configuration is valid and capable of receiving calls.
If you need further assistance, please let me know, and I'll do my best to help you resolve this issue.flat-fuchsiaOP•11mo ago
I used Get assistans and coppied the names. They are available, Org number must be correct, I used playround with private api key. Trasfercall to only number worked before. It should all be correct
@Vapi
@Radim Kopp
Given that you've verified the assistant names, availability, organization ID, and that transferring to a number has worked previously, it seems like your setup should indeed be correct. Since the issue persists, it's possible that there might be a more subtle configuration issue or a limitation within the system that isn't immediately apparent.
At this point, the best course of action would be to reach out to the support team with the details you've provided here. They will have the necessary tools and access to logs to diagnose the issue more effectively. They can also confirm if there are any recent changes to the API or known issues that might be affecting the transferCall function.
Please provide them with the JSON configuration you've used, the steps you've taken to troubleshoot, and any other relevant details. The support team should be able to guide you through resolving this issue.
If you need any further assistance or have additional questions, feel free to ask.
flat-fuchsiaOP•11mo ago
@Vapi Team Can you please look at this? I would appreciate it.
mute-gold•11mo ago
Hey @Radim Kopp can you share the tool call CURL?
flat-fuchsiaOP•11mo ago
curl -X POST https://api.vapi.ai/tool \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "transferCall",
"destinations": [
{
"type": "assistant",
"assistantName": "Eva",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím."
},
{
"type": "assistant",
"assistantName": "Linda",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti"
},
{
"type": "number",
"number": "+420XXXXXXXXX",
"description": "Přepojení přímo do kliniky",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím."
}
],
"function": {
"name": "transferCall",
"description": "Slouží pro přepojování hovoru."
}
}'
You mean this? I just removed the Bearer
mute-gold•11mo ago
Your tool call format is correct, but you might be using wrong assistant name double check your assistant name in dashboard.
flat-fuchsiaOP•11mo ago
I coppied the exact name that Get assistants gave me
It didnt work yesterday, yesterday I took the name from dashboard, but apperently the names are same
So, it's weird
mute-gold•11mo ago
@Radim Kopp you can use it for assistants in your org only.
flat-fuchsiaOP•11mo ago
I know I'm doing that
These two are in the same dashboard and Org.
mute-gold•11mo ago
Man you must be doing something wrong can you share complete CURL and OrgID.
flat-fuchsiaOP•11mo ago
wydm complete? This wasnt complete? I deleted the private key from this, otherwise it all I coppied from the playground
I sent this earlier
and then the thing that gets sent to create that
@Vapi Team
mute-gold•11mo ago
@Radim Kopp add following to the destination of type number and it will work.
"numberE164CheckEnabled": false
flat-fuchsiaOP•11mo ago
Sadly it doesn't. It's still falling back to my second phone
curl -X POST https://api.vapi.ai/tool \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "transferCall",
"destinations": [
{
"type": "assistant",
"assistantName": "Eva",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím."
},
{
"type": "assistant",
"assistantName": "Linda",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti"
},
{
"type": "number",
"number": "+420xxxxxxxxx",
"description": "Přepojení přímo do kliniky",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím.",
"numberE164CheckEnabled": false
}
],
"function": {
"name": "transferCall",
"description": "Slouží pro přepojování hovoru."
}
}'
Result from API playground:
{
"id": "2c4a658a-89c9-40a4-a74e-e9ee78b3e31f",
"createdAt": "2024-11-04T08:53:28.049Z",
"updatedAt": "2024-11-04T08:53:28.049Z",
"type": "transferCall",
"function": {
"name": "transferCall",
"description": "Slouží pro přepojování hovoru."
},
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"destinations": [
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"assistantName": "Eva"
},
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti",
"assistantName": "Linda"
},
{
"type": "number",
"number": "+420721728086",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím.",
"description": "Přepojení přímo do kliniky"
}
]
}
mute-gold•11mo ago
@Radim Kopp for new destination number delete your current tool and create it again.
flat-fuchsiaOP•11mo ago
Names should be correct:
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"name": "Eva",
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"name": "Linda",
I created a new one, it's easier then patch
mute-gold•11mo ago
Patch for destinations doesn't work.
flat-fuchsiaOP•11mo ago
Okey, I didnt do that
flat-fuchsiaOP•11mo ago

flat-fuchsiaOP•11mo ago
It's just weird, everything worked in Vapi so far easily, I have no idea where am I making the misstake
Can't pronounce 2025 in Czech and do this transfer
The AI before said that I can do assistantId, but I dont see that in the options when creating
mute-gold•11mo ago
Hey @Radim Kopp I believe it's an new issue "Can't pronounce 2025 in Czech and do this transfer" can you please create another ticket. If this is related to current ticket then eloborate more around your usage and expectations along with the call id.
flat-fuchsiaOP•11mo ago
Will do🫡
mute-gold•11mo ago
ThankYou.
flat-fuchsiaOP•11mo ago
@Shubham Bajaj This issue hasn't been solved, but the ticket is marked as solved, could you undo it please?
mute-gold•11mo ago
What's not resolved?
flat-fuchsiaOP•11mo ago
This
This transferCall funtion, it still doesnt work. Still fallingBack to my phone
mute-gold•11mo ago
As mentioned create a new tool and remove fallback destinations using API.
flat-fuchsiaOP•11mo ago
Removed the fallback, now it's saying couldnt get assistant
New tool:
{
"id": "d69ed20e-f0d7-40cb-ad6c-748360260464",
"createdAt": "2024-11-05T22:03:58.511Z",
"updatedAt": "2024-11-05T22:03:58.511Z",
"type": "transferCall",
"function": {
"name": "transferCall",
"description": "Slouží pro přepojování hovoru."
},
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"destinations": [
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"assistantName": "Eva"
},
{
"type": "assistant",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti",
"assistantName": "Linda"
},
{
"type": "number",
"number": "+420xxxxxxxxx",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím.",
"description": "Přepojení přímo do kliniky",
"numberE164CheckEnabled": false
}
]
}
Assistant:
"id": "d054d8cc-21b8-4cc4-af1e-a7eeb256db43",
"orgId": "5866d026-db4b-40ed-abaf-854bc6c14d1c",
"name": "Eva",
Error:
"assistant_request_error": "Invalid Destination. Assistant "Eva" Not Found.",
mute-gold•11mo ago
Hey @Radim Kopp can you join today's discord OH will resolve it over there.
flat-fuchsiaOP•11mo ago
What time brother?
mute-gold•11mo ago
If your available now we can jump on a call. If yes DM me.
flat-fuchsiaOP•11mo ago
In school sadly, available from around 4pm cet
mute-gold•11mo ago
12:00AM IST we will have discord OH catch you there.
flat-fuchsiaOP•11mo ago
18:30 UTC, got you
e9740d53-f7b2-4326-a69c-6f9460199824
This is my body for the POST API request, made in Playground
{
"type": "transferCall",
"destinations": [
{
"type": "assistant",
"assistantName": "Linda",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti."
},
{
"type": "assistant",
"assistantName": "Eva",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím."
},
{
"type": "number",
"number": "420721728086",
"numberE164CheckEnabled": false,
"description": "Slouží pro přepojení přímo do kliniky.",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím."
}
],
"function": {
"name": "presmerujHovor",
"description": "Slouží pro přepojení hovoru buď na asistentku Lindu, Evu nebo do kliniky"
}
}
We changed the name ("name": "presmerujHovor",) and we removed the "+" from the phone number
flat-fuchsiaOP•11mo ago
Here is my WHOLE list assistants response, so you know that the names are really correct
flat-fuchsiaOP•11mo ago
This is the error I got on make
flat-fuchsiaOP•11mo ago
flat-fuchsiaOP•11mo ago
So for the sumarry, I shared my POST API toolcall request, the unsuccessful tweaks we made, my GET assistants and Error from make.com
mute-gold•11mo ago
[
{
"id": "83a5941a-d6b9-43be-b4b8-27b675f57ff8",
"name": "Linda"
},
{
"id": "f768609a-2025-488d-8293-406752e0493e",
"name": "Zubař (Copy)"
},
{
"id": "2151b2d2-370b-4b33-a3a6-3943f9cc4247",
"name": "Zubař záloha"
},
{
"id": "9254877a-1737-40e4-a9d8-8e6a6a67ae44",
"name": "Zubař zaloha"
},
{
"id": "dd6584ee-09c4-466f-b9d8-8cf0c17901bf",
"name": "Linda (Copy)"
},
{
"id": "b974d85a-4009-41a2-bdb2-1cc119bc28c6",
"name": "Linda"
},
{
"id": "d054d8cc-21b8-4cc4-af1e-a7eeb256db43",
"name": "Eva"
}
]
Hey @Radim Kopp it clearly shows your using wrong assistant Id you can compare it with debuggin artifcacts you recieved.
Now last thing you can do is share the CURL or Payload your sending through make if cannot share it then share a detailed loom video.
flat-fuchsiaOP•11mo ago
Bro I aint using assistantId, there is no option for it when building the bot
Well I will try it later on today and let you know
Well I tried this, but doesn't work. I changed assistantName for assistantId, but it doesn't want to take it.
{
"type": "transferCall",
"destinations": [
{
"type": "assistant",
"assistantId": "b974d85a-4009-41a2-bdb2-1cc119bc28c6",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím.",
"description": "Tento asistent slouží pro vytváření, měnění, mazaní, vyhledání rezervace nebo pro zjištění časové dostupnosti."
},
{
"type": "assistant",
"assistantId": "d054d8cc-21b8-4cc4-af1e-a7eeb256db43",
"description": "Tento asistent slouží pro připomenutí rezervace a následného potvrzení do systému, že klient přijde.",
"message": "Přepojuji vás na jiného asistenta. Chvíli strpení prosím."
},
{
"type": "number",
"number": "420721728086",
"numberE164CheckEnabled": false,
"description": "Slouží pro přepojení přímo do kliniky.",
"message": "Přepojuji vás do kliniky. Chvíli strpení prosím."
}
],
"function": {
"name": "prepojeniHovoru",
"description": "Slouží pro přepojení hovoru buď na asistentku Lindu, Evu nebo do kliniky"
}
}
Trough make I'm doing variables. So when somebody calls, it triggers the assistant-request in Vapi, that get's sent to make, the route it filtered to assistant-request and all the data gets put into assistantOverrides. This has nothing to do with Make. Without the fuction assigned, the assistant works.
This is the body from make webhook response:
{
"assistantId": "b974d85a-4009-41a2-bdb2-1cc119bc28c6",
"assistantOverrides": {
"variableValues": {
"varAktualniDatumCas": "{{formatDate(now; "DD.MM.YYYY HH:mm"; "Europe/Prague")}}",
"varAktualniSchuzky": "{{38.text}}",
"varDelkyZakroku": "{{35.text}}"
}
}
}
mute-gold•11mo ago
Hey @Radim Kopp what I have shared response for and what you have shared with me are two different things.
@Radim Kopp I don't want to was each other's time can you join discord OH today I will resolve this at priority, in case cannot we will connect 1:1 do let me know.
flat-fuchsiaOP•11mo ago
Sure, maybe I should install Anydesk it would be easier to collaborate
Would be great if we resolve it today!💯
mute-gold•11mo ago
Yeah today discord OH, if works then it's best.
flat-fuchsiaOP•11mo ago
Alright, will install anydesk and show up🫡
mute-gold•10mo ago
No need of any desk I will do the same as your doing.
Tagging @Sahil to help you with this.
cc: @Radim Kopp
flat-fuchsiaOP•10mo ago
Thank you🤝
fascinating-indigo•10mo ago
Hey @Radim Kopp , how did you created the Assistant Transfer?
Is it via dashboard -> Squad section?
Or directly via API
flat-fuchsiaOP•10mo ago
Hi, transferCall function type in Docs API playground
Can't setup a transferCall type funtion in the dashboard
All should be already in this ticket
@Sahil
fascinating-indigo•10mo ago
Let's connect. Do let me know when you are free
flat-fuchsiaOP•10mo ago
Sure, maybe tell me your time availabilities, I can adapt to yours
I'm in CET zone, UTC +1 rn.
Best would be probably Friday
Or Thursday from around 13:00 - 15:00 CET
fascinating-indigo•10mo ago
Send me an invite based on IST timezone b/w like 10-11pm IST at sahil@vapi.ai
will take care of it.
flat-fuchsiaOP•10mo ago
Okey
Sent, Friday 10-11pm IST, check it please if I didn't fuck it up
My email is info@velixai.com
.
Sorry for not responding on time, please always tag me, I dont use discord
Accepted, great. Thank you!
Should I download Anydesk?
fascinating-indigo•10mo ago
Yes, please do it.
flat-fuchsiaOP•10mo ago
Sahil, I'm so fucking sorry. My car wheel got flat and I had to deal with it...
Can we setup another time please?
ratty-blush•10mo ago
@Radim Kopp did you get the answer to this one, looking to transfer to assistant id, but its not working for me at this time.
flat-fuchsiaOP•10mo ago
Nope
Didnt hear from support on this one for a while
ratty-blush•10mo ago
hmm, i guess ill keep testing... i was hoping something like this was going to work:
"tools": [
{
"type": "transferCall",
"async": false,
"function": {
"name": "transferCall",
"description": "Use this function to transfer the call. Only use it when following instructions that explicitly ask you to use the transferCall function."
},
"destinations": [
{
"type": "assistant",
"message": "I am forwarding your call to Department A. Please stay on the line.",
"assistantName": "department_a_assistant"
},
{
"type": "assistant",
"message": "I am forwarding your call to Department B. Please stay on the line.",
"assistantName": "test_account"
}
]
}
],
mute-gold•5mo ago
@Radim Kopp @~Stu~ from publicly sharing your credentials and tokens, as this could compromise your security. I have removed your message for the time being. Please exercise caution in the future.
cc: @John George
flat-fuchsiaOP•5mo ago
I didn’t even know I shared any credentials, thanks for deleting it.
absent-sapphire•5mo ago
you should also revoke your old Twilio Auth Token and use a new one in case it was compromised
ratty-blush•4mo ago
@John George @Shubham Bajaj I did? I hope not.
absent-sapphire•4mo ago
they were showing up in plaintext in api responses from Vapi so you might have inadvertently shared it... I'd cycle it just in case since Shubham highlighted you
actually it's November 2024... up to you 🤷♂️
flat-fuchsiaOP•4mo ago
It was! Somebody got into my account and I had no idea how. Everything was changed that day. Twilio blocked my account pretty quick.
Thank you very much George!
checking if this is resolved/solved for you?
flat-fuchsiaOP•4mo ago
yeah yeah yeah, it is solved for some time I just had some api keys leaked here.