https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i setup conditions and what {{variables}} d...
# ❓・ai-evy-support
d
@AI Evy how do i setup conditions and what {{variables}} do I use for tone
a
Thanks for tagging me @dannykimes. I'll look through relevant sources and get back to you shortly.
### Answer ## Setting Up Transition Conditions You can set up transition conditions by clicking on a node and then clicking the "+" button to add a transition condition [(1) ]() . There are two types of transition conditions : 1. **Prompt conditions**: Evaluated by the LLM (e.g., "User said something about booking a meeting") 2. **Equation conditions**: Mathematical equations using dynamic variables For equation conditions, you can use operators like :
Copy code
- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
- {{user_location}} == "New York"
- {{user_location}} != "New York"
- "New York, Los Angeles" CONTAINS {{user_location}}
- "New York, Los Angeles" NOT CONTAINS {{user_location}}
- {{user_age}} < 18 OR {{user_location}} == "New York"
## Available Dynamic Variables Retell automatically provides these system variables [(2) ]() : -
{{current_agent_state}}
- Current state name -
{{previous_agent_state}}
- Previous state name -
{{current_time}}
- Current time in America/Los_Angeles timezone -
{{current_time_[timezone]}}
- Current time in specified timezone -
{{current_calendar}}
- 14-day calendar -
{{call_type}}
- "web_call" or "phone_call" -
{{direction}}
- "inbound" or "outbound" (phone calls only) -
{{user_number}}
- User's phone number -
{{agent_number}}
- Agent's phone number You can also create custom dynamic variables and use them in prompts, begin messages, tool calls, and voicemail settings . ## Tone Configuration For tone specifically, you would configure this in the Global Prompt section under Agent Global Settings [(3) ]() . The documentation mentions writing the agent's "persona, identity, guardrails, etc." in the Global Prompt, which would include tone instructions . However, the sources don't provide specific dynamic variables dedicated to tone control.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy I was talking about when I am trying to do a logic split node and find the tone of the person that is the caller
a
Thanks for the follow-up, @dannykimes. I'll get back to you soon.
### Answer For detecting caller tone in a Logic Split Node, you'll need to use sentiment analysis capabilities. Retell AI provides sentiment analysis that detects positive, neutral, or negative emotional tone in a speaker's voice or language [(1) ]() . ## Logic Split Node Setup Logic Split Nodes evaluate conditions immediately when the agent enters the node and branch to corresponding destination nodes [(2) ]() . The agent doesn't speak in this node, and transitions happen instantly . To configure branching logic in a Logic Split Node : - Add conditions just like you would in other nodes - Set up the else destination (there's always an else condition as the default if none are met) ## Sentiment Detection Variables While the sources don't specify exact dynamic variables for tone detection in Logic Split Nodes, Retell AI's sentiment analysis can detect emotional tone and automatically escalate emotionally charged conversations [(1) ]() . The system analyzes both what's said (transcript) and how it's said (tone, pitch, pacing) . ## Practical Implementation Based on community discussions, users have found that Logic Split Nodes work best with explicit conditions [(3) ]() [(4) ]() . One user noted that making conditions very explicit and clear helps the LLM understand what you want [(4) ]() . For tone-based branching, you would likely need to: 1. Use prompt-based conditions in your Logic Split Node that reference the caller's emotional state 2. Ensure you
r global prompt includes instructions for tone detection 3. Consider using post-call analysis features that log customer sentiment for future reference [(1) ]() The sources suggest that if you're having issues with Logic Split Node conditions, try making them more explicit and sentence-based rather than using simple variable checks [(4) ]() .
​ To learn more, see the sources I considered: [[1] Sentiment Analysis](https://www.retellai.com/glossary/sentiment-analysis) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[3] Help with Logic Split Nodes (and an example of a custom variable being used would be lovely!)](https://discord.com/channels/1186424376300679209/1358825261986087126) [[4] Discord message from @s4turn1143 on 2025-03-08](https://discord.com/channels/1186424376300679209/1186462578310910112/1347977750027440200) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.