Inbound agent call transfer with a list of forward...
# support
s
Is it possible to create an inbound assistant on VAPI that has a list of potential numbers that it can use for a live call transfer? On the dashboard, I only see the option to add one number and not a list of numbers. I know that this can be done for outbound calls via the POST request for creating a call but I haven't used it yet on the inbound side and configured it on VAPI's website.
v
Hi @Saien | Exousia AI, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Inbound Support Example]() * [Create Phone Call]() * [Dashboard]() * [Outbound Sales Example]() -----------------------------
c
it is.
v
### Answer Currently, Vapi supports setting a single
forwardingPhoneNumber
for an assistant, which is used for transferring calls. This configuration is suited for scenarios where calls need to be redirected to a specific number under certain conditions [(1)]() . For inbound calls, the configuration through the dashboard typically allows the specification of only one forwarding number. To handle multiple forwarding numbers dynamically based on certain conditions during a live call, you would need to implement custom logic on your server. You could use the
transferCall
function which allows the assistant to transfer the call to different numbers based on runtime conditions within the conversation. If you're looking to configure multiple potential forwarding numbers for different conditions directly through Vapi without custom server logic, this functionality isn't supported directly through the Vapi dashboard or API settings as per the current documentation. For outbound calls, as you mentioned, you can specify different numbers through the API request setup, which allows more flexibility [(2)]() . For detailed implementation or to explore workarounds that might suit your scenario, you might consider reaching out to Vapi's support or consulting the detailed API references and guides available in the documentation.
c
through the api.
s
Okay but if the inbound assistant gets configured through the dashboard on VAPI's website, how will I be able to use the API in this case?
Unless I update the configuration of an assistant while the call is currently happening so that the appropriate forwarding phone number gets updated for the assistant before the call transfer happens.
c
If you do it through the API it still appears in the dashbaord and has those settings.
s
But if it's an inbound assistant that should always be available to take calls, at what point is that API call to create/update the assistant meant to happen? That's why it seems to me like the inbound assistant is meant to be created using the VAPI dashboard on their website
I'm thinking that I could setup a PATCH request to update the forwarding phone number of the assistant as part of a function call.
So for example, if the customer says that they want to speak to the 'HBK Department', I can send that department's phone number (which is stored in the knowledge base) to a Make scenario and within that scenario, there will be a PATCH request to update the forwarding phone number of my assistant and once that update was successful, the call can then be transferred to that department. That's what seems to be the correct option.
v
Got it. Tagging @User for additional help.
s
But as far as I know, you can't update an assistant during a call.
c
Maybe I should always disclose that i do everything from ChatGPT, so its always API no matter what.
s
If you don't know how to work with tools then checkout this docs as well https://docs.vapi.ai/tools-calling
s
Thanks a lot! I’ll test it out tomorrow morning
s
Are you facing an issue?
s
Yeah, when I try to transfer the call, it sometimes dials the wrong number
I'll paste my tool code here
Maybe it has something to do with the fact that the KB is still returning the incorrect agent most of the time
s
It will be fixed by today itself. We found out the exact issue but we just running some more test to make sure everything go well
s
Okay but regarding this call transfer issue, do you see anything wrong with my tool?
Because the AI eventually selects the correct agent from the KB, (for now I’m only testing 3) but it always seems to only call the number for Hector Rivera
For example: ID: 51391303-fcc0-4748-8783-4f7969c74bf7 at 00:18 You'll notice that it says the agent is Charles Gardner then when I agree to be transferred, it says "transferring to Hector Rivera"
Is it perhaps because the values associated with each number here is the number itself and not the agent name?
id: 0a7f9eb9-3ae1-4675-acb9-200fe4f480f0 AI: The agent associated with council number 1 1 4 1 5 is Charles Gardner. You like me to transfer you to him now? User: Yeah. Transfer the call. AI: I am forwarding your call to Gerald Tatarka. Please stay on the line.
If this is the case, then perhaps I should create a function to get the agent's number (since the KB issue is still present) then transfer the call based on that number instead of the agent name
This worked for me. So is my assumption that I should reference the actual phone number and not the agent name correct?
s
Most probably, when the hallucination issue is fixed, this part will also be fixed.
s
Is the hallucination issue fixed yet?
s
Nope.
s
Do you have any expected timeline regarding when you think it will be resolved or is it too early to tell?
s
We found out the root cause but we haven’t pushed the fix cause it is quite crucial change and we don’t want to break any thing. But, it will be in prod by monday
s
Hi @Sahil - I am trying to understand what to do with this code. I have many call forwarding numbers. I created a call tool to search for the correct number for a person. How/what webhook do I use to put this information in to the live assistant? Do I use the patch assistant command?
Hi @Saien | Exousia AI This is the exact step I am stuck on. How did you get the phone number back in to the workflow for the live assistant to perform the transfercall?
Is there a limit on the number of numbers that can be submitted to the forwardingnumbers field? I have about 200 forwarding numbers in total but currently I am only working with about 70. The issue of having the number recognized as a forwardingnumber
s
What I’m currently doing is using a function to get the name of the person to transfer the call to and then the transferCall tool transfers the call to the correct person.
I basically use this code and just adapt it to my situation. Only difference is in the description, I say : instead of “Option 1:
I’m not sure if there is a limit. @Sahil can you please confirm?
s
There is no strict thing but as you increase the forwarding numbers you might see bad transfer call
So, it is recommended to have 5-10 numbers at max
s
Is it possible to add numbers to forwardingnumbers array while the call is active? This was a number could be retrieved during the call and then used if it was not loaded in the original 5-10 numbers?
Great idea, thank you!
s
Nope. It can’t be dynamically changed but you can have separate agents (through squads) responsible for forwarding the call. You just need to categorise the bot who can be responsible for forwarding number for a particular category
s
Does a transient agent load the call-tools at the beginning of a call or when utilized? Could the transfercall as a call tool be updated during the call?
s
It can’t be updated during the call
s
Is there any documentation on squads? Thank you for the help!
s
Yup. Open the docs you will find it
s
Thank you. One more question - can transient agents be part of the squad? If not, how would I assign multiple forwardingnumbers to the agent?
s
Yup.
15 Views