https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> Can I use dynamic variables...
# ❓・ai-evy-support
a
@AI Evy Can I use dynamic variables to conditionally trigger different transitions within a Conversation Flow?
a
Thanks for tagging me @asfdvszfdv. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can use dynamic variables to conditionally trigger different transitions within a Conversation Flow [(1) ]() . There are two types of transition conditions that support this functionality : Equation Conditions - These are specifically designed for dynamic variables and are evaluated first . You can only use variables that are passed in as dynamic variables for equation conditions . Examples include:
Copy code
{{user_age}} > 18
{{current_time}} > 9 AND {{current_time}} < 18
{{user_location}} == "New York"
{{user_location}} != "New York"
"New York, Los Angeles" CONTAINS {{user_location}}
"New York, Los Angeles" NOT CONTAINS {{user_location}}
{{user_age}} < 18 OR {{user_location}} == "New York"
Prompt Conditions - These are evaluated by the LLM after equation conditions . While primarily for natural language conditions, they can also reference dynamic variables in conversational context . Logic Split Node is particularly useful for branching conversation flow based on dynamic variable conditions [(2) ]() . When entering this node, the agent immediately evaluates the conditions and branches to corresponding destination nodes without speaking . This node is especially helpful when you want to branch based on dynamic variables . Dynamic variables can be used in various parts of agents including prompts, begin messages, tool call descriptions, and transition conditions [(3) ]() . For equation conditions, it's recommended to cover all branching paths determined solely by dynamic variables [(1) ]() .
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.