https://retellai.com/?utm_source=discord&utm_medium=seo logo
in a conversation flow agent, if a variable is pre...
# ❓・ai-evy-support
a
@AI Evy in a conversation flow agent, if a variable is previously extracted by the extract variable tool, let's say the variable name is {{status}} then can I refer to this variable later on, in for example a logic split node? Like this: "if {{status}} is 4 or 5"?
a
Thanks for tagging me @aincrow. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, you can reference dynamic variables extracted by the Extract Dynamic Variable Node in a Logic Split Node using the
{{variable_name}}
syntax [(1) ]() . The Extract Dynamic Variable Node is designed to extract information from conversation and store them as dynamic variables . Once extracted, these variables can be used throughout your conversation flow . In the Logic Split Node, you configure branching logic by adding conditions [(2) ]() . You can set up conditions that reference your extracted variables, such as checking if
{{status}}
equals 4 or 5 . The Logic Split Node evaluates conditions immediately when the agent enters this node and branches to the corresponding destination nodes . It's particularly useful when you want to branch based on dynamic variables .
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy okay, great. Another question: In an extract variable tool, when describing the transition, will it work if I write something like this? "if the extracted value is 4 or 5"? Will it be able to check that like this? In essence, I use it as a condition for going to a certain direction
a
Thanks for the follow-up, @aincrow. I'll get back to you soon.
### Answer --- Based on the documentation, the Extract Dynamic Variable Node is designed to extract information and store it as dynamic variables, but it's not intended for having a conversation with the user [(1) ]() . According to the sources, when you add transitions inside an Extract Dynamic Variable Node, you may encounter errors [(2) ]() [(3) ]() . The documentation indicates that the Extract Dynamic Variable Node can have transitions configured with conditions [(1) ]() , but there have been reported issues where adding transitions causes errors like "Failed to get LLM response" [(3) ]() . For checking conditions based on extracted values like "if the extracted value is 4 or 5", the recommended approach is to use a Logic Split Node instead [(4) ]() . The Logic Split Node is specifically designed to branch the conversation flow based on conditions . When the agent enters this node, it immediately evaluates the conditions and branches to the corresponding destination nodes . It's particularly useful when you want to branch based on dynamic variables . So the better pattern would be: 1. Use the Extract Dynamic Variable Node to extract the
{{status}}
variable [(1) ]() 2. Transition to a Logic Split Node 3. In the Logic Split Node, configure your condition like "if {{status}} is 4 or 5" [(4) ]() This separation keeps the extr
action logic clean and uses the Logic Split Node for its intended purpose of conditional branching .
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] extract variable node transition](https://discord.com/channels/1186424376300679209/1393706083108786357) [[3] extract variable](https://discord.com/channels/1186424376300679209/1414908562999742515) [[4] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.