https://retellai.com/?utm_source=discord&utm_medium=seo logo
can i make retell attempt to transfer and if no on...
# ❓・ai-evy-support
s
@AI Evy can i make retell attempt to transfer and if no one answers the cold/warm transfer, then it goes to appointment time?
a
Thanks for tagging me @Sam W. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can handle transfer failures and fall back to appointment booking. The approach depends on whether you're using Conversation Flow or Single/Multi Prompt. Using Conversation Flow (Recommended for this use case) : The Call Transfer Node has a built-in transition for when a transfer fails. [(1) ]() - Transition happens when transfer fails—there's already a pre-populated edge for this. - You can connect that edge to another node (e.g., an appointment booking node) to handle transfer failure. For warm transfers specifically, you can configure the **Agent detection timeout**—the maximum time the AI agent will wait to determine whether the transfer target is a human. If human detection doesn't succeed within this timeframe, the transfer is marked as failed. Using Single/Multi Prompt: You can add both a
transfer_call
tool and a
book_appointment_cal
tool to your agent. [(2) ]() - Configure the warm transfer with an Agent detection timeout setting. [(3) ]() - If the transfer fails (no one answers within the timeout) , the agent can then proceed to use the appointment booking tool based on your prompt instructions. In your prompt, you'd instruct the agent something like: "If the transfer fails, proceed to book an appointment with the user."
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Sam W. I'll get back to you soon.
s
Can I check to see if a dynamic variable already has been filled for example to see if we already loaded {{name}} or not and if not to ask for their name @AI Evy
a
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) ​
### Answer Yes, you can check if a dynamic variable is set. In Conversation Flow (Equations) : Use the
exists
check in your condition:
Copy code
Equation: {{user_name}} exists
Result: True if variable is set
[(1) ]() In Prompts: Add conditional logic directly in your prompt:
Copy code
If {{user_name}} appears with curly braces, use a generic greeting.
Otherwise, greet the customer by name.
Default Behavior to Know: When a dynamic variable has no assigned value, it remains in its raw form with curly braces intact. So if
{{name}}
is not set, it will literally appear as
{{name}}
in the text. Best Practices: - Set defaults at agent level as fallback values - Design prompts that work with or without variables - Test with both set and unset variables So for your use case, you could use an equation condition like
{{name}} exists
in Conversation Flow to branch—if false, route to a node that asks for their name using the Extract Dynamic Variable Node to capture it. [(2) ]() , [(1) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy Your goal will be to answer any general questions or concerns they have, as well as get their name, {{name}} and email {{email}} if you do not have these already. update my prompt
a
Thanks for the follow-up, @Sam W. I'll get back to you soon.
### Answer Here's an updated version of your prompt that checks for existing variables:
Copy code
Your goal is to answer any general questions or concerns the caller has.

If {{name}} appears with curly braces, ask for their name and extract it.
Otherwise, you already have their name.

If {{email}} appears with curly braces, ask for their email and extract it.
Otherwise, you already have their email.

When the user provides their name and email, please extract the information by calling the extract function.
[(1) ]() , [(2) ]() This approach works because when a dynamic variable has no assigned value, it remains in its raw form with curly braces intact (e.g.,
{{name}}
literally appears as
{{name}}
) . [(1) ]() Make sure you also have the Extract Dynamic Variable tool configured with: - Variable Name:
name
(type: Text) - Variable Name:
email
(type: Text) [(2) ]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.