https://retellai.com/?utm_source=discord&utm_medium=seo logo
on the extract variable how can i create a transit...
# ❓・ai-evy-support
n
@AI Evy on the extract variable how can i create a transition condition if any of the following is missing city, state, street, zip_code ?
a
Thanks for tagging me @Nicolas. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
### Answer You can create a transition condition to check if any of those variables are missing using the "does not exist" equation condition [(1) ]() . In your transition condition equation editor, set it to ANY (not ALL) and add these equations :
Copy code
{{city}} does not exist
{{state}} does not exist
{{street}} does not exist
{{zip_code}} does not exist
This will transition when any one of these variables is missing . If you change "ANY" to "ALL", it would only transition if all four variables are missing . The
{{variable_name}} does not exist
condition returns true if the variable is undefined or has no value .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy i've applied that, but its not working
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer Let's troubleshoot this. Here are several things to check: 1. Verify the variables are actually being extracted First, confirm that your Extract DV Node is successfully extracting these variables [(1) ]() . In your conversation flow, add a test node after the Extract DV Node that speaks the variable values to verify they're being captured. For example, use a static first message like: "I captured {{city}}, {{state}}, {{street}}, {{zip_code}}" [(2) ]() . 2. Check equation condition order All equation conditions are evaluated from top to bottom, and the flow travels on the first condition that evaluates to true [(3) ]() . Make sure your "does not exist" conditions are positioned correctly in your transition list . 3. Ensure you're using equation conditions, not prompt conditions The
{{variable_name}} does not exist
syntax only works in equation conditions, not prompt conditions . When you click the "+" button to add a transition condition, make sure you're selecting the equation option, not the prompt option . 4. Review the call transcript You can find node transitions inside the call transcript in the history tab - it will show which nodes the agent transitions from and to . This will help you identify exactly when and why the transition is or isn't happening [(4) ]() . 5. Add transition finetune examples If you've observed an incorrect transition, you can add transition finetune examples to help the model understand your expectations [(3) ]() [(4) ](
retellai.com/t/misfiring-the-transition-when-conditions-are-not-satisfied/725) . If you're still having issues after checking these items, please share the call ID so we can examine the specific transcript and see what's happening with the transition.
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] {{user_number}} does not work in Conversation Flow](https://discord.com/channels/1186424376300679209/1428211380930220042) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[4] Misfiring the transition when conditions are not satisfied](https://community.retellai.com/t/misfiring-the-transition-when-conditions-are-not-satisfied/725) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy this is the return: {"street":"1111 Dauber Avenue","city":"Morgan Hill","state":"California","zip_code":""}
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer I see the issue now. Your
zip_code
variable has an empty string value (
""
) , not an undefined/null value [(1) ]() . The
{{variable_name}} does not exist
condition only returns true if the variable is undefined or has no value . An empty string (
""
) is technically a value, so the condition evaluates to false. To catch empty strings, you need to check for both missing variables AND empty values. Use these equation conditions with ANY selected:
Copy code
{{city}} does not exist
{{state}} does not exist
{{street}} does not exist
{{zip_code}} does not exist
{{city}} == ""
{{state}} == ""
{{street}} == ""
{{zip_code}} == ""
This way, the transition will trigger if any variable either doesn't exist OR is an empty string. The
==
operator performs string comparison and will catch empty string values .
​ 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.
n
@AI Evy how can i make a condition when the result is boolean ?
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer For boolean variables, you can use equation conditions to check their values [(1) ]() . If your dynamic variable contains a boolean value (true/false) , use these equation conditions:
Copy code
{{your_boolean_variable}} == true
or
Copy code
{{your_boolean_variable}} == false
The
==
operator performs string comparison, so it will work with boolean values . You can also combine multiple boolean checks using AND/OR operators:
Copy code
{{boolean_var1}} == true AND {{boolean_var2}} == false
Remember that equation conditions are evaluated from top to bottom, and the flow travels on the first condition that evaluates to true .
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) ​