https://retellai.com/?utm_source=discord&utm_medium=seo logo
- During Transitions / or set up the variables, So...
# ❓・ai-evy-support
j
@AI Evy - During Transitions / or set up the variables, Sometime those variables values are set some time not? Why? How i can make sure debug the flow in coversational flow between the different nodes? I am build the Voice Agent which get status for work orders. And If there are multiple work orders then agent repeat one single prompt many times ?
a
Thanks for tagging me @jcloe_80373. I'll look through relevant sources and get back to you shortly.
### Answer Here's how to address your conversation flow debugging and variable issues: ## Variable Setting Issues For dynamic variables in equation conditions, you can only use variables that are passed in as dynamic variables [(1) ]() . If you need to use information extracted by the LLM during the call, you should use prompt conditions instead . To check if variables exist, you can use these equation conditions :
Copy code
{{variable_name}} exists
{{variable_name}} does not exists
## Debugging Conversation Flow To debug your conversation flow effectively [(2) ]() : Step 1: Identify the issue - Check if the agent is not following instructions within a node - Verify if node transitions are not working as expected - Confirm if the actual conversation matches the flow graph Step 2: Fix transition issues - Review your transition conditions to ensure they precisely match your intended triggers - Add transition finetune examples to help the model understand your expectations - Make transition conditions more flexible and general You can find node transitions inside the call transcript in the history tab, which will show the node names that it transitions from and to [(1) ]() . ## Preventing Repeated Prompts For your work order status agent that repeats prompts, you can use Set Variable nodes to track what information has already been provided [(3) ]() . Set a variable like
work_order_mentioned = "true"
after the first mention, then use equation conditions in your transitions :
Copy code
{{work_order_mentioned}} == "true"
This prevents repeating the same information across different nodes . Make sure the variable is treated as a dynamic variable so it's accessible across branches . You can also split nodes into multiple smaller nodes if a single node contains too many instructions, which can improve consistency [(2) ]() .
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[3] How to set up the flow to avoid repeating what was mentioned already](https://discord.com/channels/1186424376300679209/1390655241170456617) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy - Lets say a scenario In Conversation flow I have Welcome Node where I set the value -> transition to other node. Here how i can check the value set for variable in Welocme Node. Here on Second Node?
a
Thanks for the follow-up, @jcloe_80373. I'll get back to you soon.
### Answer Based on the available sources, I can explain how to check variable values between nodes in Conversation Flow: ## Checking Variable Values Between Nodes To check if a variable was set in your Welcome Node when you reach the Second Node, you can use equation conditions in your transition logic [(1) ]() :
Copy code
{{variable_name}} exists
{{variable_name}} does not exists
These conditions allow you to verify whether a dynamic variable is defined and has a value . ## Setting Variables in Nodes If you're setting variables in your Welcome Node, you would typically use an Extract Dynamic Variable Node for this purpose [(2) ]() . The Extract Dynamic Variable Node is specifically designed to extract information from conversation and store them as dynamic variables . When creating a variable, you need to specify : - Variable Name – A short name to reference this variable - Description – A brief explanation of what this value should be - Variable Type – Choose from
Text
,
Number
,
Enum
, or
Boolean
## Using Variables in Transition Conditions You can only use variables that are passed in as dynamic variables for equation conditions [(1) ]() . If you need to use information extracted by the LLM (such as information learned during the call) , you should use prompt conditions instead . For equation conditions, you can check variable values like this :
Copy code
- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
- {{user_location}} == "New York"
- {{user_location}} != "New York"
- {{name}} exists
This allows you to verify that variables set in your Welcome Node are properly accessible in subsequent nodes.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy - When I performed the Oubound call, My Lateny for call is very approx 8 sec. and approx LLM Token: 26114.52 seen in logs. what does that means. and when i checked in My board where i am creating the flow here i check approx 6600 tokens. Now what does that means here.
a
Thanks for the follow-up, @jcloe_80373. I'll get back to you soon.
### Answer Based on the available sources, I can explain what these metrics mean for your outbound call: ## Latency Metrics The 8-second latency you're seeing in your call logs refers to end-to-end latency [(1) ]() [(2) ]() . In the call response data, latency is tracked across multiple components including: - *e2e (end-to-end) * - Total response time from user speech to agent response - llm - Time for LLM processing - tts - Text-to-speech conversion time Retell AI has been working on latency optimizations, with recent improvements cutting average response times by 100-200ms [(3) ]() . ## LLM Token Usage The 26,114.52 tokens shown in your logs represents the total token consumption during your call [(1) ]() [(2) ]() . This is tracked in the
llm_token_usage
field which includes:
Copy code
json
"llm_token_usage": {
  "values": [123],
  "average": 123,
  "num_requests": 123
}
## Token-Based Pricing Impact The difference between your dashboard estimate (6,600 tokens) and actual usage (26,114.52 tokens) is significant for billing. Retell AI implemented token-based LLM pricing where prompts up to 3,500 tokens follow the existing flat rate, but prompts exceeding this scale proportionally [(3) ]() . For example with OpenAI GPT-4.1: - Base rate: $0.07 - For 4,500 tokens: 0.07 + (4500 / 3500 × 0.045) = $0.1279 per minute Your actual usage of 26,114+ tokens would result in significantly higher costs than the dashboard estimate, as it far exceeds the 3,500 token flat rate threshold .
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Pricing Changes, Latency Improvements, One-Time SMS, and More](https://www.retellai.com/changelog/pricing-changes-latency-improvements-one-time-sms-and-more) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy -> But during the call the API which i set up to capture the response, it does not capture the response for some work orders Why? After 6 work orders does not capture the response through api
a
Thanks for the follow-up, @jcloe_80373. I'll get back to you soon.
### Answer Based on the available sources, I can provide some insights about API integration issues, but I don't have specific information about work order response capture limitations or the "6 work orders" threshold you mentioned. ## API Integration Basics API Integration in Retell AI allows voice agents to exchange data and trigger actions automatically [(1) ]() . The integration enables agents to pull in live data, update backend systems, and personalize responses in real time . The typical API integration workflow involves : 1. Trigger - A customer requests an action 2. Data Exchange - The AI voice agent sends a request to an external system via API 3. Dynamic Response - The agent uses real-time data to continue the conversation 4. Automated Follow-up - Actions like confirmations or updates happen instantly ## Potential Issues to Investigate Without specific documentation about work order limits, here are some areas to check: - API rate limiting - Your external API may have request limits - Token usage - Given your high token consumption (26,114+ tokens) , there might be processing constraints - Conversation flow complexity - Multiple work orders might exceed processing thresholds - Variable handling - As discussed in your previous questions, variable setting can be inconsistent ## Call Data Analysis You can review your API integration performance through call data [(2) ]() [(3) ]() . The call response includes detailed information about: - Call duration and timestamps - Token usage patterns - Latency metrics across different components I don't have specific information about work order response capture limits or why responses stop after 6 work orders. For this specific i
ssue, I'd recommend: Visit [Contact Sales]() or [) for detailed troubleshooting support. Would you like a general answer based on my knowledge about common API integration issues instead?
​ To learn more, see the sources I considered: [[1] API Integration](https://www.retellai.com/glossary/api-integration) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy -> What are the steps then, I follow to work with latency and token usage, remove the conversation flow complexity?
a
Thanks for the follow-up, @jcloe_80373. I'll get back to you soon.
### Answer --- ### Answer Based on the available sources, here are the steps to optimize latency, reduce token usage, and simplify conversation flow complexity: ## Latency Optimization Strategies Latency refers to the time delay between a user's action and the system's response [(1) ]() . To optimize latency in your conversation flow: 1. Optimize Speech Settings In your global settings, adjust responsiveness and interruption sensitivity [(2) ]() : - Lower responsiveness adds 0.5 seconds of agent wait time per 0.1 reduction - Adjust interruption sensitivity to reduce unnecessary processing 2. Model Selection Choose the right model for your use case in your global settings . The recent changelog shows that Retell AI has been cutting average response times by 100-200ms through optimizations [(3) ]() . ## Token Usage Reduction 1. Optimize Global Prompt Keep your global prompt concise in the global settings [(2) ]() . The global prompt influences all response generation across nodes . 2. Use Conversation Flow Strategically Conversation flows provide more predictable behavior and fine-grained control [(4) ]() . Since pricing is calculated based on time spent in each node and model price per second for that specific node , you can optimize costs by using different models for different parts of the conversation . ## Reducing Conversation Flow Complexity 1. Split Complex Nodes Every node defines a small set of logic, and transition conditions determine which node to transition to . Break down complex scenarios into smaller, focused nodes . 2. Optimize Node Structure - Use **Con
versation nodes** for dialogue - Use Function nodes for API calls - Use Logic nodes for branching - Use End nodes for call termination 3. Simplify Transitions Use clear condition-based transitions and default fallback paths . Dynamic routing based on conversation context should be straightforward . 4. Leverage Node-Specific Models Since model choice can be overridden within individual nodes , use cheaper models for simple routing and premium models only for complex interactions . This approach allows you to optimize costs while maintaining performance across your conversation flow.
​ To learn more, see the sources I considered: [[1] Latency](https://www.retellai.com/glossary/latency) [[2] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[4] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy , I tried the outbound call with conversational flow, and agent has to get the status of 20 work orders, During the call after the 6 work order confirmation call was dropped / hungup why and latency was very much higher then mentioned?
a
Thanks for the follow-up, @jcloe_80373. I'll get back to you soon.
### Answer Based on the available sources, I can address several potential causes for call drops and high latency when processing multiple work orders: ## Call Drop Issues For outbound calls dropping after 6 work orders, this could be related to several factors documented in the community forums [(1) ]() [(2) ]() [(3) ]() . Users have reported similar outbound call failures, with some noting that calls work to their own numbers but fail to other destinations [(2) ]() . ## High Latency Causes Latency refers to the time delay between a user's action and the system's response [(4) ]() . In AI voice interactions, even slight delays feel unnatural, and anything longer than 300-500 milliseconds can cause users to talk over the agent or assume the call dropped . High latency can occur due to multiple processing stages : - *Speech Recognition Processing (ASR) * - Time to transcribe spoken words - Response Generation - Time to craft contextual replies - *Speech Synthesis (TTS) * - Converting text back to speech - Network Transmission - Delays in cloud setups ## Conversation Flow Optimization For your 20 work order scenario, consider these debugging approaches from the official documentation [(5) ]() : **Split Complex Nodes**: If a node contains instructions to collect multiple work order statuses, the agent might inconsistently process this information . Split this into separate nodes for better consisten
cy . **Adjust LLM Temperature**: If the agent's responses are inconsistent across multiple work orders, try adjusting the LLM temperature . **Add Global Nodes**: Make key steps global nodes to handle edge cases, particularly useful when users deviate from the defined flow . ## Troubleshooting Recommendations The sources indicate that interaction problems can include issues with complex requests and background noise affecting processing [(6) ]() . For high-volume processing like 20 work orders, consider: 1. Breaking the flow into smaller, manageable chunks 2. Implementing retry logic for failed API calls 3. Using conversation finetune examples to improve consistency [(5) ]() For specific outbound call failures and the 6 work order threshold issue, I don't have detailed information in the available sources. Visit [Contact Sales]() or [) for detailed troubleshooting support. Would you like a general answer based on my knowledge about handling high-volume voice agent scenarios instead?
​ To learn more, see the sources I considered: [[1] Discord message from @.7mile on 2025-07-09](https://discord.com/channels/1186424376300679209/1186462578310910112/1392583939134062744) [[2] Discord message from @helloaang on 2024-11-27](https://discord.com/channels/1186424376300679209/1186462578310910112/1311149720499912705) [[3] Discord message from @khalidrouissi on 2025-09-17](https://discord.com/channels/1186424376300679209/1186462578310910112/1417989449953972274) [[4] Latency](https://www.retellai.com/glossary/latency) [[5] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[6] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.