liamo0083
11/05/2025, 11:35 PMAI Evy
11/05/2025, 11:35 PMAI Evy
11/05/2025, 11:35 PMAI Evy
11/05/2025, 11:35 PMverification_attempts initialized to 0) .
2. Structure Your Flow with Conditional Nodes
- After each failed verification, increment the counter
- Add transition conditions that check the counter value
- Route to different nodes based on attempt count
3. Add Transfer Call Tool
When the counter reaches 2 (second failed attempt) , transition to a node that uses the Transfer Call tool [(1) ]() . You can configure this as either a cold transfer or warm transfer .
4. Configure the Transfer
Set up the transfer number in e.164 format or as a SIP URI . You can also use a dynamic variable for the transfer destination . Update your prompt to include instructions like: "If verification fails twice, use the transfer_call tool to transfer the conversation to a human agent" .
5. Choose Transfer Type
Configure whether you want a cold transfer (direct transfer) or warm transfer (where the AI can detect if the other side is human and leave private messages) .
The key is using your conversation flow's transition conditions to evaluate the attempt counter and route appropriately - either back to verification (if attempts < 2) or forward to the transfer node (if attempts >= 2) .
Would you like me to provide a general answer with more specific implementation details based on my broader knowledge?AI Evy
11/05/2025, 11:35 PMliamo0083
11/05/2025, 11:39 PMliamo0083
11/05/2025, 11:40 PMAI Evy
11/05/2025, 11:40 PMAI Evy
11/05/2025, 11:40 PMverification_attempts
- Default value: 0
2. Update the Variable During the Call
For outbound calls, when using the Create Phone Call API, set your variables in the retell_llm_dynamic_variables field . Note that all values must be strings :
json
{
"verification_attempts": "0"
}
3. Use the Variable in Your Conversation Flow
To check if a variable is set in conversation flow conditions, you can use equations . Dynamic variables can be used in:
- Prompts (agent instructions and personality)
- Tool configurations
- Call handling
Important Notes:
- Dynamic variables use the {{variable_name}} syntax
- All values must be strings
- When a dynamic variable has no assigned value, it remains in its raw form with the curly braces intact
For your specific use case, you'll need to increment this counter each time verification fails and check its value in your flow transitions to determine whether to loop back or transfer to a human agent.
**AI Evy
11/05/2025, 11:40 PMAI Evy
11/05/2025, 11:41 PMliamo0083
11/05/2025, 11:51 PMAI Evy
11/05/2025, 11:51 PMAI Evy
11/05/2025, 11:51 PMretell_llm_dynamic_variables field
- Used in prompts, tool configurations, and transition conditions [(1) ]() [(2) ]()
However, there's no documented mechanism for modifying dynamic variable values mid-conversation within the conversation flow itself [(1) ]() [(3) ]() .
Potential workaround approach:
You might need to use a custom function/tool that:
1. Receives the current attempt count as a parameter
2. Increments it
3. Returns the updated count
4. Uses that returned value in subsequent transition conditions
But this would require the function to maintain state externally, as dynamic variables appear to be read-only during the conversation flow execution based on the available documentation [(1) ]() .
I don't have information in the sources about directly updating dynamic variables within a conversation flow after each failed verification attempt. Would you like me to provide a general answer based on my broader knowledge of how this might be approached?AI Evy
11/05/2025, 11:51 PMAI Evy
11/05/2025, 11:51 PMliamo0083
11/05/2025, 11:52 PMAI Evy
11/05/2025, 11:52 PMAI Evy
11/05/2025, 11:52 PMretell_llm_dynamic_variables field
- Used in prompts, tool configurations, and transition conditions [(1) ]() [(2) ]()
However, there's no documented mechanism for modifying dynamic variable values mid-conversation within the flow itself. [(1) ]()
What you CAN do:
Use an Extract Dynamic Variable Node to capture information from the conversation and store it as a dynamic variable. [(3) ]() This node allows you to:
- Create variables with types: Text, Number, Enum, or Boolean
- Extract information from conversation
But this extracts new information rather than incrementing existing counters.
Potential approach:
You might need to track attempts through your conversation flow structure itself rather than a counter variable - for example, by creating separate nodes for "First Attempt" and "Second Attempt" with explicit transitions between them based on verification success/failure. [(2) ]()
I don't have documentation showing how to increment a counter variable during the conversation flow. Would you like me to provide a general answer based on broader knowledge of how this might be approached?AI Evy
11/05/2025, 11:52 PMAI Evy
11/05/2025, 11:52 PM