https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm actually trying to use variables so
# 💬・general
r
I'm actually trying to use variables so that I can determine which node to go to
o
you want the variable to have a new value with each node it goes to , is that what you mean ?
r
I have two different nodes in my flow. • Each node has three possible transitions: Yes, No, and Unknown. • If the user does not answer Yes or No, the flow goes through the Unknown transition. • Both nodes’ Unknown transitions point to the same “standard” node that displays a default message. The problem: Since both nodes share this common “Unknown” node, you need a way to tell which node the user came from so that, after showing the standard message, the flow can go back to the correct original node.
o
You can add Extract Variables node after transition so instead to goes to the standard node it goes the "Extract Variables node" and in this node you can set a variable called state for example , and prompt it to set the value based on the context of the conversation
then you can know from the state which node it came from , for example for node one was talking about buying a house you can set the state to "BUY", but the the second node is for renting a house , you can set to "RENT" , now you can know whice one it came from
if you have only two node you can put Extract Variables node after each one and give it a static value instead of a dynamic one based on the conversation.
r
thanks for this, any examples to show this?
r
GREAT thanks. Can you use that to direct the model to goto a node? IE, if state = blue, direct it to the blue node else to some other node?
o
Yes, you can use the Logic split node , but if your workflow is to big and you have to many state that need to goto to many node ,it will work but it can be messy, but if you have 2-5 node to direct to it should be fine.
r
thanks, I will look into that
would you recommend NOT use a this type of voice bot?
o
Conversation flow is great , but every type have it uses cases and you choose based on what you want to achieve.
r
Thanks for your help and guidance
sorry back to this. HOW does the variable get set? via the title?
Are these global? Like can I set it again later to something else?
I'll try to give you some more context, but here's an image in the middle of any user flow, if the user ask for more information, then we go to the bottom left global node. Once they're done, I want to return to the correct spot. To do this I'm trying to save the variable and then using the logic split note go back and this just doesn't seem to work. I don't know if I'm using the logic split node correctly, this is inconsistent and doesn't seem to work well https://cdn.discordapp.com/attachments/1407866218991325205/1409270178709115012/CleanShot_2025-08-24_at_16.14.25.png?ex=68acc4a1&is=68ab7321&hm=873e1f5a3a2b4995f844c5cbfc800f634c83272f750ede5cea2f78584a171daa&