Dynamically Transfer Call
# support
r
Hi Team, My team has created several voice agents and we started implementing the Forwarding/Transfer tool. The problem that we have is that the "default" transfer call tool "transferCall" only accepts a predefined phone number. We want to give our agent the ability to decide to which phone number transfer the call. Is there a best practice to implement this?
v
message has been deleted
@Rulo Hello! To provide your voice agents with the flexibility to decide which phone number to transfer calls to, you can implement a dynamic decision-making process within your agent's logic. Here's a best practice approach: 1. **Decision Logic**: Incorporate a decision-making algorithm within your agent that determines the appropriate phone number based on the context of the call. This could be based on factors such as the caller's query, the time of day, or the availability of team members. 2. **Dynamic Destination**: Once the decision is made, use the
transferCall
tool with the
PhoneNumberTransferDestination
option to dynamically set the destination phone number. 3. **Fallback Option**: Always have a fallback destination in case the dynamic decision-making process fails or does not yield a result. 4. **Logging and Monitoring**: Keep logs of transfer decisions and outcomes to continuously improve the decision-making algorithm. 5. **User Confirmation**: Optionally, you can confirm with the caller before transferring the call to ensure they are comfortable with the transfer. 6. **Error Handling**: Implement robust error handling to manage scenarios where the transfer cannot be completed. If you need to execute the transfer with a dynamically chosen phone number, you would typically gather the phone number from your decision logic and then call the
transferCall
function with the chosen
PhoneNumberTransferDestination
. Would you like to proceed with a transfer now, and if so, do you have a specific phone number to which the call should be transferred?
You can continue this conversation by mentioning me in the message.
s
Hey @Rulo go through this document https://docs.vapi.ai/call-forwarding for call forwarding it teaches on how to setup multiple destinations for call forwarding and also helps you with instructing the assistant to decide which destination(phone number) transfer the call.
Do let me know how it goes.
Because of no response closing this ticket.
27 Views