https://retellai.com/?utm_source=discord&utm_medium=seo logo
Re: Transfer calls - Is there another way to setup...
# ❓・ai-evy-support
l
@AI Evy Re: Transfer calls - Is there another way to setup transfers to phone numbers other than with a prompt. Our use case is to transfer to specific Sales people based on product. We have about 25 sales agents servicing 80 different Products. So for each Product we need to specify who will the call be transferred to. I find this highly unreliable with a single prompt in the tranfer note.
a
Thanks for tagging me @limit6323t. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can use dynamic variables to set the transfer number at runtime, which would allow you to programmatically determine the transfer destination based on product/sales agent mapping. [(1) ]() [(2) ]() Here's how to approach this: Option 1: Dynamic Variable for Transfer Number When setting up the Transfer Call Tool or Call Transfer Node, you can set the transfer number to a dynamic variable that gets substituted at runtime. This means you could: 1. Pass in the appropriate sales agent's phone number as a dynamic variable when the call starts (via the API using
retell_llm_dynamic_variables
) 2. Reference that variable (e.g.,
{{sales_agent_number}}
) in the transfer destination field Option 2: Use a Custom Function You could create a custom function that: 1. Takes the product as input 2. Looks up the correct sales agent number from your database/mapping 3. Returns the number to transfer to Then configure the Transfer Call Tool to use the result of that function. Option 3: Conversation Flow with Conditional Logic If you're using Conversation Flow, you can build branching logic with multiple Call Transfer Nodes, each configured for different destinations based on extracted variables or conditions. [(2) ]() The key is that the transfer number field accepts dynamic variables, so you're not limited to hardcoding numbers or relying solely on prompt instructions. [(1) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] Transfer call](https://docs.retellai.com/build/single-multi-prompt/transfer-call) [[2] Call Transfer Node](https://docs.retellai.com/build/conversation-flow/call-transfer-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.