https://retellai.com/?utm_source=discord&utm_medium=seo logo
I want to transfer to a certain number based on th...
# ❓・ai-evy-support
a
Thanks for tagging me @SixBeeps. I'll look through relevant sources and get back to you shortly.
### Answer You can use a dynamic variable for the transfer destination number, which gets substituted at runtime. [(1) ]() [(2) ]() Recommended Approach: Intent-Based Routing with Dynamic Lookup The best way to handle this reliably is to use a webhook or custom function that looks up the correct transfer number based on the
{{last_name}}
variable. [(3) ]() Here's how to set it up: 1. Create a Custom Function that receives the
{{last_name}}
value as an argument 2. Use a lookup table (database, Google Sheet, or CRM) that maps last names to phone numbers 3. Return the phone number from your webhook, then use that value as a dynamic variable for the transfer destination Setting Up the Transfer: In the Transfer Call tool configuration, set the transfer number to be a dynamic variable that gets substituted at runtime. [(1) ]() [(2) ]() For example, if your custom function stores the result in
{{transfer_number}}
, you would use
{{transfer_number}}
as the transfer destination. This approach works well because: - Each call is independent, so multiple callers can be transferred simultaneously to different agents/numbers [(3) ]() - You can configure multiple transfer numbers and route calls based on user intent - The agent detects the caller's request and transfers to the correct number without hardcoding all numbers in the prompt
​ 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) [[3] Discord message from @immaculate_cheetah_77268 on 2026-02-13](https://discord.com/channels/1186424376300679209/1186462578310910112/1471809917793996893) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.