mehxbot
11/13/2025, 8:06 AMAI Evy
11/13/2025, 8:06 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMmehxbot
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:07 AMAI Evy
11/13/2025, 8:08 AMmehxbot
11/13/2025, 8:08 AMAI Evy
11/13/2025, 8:08 AMjson
[
{
"name": "information_collection",
"state_prompt": "You will follow the steps below to collect information...",
"edges": [
{
"destination_state_name": "appointment_booking",
"description": "Transition to book an appointment."
}
],
"tools": [
{
"type": "transfer_call",
"name": "transfer_to_support",
"description": "Transfer to the support team.",
"transfer_destination": {
"type": "predefined",
"number": "16175551212",
"ignore_e164_validation": false
},
"transfer_option": {
"type": "cold_transfer",
"show_transferee_as_caller": false
}
}
]
},
{
"name": "appointment_booking",
"state_prompt": "You will follow the steps below to book an appointment...",
"tools": [
{
"type": "book_appointment_cal",
"name": "book_appointment",
"description": "Book an annual check up.",
"cal_api_key": "cal_live_xxxxxxxxxxxx",
"event_type_id": 60444,
"timezone": "America/Los_Angeles"
}
]
}
]AI Evy
11/13/2025, 8:08 AMAI Evy
11/13/2025, 8:08 AMAI Evy
11/13/2025, 8:08 AMmehxbot
11/13/2025, 8:11 AMAI Evy
11/13/2025, 8:11 AMAI Evy
11/13/2025, 8:11 AMAI Evy
11/13/2025, 8:11 AMAI Evy
11/13/2025, 8:11 AMmehxbot
11/17/2025, 12:29 PMAI Evy
11/17/2025, 12:29 PMAI Evy
11/17/2025, 12:29 PMAI Evy
11/17/2025, 12:29 PMAI Evy
11/17/2025, 12:29 PMretell_llm_dynamic_variables may not yet be "hydrated" (fully loaded into memory for the flow engine) . If a Split node tries to read a variable too early, it sees null/empty and takes the wrong path .
Solution: Add a Hydration Guard
Implement a condition to check if the variable exists or is not empty before evaluating it . You can allow 1-2 retries using a counter so it loops back until the variable loads .
Variable Must Be Mentioned in Conversation First
Logic Split Nodes currently require dynamic variables to be mentioned in the conversation before they can be evaluated [(2) ]() [(4) ]() . The agent must actually speak the variable out loud for the Logic Split Node to recognize it .
Workaround: Add a Conversation Node Before Logic Split
Add a Conversation Node before the Logic Split Node that mentions the dynamic variable value . You can use the "Skip Response" setting in the preceding Conversation Node, but note that the agent will still need to state the variable for it to be recognized [(2) ](AI Evy
11/17/2025, 12:30 PMmehxbot
11/18/2025, 9:45 AMAI Evy
11/18/2025, 9:45 AMAI Evy
11/18/2025, 9:45 AMprevious_node)
2. In your Global Node, after handling the interaction, transition to a Logic Split Node
3. Configure the Logic Split Node with conditions that check the previous_node variable and route to the appropriate destination node based on its value
Important Limitations:
- You cannot directly transfer back from a Global Node to the exact previous node automatically [(1) ]()
- Once you transition to a Global Node, you need to manually handle the return logic [(1) ]() [(2) ]()
- This is currently an architectural limitation of Retell AI [(1) ]()
This approach allows you to resume the original flow, but requires explicit configuration of all possible return paths in your Logic Split Node conditions.
---
**AI Evy
11/18/2025, 9:46 AMAI Evy
11/18/2025, 9:46 AMmehxbot
11/18/2025, 9:46 AMmehxbot
11/18/2025, 9:47 AMAI Evy
11/18/2025, 9:47 AMAI Evy
11/18/2025, 9:47 AM{{previous_agent_state}} to reference the last node the agent was in .
Using Built-in System Variables:
The system automatically maintains these dynamic variables :
- {{current_agent_state}} - the node the agent is currently in
- {{previous_agent_state}} - the node the agent was previously in
Implementation Example:
To route back from a Global Node based on where you came from, you can use a Logic Split Node with conditions like :
{{previous_agent_state}} == "Qualification" AND User wants to revisit last question
Important Limitation:
When using a Global Node with "skip response" enabled, be aware that when you transition to a Logic Split Node afterward, the value of {{previous_agent_state}} will show as "ask_agent" (the Global Node name) , not the original node you want to return to . This means you may lose track of the actual previous node in this scenario .
Workaround:
If you need to preserve the original node before entering a Global Node, you would need to explicitly set a custom dynamic variable before transitioning to the Global Node, though the sources don't provide a specific example of how to programmatically set this value during runtime.
---AI Evy
11/18/2025, 9:47 AMAI Evy
11/18/2025, 9:47 AMmehxbot
11/18/2025, 9:48 AMAI Evy
11/18/2025, 9:48 AMAI Evy
11/18/2025, 9:48 AM{{previous_agent_state}} variable should track the node you were in before entering the Global Node [(1) ]() .
The limitation mentioned in the previous response specifically applies when "skip response" is enabled on the Global Node . Since you haven't enabled "skip response," the {{previous_agent_state}} should correctly reflect the node you came from before entering the Global Node .
You can use this variable directly in a Logic Split Node after your Global Node to route back to the appropriate destination based on where the Global Node was reached from . For example, you could set up conditions in your Logic Split Node that check the value of {{previous_agent_state}} and route accordingly .AI Evy
11/18/2025, 9:48 AMAI Evy
11/18/2025, 9:48 AMmehxbot
11/18/2025, 9:58 AMAI Evy
11/18/2025, 9:58 AMAI Evy
11/18/2025, 9:58 AM{{previous_agent_state}} == "Node_Name" is the correct syntax for checking the previous node [(1) ]() . However, there's a critical limitation: Logic Split Nodes currently require dynamic variables to be mentioned in the conversation before they can be evaluated [(2) ]() . This means the agent must actually speak or reference the variable value for the Logic Split Node to recognize it properly . Troubleshooting Steps: 1. Verify the exact node name - Make sure the node name in your condition exactly matches the actual node name (case-sensitive, including spaces/underscores) 2. Add a Conversation Node before the Logic Split Node - Have the agent mention or reference the {{previous_agent_state}} value before evaluating it in the Logic Split 3. Check if the variable is being populated - Review your call history to confirm the {{previous_agent_state}} variable actually contains the expected value 4. Set up the else destination - Always configure an else condition as the default destination if none of the conditions are met, since Logic Split Nodes are designed to be split points and you don't want the conversation to get stuck [(3) ]() Note: Equation-based transitions for Logic Split Nodes (which would allow more reliable evaluation of dynamic variables) are currently under development [(2) ](AI Evy
11/18/2025, 9:58 AMAI Evy
11/18/2025, 9:58 AMAI Evy
11/18/2025, 9:58 AMmehxbot
11/24/2025, 9:46 AMAI Evy
11/24/2025, 9:46 AMAI Evy
11/24/2025, 9:46 AMAI Evy
11/24/2025, 9:46 AMAI Evy
11/24/2025, 9:46 AM