https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can I have conversation flow flex mode transit...
# ❓・ai-evy-support
l
@AI Evy how can I have conversation flow flex mode transition to a node at a certain {{session_duration}}?
a
Thanks for tagging me @Legend. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[2] Flex Mode, Advanced Warm Transfer, 60+ languages, and more.](https://www.retellai.com/changelog/flex-mode-advanced-warm-transfer-60-languages-and-more) ​
### Answer Unfortunately, using equation-based conditions (like checking
{{session_duration}}
) for transitions in Flex Mode is not recommended. The documentation explicitly states: > "Only use Prompt edge, avoid using Equation edge as LLM is really bad at interpret equation conditions. You might see very weird behaviors." [(1) ]() In Flex Mode, all nodes get compiled into a single structured prompt, and the agent navigates tasks dynamically based on natural language conditions rather than programmatic equation checks. Recommended approach: Instead of relying on
{{session_duration}}
with an equation edge, you should: 1. Use a Prompt edge with explicit, observable conditions written in natural language 2. Write crisp, clear transition instructions in your node prompts that describe when to move to the next task If you need strict, time-based sequencing, consider keeping that portion of your flow in rigid mode (standard conversation flow) rather than Flex Mode, since Flex Mode is designed for flexible navigation where customers may jump between topics. [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Legend. I'll get back to you soon.
l
@AI Evy can you help me structure it then? I need when the session duration is greater than or equal to 4 minutes for a node to be jumped to. Everything else can be flex mode
a
### Answer Based on the available documentation, I can outline a hybrid approach, but I don't have explicit step-by-step instructions for combining Flex Mode with a time-based equation transition in a single flow. Recommended Structure: 1. Use a Component for Flex Mode – Enable Flex Mode at the component level rather than the agent level. When enabled on a component, only that component's nodes are converted into a single prompt; the rest stays as standard conversation flow. [(1) ]() 2. Keep the time-based transition outside Flex Mode – Place your
{{session_duration}} >= 240
(4 minutes in seconds) equation edge in the standard conversation flow portion, not inside the Flex Mode component. This way the equation logic runs in rigid mode where it functions reliably. Conceptual Flow: - Standard Flow Entry Node → connects to your Flex Mode Component (handles flexible conversation) - Flex Mode Component → has an outgoing edge back to standard flow - Standard Flow Node with an Equation Edge checking
{{session_duration}} >= 240
→ transitions to your target node when the condition is met Important Caveats: - Equation edges should be avoided inside Flex Mode since "LLM is really bad at interpret equation conditions" and you may see unexpected behaviors. - Be explicit on transitions: write crisp, observable conditions. - If you use Flex Mode for more than 20 nodes, performance might degrade and hallucination risk increases—splitting into smaller components is recommended. I don't have a documented example of this exact hybrid setup in the sources. You may want to reach out for more tailored guidance: - [Contact Sales]() - [Retell AI GitHub]() Would you like me to provide a general answer on how con
versation flow components typically work?
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy Is this the right way to use the global component prompt.
Copy code
{{session_duration}} is greater or equal to 30 seconds and caller has not been informed that the call will cut soon due to duration
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer That approach is problematic if you're using Flex Mode. The documentation explicitly warns against using equation-style conditions: > "Only use Prompt edge, avoid using Equation edge as LLM is really bad at interpret equation conditions. You might see very weird behaviors." [(1) ]() The issue with your prompt: Your condition
{{session_duration}} is greater or equal to 30 seconds
is essentially an equation-based condition written in natural language. In Flex Mode, the LLM interprets all node instructions dynamically, and it struggles to reliably evaluate numeric comparisons like this. Recommended approach: If you need time-based transitions, keep that logic outside of Flex Mode in the standard conversation flow portion, where you can use a proper Equation Edge that evaluates
{{session_duration}} >= 30
programmatically. For the Flex Mode component itself, write node instructions in a concise manner focused on conversational tasks, and use Prompt edges with crisp, observable conditions based on what the caller says or *does*—not on numeric variable evaluations. If you absolutely need this behavior within Flex Mode, consider having a separate standard flow node with an Equation Edge that checks the session duration and then transitions to your target node outside the Flex Mode context.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy I have a node outside of a component. That node is a global node. The stuff inside the component is flex but the ones outside are rigid. I'm asking if this is the right way to do a global prompt in the ones that are rigid:
Copy code
{{session_duration}} is greater or equal to 30 seconds and caller has not been informed that the call will cut soon due to duration
Because it's not working for me.
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer For a Global Node in rigid mode, you need to set a condition for when the global node should be transitioned to. [(1) ]() The issue is that your condition mixes an equation-style check (
{{session_duration}} is greater or equal to 30 seconds
) with a conversational state check (
caller has not been informed...
) . Global node conditions work best when they describe observable conversational triggers. What to try: 1. Use a proper Equation Edge for the numeric comparison rather than writing it as natural language in the transition condition. The condition field for global nodes expects a prompt-style description of when the transition should happen based on conversation context. 2. Separate the logic: - Create an Equation Edge that checks
{{session_duration}} >= 30
- Use the global node's condition to describe the conversational trigger (e.g., "When the agent needs to inform the caller about call duration limits") 3. Add transition finetune examples to help the model understand when to trigger the global node. You can add example conversations showing when the agent should and should not jump to the global node. [(2) ]() Debugging steps: - Review your transition conditions to ensure they precisely match your intended triggers [(3) ]() - Consider adding finetune examples to help the model understand your expectations - Check if the condition is too complex—try breaking it down into simpler conditions I don't have explicit documentation showing the exact syntax for combining equation checks with global node conditions in rigid mode. You may want to test using a pure Equation Edge for the time check separately.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy okay so what should I put for the global node prompt? Because I don't know if the agent knows that it should let someone know that it's nearing the time where the call will cut.
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer --- For a global node, you set a condition that describes when the node should be transitioned to from anywhere in the call. [(1) ]() The challenge with your use case is that the agent doesn't inherently "know" about session duration limits unless you explicitly tell it. The global node condition should describe an observable conversational trigger, not an equation check. Recommended approach: Since global node conditions are evaluated based on conversation context (not programmatic variable checks) , you have two options: 1. Don't use a global node for this — Instead, use a standard node with an Equation Edge that checks
{{session_duration}} >= 240
(or whatever threshold) . This equation edge can then transition to a conversation node that informs the caller. Equation edges are evaluated programmatically, not by the LLM. 2. If you must use a global node, write the condition to match something the caller says or does, not a time-based trigger. For example: -
When the caller asks how much time is left on the call
But this won't help you proactively warn them. The core issue: Global node conditions check the conversation context to determine when to transition. They don't evaluate
{{session_duration}}
as a numeric comparison—that requires an Equation Edge outside the global node mechanism. For time-based proactive behavior, use an Equation Edge on a standard node, not a global node condition.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy okay so in my case where I have a rigid conversation flow agent with flex components. Where would I put the equation?
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer In a rigid conversation flow with Flex Mode components, you would place the equation condition on a Conversation Node that sits outside your Flex Mode component. [(1) ]() Where to define it: For Conversation Nodes, you can define conditions to transition out of the node. How to structure it: 1. Create a standard Conversation Node in your rigid flow (outside the Flex component) 2. Click on that node and click the "+" button to add a transition condition 3. Choose to add an Equation transition condition 4. In the equation editor, add your condition:
Copy code
{{session_duration}} >= 240
5. Connect this equation edge to your target node (the one that warns the caller about call duration) Example equation syntax from the documentation:
Copy code
- {{current_time}} > 9 AND {{current_time}} < 18
Note that comparison operators like
>=
,
>
,
<
require numerical input and will evaluate to false if the input is not a number. Important: You can only use variables that are passed in as dynamic variables for equation conditions. Since
{{session_duration}}
is a built-in dynamic variable, this should work in rigid mode.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
l
@AI Evy So I have it set right now that the component should transition when the session duration is >= 30 (as a test) I don't have anything connected to exit component though, does that matter? Because right now that setup isn't working
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer Yes, that matters. The equation edge needs to be connected to a destination node for the transition to actually occur. In conversation flow, edges are connections between nodes that define transition logic. [(1) ]() When you set up an equation condition like
{{session_duration}} >= 30
, you're defining when to transition—but you also need to define where to transition to by connecting that edge to another node. What to do: 1. Connect the equation edge from your component to the target node you want to transition to (the node that warns the caller about call duration) 2. Make sure the target node exists outside your Flex component in the rigid portion of your flow Without a connected destination, the condition may evaluate as true but the agent has nowhere to go, so no transition happens.
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy No, I mean. I have the component in rigid connected to another node. But inside the component itself I'm not using the "exit component" node. This is my current setup and it's not working
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer Yes, not linking the Exit Component node properly is likely the issue. The documentation explicitly states: > "What if I did not link the Exit node properly in a component? It will stay stuck inside the component and cannot transition out." [(1) ]() What you need to do: 1. Inside your component, make sure you have an "Exit Component" end node 2. Link your component's internal nodes to that Exit Component node so the flow can properly exit 3. The Exit Component node hands control back to the main flow, where your equation edge on the component node can then transition to the next step Without a properly linked Exit node inside the component, the conversation will stay stuck inside the component and cannot transition out—even if your equation condition evaluates to true on the outside.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) ​
Thanks for the follow-up, @Legend. I'll get back to you soon.
l
@AI Evy but then what's should I put for the transition to exit the component node?
a
### Answer Inside your Flex Mode component, you should use Prompt edges (not Equation edges) to transition to the Exit Component node. [(1) ]() Since your component uses Flex Mode, the transition conditions should describe observable conversational triggers in natural language. For example: -
When the current task is complete
-
When the caller has finished their request
-
When the agent has addressed the caller's question
The key is to write crisp, clear conditions that describe when the conversation within the component has reached a natural stopping point. [(2) ]() Your setup should be: 1. Inside the component: Connect your internal nodes to the Exit Component node using Prompt edges with conversational conditions 2. Outside the component (rigid flow) : Place your equation edge
{{session_duration}} >= 30
on the Component node itself, which then transitions to your target warning node The equation condition on the outside of the component (in rigid mode) will evaluate programmatically. But the transitions inside the Flex component need to use Prompt edges since the LLM struggles with equation conditions in Flex Mode.
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy the thing is, it's hard to know what that observable conversational trigger is. As I want it to just go mid conversation to let someone know that the time for the demo is almost up. There really isn't a trigger for that and the only way I'd know is by session_duration.
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer You're right—there's no conversational trigger for a time-based interruption. The documentation confirms that Exit nodes inside a Component hand control back to the main flow. [(1) ]() The solution: Don't rely on the Exit Component node for your time-based transition. Instead: 1. Keep the equation edge on the Component node itself (in your rigid flow outside the component) with
{{session_duration}} >= 30
2. Connect that equation edge directly to your warning node The equation edge on the Component node in rigid mode should evaluate programmatically and interrupt/transition out of the component when the condition is met—regardless of what's happening inside the Flex component. For the Exit Component node inside your Flex component: Use a generic conversational condition like: -
When the conversation has naturally concluded
-
When the caller indicates they are done
This handles normal exits. Your time-based equation edge on the outside of the component should handle the forced mid-conversation transition. If this still isn't working, the issue may be that equation edges on Component nodes don't interrupt active Flex conversations mid-flow. I don't have explicit documentation confirming whether equation edges can forcibly interrupt a Flex component mid-conversation. You may need to reach out for clarification: - [Contact Sales]() - [Retell AI GitHub]()
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy Okay even simplifying and not using a flex mode at all and removing components so only rigid. Having a node where the only transition is to happen when session_duration is >= 30 It still doesn't happen.
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer --- Based on the documentation, there's a critical detail about equation conditions: you can only use variables that are passed in as dynamic variables for equation conditions. [(1) ]() The documentation states: > "Note: You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM (such as information learned during the call) , you can use prompt conditions." The issue:
{{session_duration}}
may not be available as a dynamic variable that equation conditions can evaluate unless it's explicitly passed in or configured as a default dynamic variable. Things to check: 1. Verify
session_duration
is defined
— Check if
session_duration
is set up in your
default_dynamic_variables
configuration or passed in when the call starts. [(2) ]() 2. Transition timing — For Conversation Nodes, transitions happen "when user is done speaking" or "when Skip Response is enabled and agent finishes speaking." [(3) ]() The equation won't evaluate continuously—it evaluates at transition points. 3. Numerical input requirement — The comparison operators require numerical input and "will always evaluate to false if the input is not a number." [(1) ]() I don't have explicit documentation confirming that
session_duration
is automatically available as a dynamic variable for equation conditions. You may need to verify this with support: - [Contact Sales]() - [Retell AI GitHub]()
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) [[3] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy is transition priority a thing?
a
Thanks for the follow-up, @Legend. I'll get back to you soon.
### Answer Yes, transition priority exists. The documentation states: [(1) ]() All equation conditions are evaluated first, and then the prompt conditions are evaluated. Additionally, equation conditions are evaluated from top to bottom, and the flow travels on the first condition that evaluates to true. How to change order: You can change the order of equations by clicking on the 6 dots on the left of the equation and dragging it up or down. You can also change "ANY" to "ALL" to force all equations to be true instead of just one. Summary of priority: 1. Equation conditions evaluate first (top to bottom) 2. Prompt conditions evaluate after all equation conditions 3. First condition that evaluates to true triggers the transition
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.