maha387
11/25/2025, 12:32 AMAI Evy
11/25/2025, 12:33 AMAI Evy
11/25/2025, 12:33 AMAI Evy
11/25/2025, 12:33 AMlast_node in your first prompt node to store the last node name/id [(2) ]()
2. Make this variable evolve among all prompt nodes
3. After any global node, link a branch node with prompt conditions checking the last_node value to redirect to the expected node
4. Note that prompt-defined variables must not use {{}}
You can also use built-in dynamic system variables like {{current_agent_state}} and {{previous_agent_state}} to track nodes [(3) ]() . For example, you could use a Logic Split node with a transition condition like:
{{previous_agent_state}} == "Qualification" AND User wants to revisit last question
**Important limitation**: When using a global node with skip response linked to a Logic Split node, the value of {{previous_agent_state}} becomes "ask_agent", which means you lose the reference to the node you want to return to .
If you'd like this capability added as a native feature, you can request it in the feature requests channel [(1) ]() .AI Evy
11/25/2025, 12:33 AMmaha387
11/25/2025, 12:35 AMAI Evy
11/25/2025, 12:35 AMmaha387
11/25/2025, 12:35 AMAI Evy
11/25/2025, 12:35 AMAI Evy
11/25/2025, 12:35 AMAI Evy
11/25/2025, 12:35 AM{{variable_name}} syntax and can be used in :
- Prompts
- Begin messages
- Tool configurations
- Call handling settings
- Webhook URLs
When setting dynamic variable values (not referencing them) , you provide them as key-value pairs without the curly braces. For example, when creating a phone call [(2) ]() :
json
{
"retell_llm_dynamic_variables": {
"user_name": "John Smith",
"product_name": "Premium Plan",
"account_status": "active"
}
}
When referencing variables in prompts, you use the {{}} syntax [(1) ]() :
"Hello {{user_name}}, I understand you're interested in {{product_name}}. How can I help you today?"
The statement you're asking about may have been referring to how you define or set variable values (without {{}}) , as opposed to how you reference them in prompts (with {{}}) .