https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I make the results of a function called at ...
# ❓・ai-evy-support
p
@AI Evy how do I make the results of a function called at a function node dictate which node the conversation flow agent goes to next?
a
Thanks for tagging me @punk8357. I'll look through relevant sources and get back to you shortly.
### Answer To have function results dictate which node the conversation flow agent goes to next, you need to: 1. Enable "Wait for Result" on your function node — this ensures the agent waits for the function to finish executing before attempting to transition. [(1) ]() 2. Write transition conditions based on the function result — since the function node takes function results into consideration for transition timing, you can write your transition condition to be based on the function result. 3. Create different conversation nodes for different outcomes — attach separate conversation nodes to the function node for different function results, so the agent can engage users differently depending on what the function returns. The key insight is that when "Wait for Result" is enabled, the agent will transition once the function result is ready (and the agent is done talking if "Speak During Execution" is also enabled) . This guarantees that when you reach the next node, the result is already available to be used in your transition logic. You can also use Equation-Based Transition for conversation flow to create conditions without needing to write prompts like
{{dynamic_variable}} === value
in your transition prompt. [(2) ]()
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
is {{dynamic_variable}} === value more reliable? also, do I need to set the dynamic variable or it will be automatically set based on the function result
@AI Evy is {{dynamic_variable}} === value more reliable? also, do I need to set the dynamic variable or it will be automatically set based on the function result
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Equation vs Prompt Transitions: Equation-based transitions (like
{{dynamic_variable}} == "value"
) are recommended when you want to branch based solely on dynamic variable values. [(1) ]() They're deterministic—if the condition matches, the transition happens. Prompt-based conditions rely on the LLM to interpret the condition, which can introduce variability. Note that
==
,
Contains
,
Not Contains
, and
Not Equal
are string comparisons and don't require numerical input. Other comparison operators require numerical input and will always evaluate to false if the input is not a number. Setting Dynamic Variables from Function Results: You need to explicitly configure the function to extract and store variables. Your agents can extract and store dynamic variables mid-conversation using the Extract Variables feature. [(2) ]() For custom functions, you can set response variables from the function result. In a conversation flow, you would configure the function node to map the function response to dynamic variables. The variables won't be automatically set just from calling a function—you need to specify which parts of the response should be stored as dynamic variables. Checking if a Variable Exists: You can also use these equation conditions to check whether a variable is set: [(1) ]() -
{{variable_name}} exists
— Returns true if the variable is defined and has a value -
{{variable_name}} does not exists
— Returns true if the variable is undefined or has no value
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I use the api to make the function node call my backend function and then set one of the returned variables as a response variable
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
Copy code
python
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from retell import Retell

retell = Retell(api_key=os.environ["RETELL_API_KEY"])
@app.post("/check-weather")
async def check-weather(request: Request) :
    try:
        post_data = await request.json()
        valid_signature = retell.verify(
            json.dumps(post_data, separators=(",", ":") , ensure_ascii=False) ,
            api_key=str(os.environ["RETELL_API_KEY"]) ,
            signature=str(request.headers.get("X-Retell-Signature") ) ,
        )
        if not valid_signature:
            return JSONResponse(status_code=401, content={"message": "Unauthorized"})
        args = post_data["args"]
        if args["city"] == "New York":
            return JSONResponse(status_code=200, content={"result": "25f and sunny"})
        else:
            return JSONResponse(status_code=200, content={"result": "20f and cloudy"})
    except Exception as err:
        print(f"Error in webhook: {err}")
        return JSONResponse(status_code=500, content={"message": "Internal Server Error"})
The key step is configuring the response variable mapping in the function node UI to specify which part of your backend's JSON response should be stored as which dynamic variable.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
### Answer To make a function node call your backend and set a returned variable as a response variable: 1. Configure the Custom Function Set up your function node with your endpoint URL, HTTP method, and any parameters you need. [(1) ]() 2. Set Response Variables In the function configuration, use the "Set response variables" option to extract values from the API response and save them as dynamic variables for use later in the conversation. For example, if your backend returns:
Copy code
json
{
  "properties": {
    "user": {
      "name": "John Doe",
      "age": 26
    }
  }
}
You can extract the user's name from the response and reference it later using
{{user_name}}
. 3. Your Backend Response Your backend should return a response with status code 200-299. The response can be a string, buffer, JSON object, or blob—all formats will be converted to string before processing. *4. Verify Requests (Optional) * To verify requests are from Retell, check the
X-Retell-Signature
header:
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I do the part where you said "You can extract the user's name from the response and reference it later using {{user_name}}. " via api
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- The extraction of response variables from a custom function is configured through the Conversation Flow UI, not directly via API. [(1) ]() When you set up a custom function node in the Conversation Flow builder, there's a "Set response variables" option where you map parts of the API response to dynamic variable names. This is a UI-based configuration step—you specify the JSON path from your backend's response and the variable name to store it as. Important considerations: - If your API returns an array (not an object) , you need to reference items by index. For example, if the response contains
patient
as an array, you'd use
patient[0].providerNo
rather than just
patient.providerNo
. [(2) ]() - Use the variable name directly (like
{{make}}
) rather than nested notation like
scheduling_info_extraction.make
when referencing extracted variables in subsequent function calls. [(3) ]() Once configured, you can reference the extracted variable using
{{user_name}}
syntax in prompts or transition conditions throughout your conversation flow. [(4) ]() If you need to pass dynamic variables when creating a call programmatically, you can use
retell_llm_dynamic_variables
in your API request:
Copy code
javascript
const webCallResponse = await client.call.createWebCall({
  agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
[(5) ]() But the response variable extraction mapping itself is done in the function node configuration within the Conversation Flow editor, not through the API.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Custom Function API call response not being saved as dynamic variable](https://discord.com/channels/1186424376300679209/1444715331372322917) [[3] Extracted Dynamic Variables not sending through custom function in Conversation Flow Prompt](https://discord.com/channels/1186424376300679209/1442542149546803312) [[4] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[5] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy so I cant do it programatically through the api?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Correct—the response variable extraction mapping for custom functions in Conversation Flow is configured through the UI, not programmatically via API. [(1) ]() The documentation shows that you: 1. Configure function details (name, description, HTTP method, endpoint URL, headers, query parameters, and request body parameters) in the Conversation Flow builder 2. Set response variables through the UI by extracting values from the API response and saving them as dynamic variables The available sources don't document an API endpoint for programmatically creating or modifying the response variable extraction configuration for function nodes within a Conversation Flow agent. What you CAN do programmatically: - Pass dynamic variables when creating a call using
retell_llm_dynamic_variables
- Your backend can return data that gets extracted based on the UI-configured mapping If you need fully programmatic agent configuration, you may want to check the [Retell AI API references]() for agent creation/update endpoints, or reach out to support for guidance on whether this capability exists or is planned.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
if I let the agent infer the response variables then can it be done automatically @AI Evy ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer No—the agent does not automatically infer and set response variables from a custom function's return value. You must explicitly configure the response variable extraction. [(1) ]() The documentation states that you "Set response variables (optional) " by extracting values from the API response and saving them as dynamic variables for use later in the conversation. The function result itself is sent to the LLM for processing (capped at 15,000 characters) , but for the result to be stored as a reusable dynamic variable like
{{user_name}}
, you need to configure the mapping in the function node settings. Without that explicit configuration, the LLM can reference the function result in its immediate response, but the value won't be persisted as a dynamic variable for use in transition conditions or later nodes.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy you are sure I cant set it through the api? what if I do it in the UI and then extract the node structure to see the format?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- You're right to push on this. Looking at the Create Conversation Flow API endpoint, there is a
tools
field that accepts an array of tool/function configurations. [(1) ]() The API response structure shows:
Copy code
json
[  
  {  
    "type": "custom",  
    "name": "get_customer_info",  
    "description": "Get customer information from database",  
    "tool_id": "tool_001",  
    "url": "<https://api.example.com/customer%22,>  
    "method": "GET"  
  }  
]
So yes—you could configure a conversation flow in the UI, then use the API to retrieve the conversation flow structure and inspect how the response variable extraction is formatted. The conversation flow API includes
components
for local components embedded within the flow and
tools
for the function configurations. However, the sources I have don't show the exact schema for response variable extraction within the tool/function configuration. Your approach of setting it up in the UI first and then extracting the structure via API to see the format is a practical way to reverse-engineer the schema. Check the [Create Conversation Flow]() and related GET endpoints to retrieve an existing flow's full configuration.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you show me how to add a functin node via the api
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer I don't have documentation showing the exact API request body structure for adding a function node to a Conversation Flow via the API. The available sources confirm that: - Retell AI currently does not support creating or updating full conversation flows via API in a fully documented way—this functionality is primarily available through the dashboard. [(1) ]() - The API is focused on integrations like initiating calls, configuring agents, and linking external systems, not on defining multi-node conversational logic. Your best approach: 1. Create the function node in the UI first 2. Use the GET endpoint for conversation flows to retrieve the full structure 3. Inspect the JSON to see how function nodes and their configurations (including response variable extraction) are formatted 4. Use that schema to programmatically create or update flows via the Create/Update Conversation Flow API endpoints Check the [Create Conversation Flow]() API reference for available fields, though the sources I have don't include the complete schema for function node configuration within the
tools
or
components
arrays. Would you like a general answer based on typical API patterns, or would you prefer to reach out to Retell support for the exact schema?
​ To learn more, see the sources I considered: [[1] Is there no way to use conversional flow via the API?](https://discord.com/channels/1186424376300679209/1385350640427073706) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
how do I make a function node in the UI @AI Evy
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To create a function node in the Conversation Flow UI: 1. Add the function first [(1) ]() You need to add the function before selecting it inside the node. This way if you delete the node, you don't need to re-create the function again. 2. Add the node to the canvas [(2) ]() Click from the left sidebar to select the node type you want to add. Click on it, and it will be added to the canvas. 3. Configure the function node For a custom function, configure these details: [(3) ]() - **Name and description**: The name should be unique and separated with underscore (e.g.,
get_user_details
) - **HTTP Method**: Choose GET, POST, PATCH, PUT, or DELETE - **Endpoint URL**: Add the URL where Retell will send the request - Request headers (optional) : Define custom headers with static or dynamic variable values - Query parameters (optional) : Define query parameters to include in the request URL - **Parameters**: Define using JSON schema format or JSON form (only for POST, PATCH, PUT) - Response variables (optional) : Extract values from the API response and save them as dynamic variables 4. Configure node settings [(1) ]() - **Speak During Execution**: Instructions for what the agent says while the function executes - **Wait for Result**: When enabled, the agent waits for the function to finish before transitioning 5. Connect the node [(2) ]() Click and hold the circle to start a line that connects the node to other nodes.
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[3] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy my variable is true or false so do I set the condition to ai_enabed = true in the UI?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- For a true/false variable, you would use an equation condition like: [(1) ]()
Copy code
{{ai_enabled}} == "true"
Note that
==
,
Contains
,
Not Contains
, and
Not Equal
are **string comparisons**—they do not require numerical input. So if your variable stores the value as the string
"true"
or
"false"
, use the string comparison format above. You can also check if the variable exists using:
Copy code
{{ai_enabled}} exists
If you need to branch on both outcomes, you'd create separate transition conditions like:
Copy code
{{ai_enabled}} == "true"
{{ai_enabled}} == "false"
Make sure the value you're comparing matches exactly what your function returns (e.g.,
"true"
as a string vs
true
as a boolean may behave differently depending on how it's stored) .
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy what do I use if its a boolean not a string?'
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- The equation conditions in Conversation Flow use string comparisons for
==
,
Contains
,
Not Contains
, and
Not Equal
. [(1) ]() If your function returns a boolean (`true`/`false` without quotes) , it will likely be converted to a string when stored as a dynamic variable. You should still use the string comparison format:
Copy code
{{ai_enabled}} == "true"
{{ai_enabled}} == "false"
Alternatively, you can use the
exists
check if you only need to verify the variable is set:
Copy code
{{ai_enabled}} exists
If you're experiencing issues with the comparison not working as expected, try logging or displaying the variable value (using
{{ai_enabled}}
in a static sentence) to confirm exactly how it's being stored—this can help you determine whether it's stored as
"true"
,
"True"
,
true
, or another format. [(2) ]() The safest approach is to ensure your backend returns the value as a string (
"true"
or
"false"
) rather than a boolean, since the equation conditions are designed for string comparisons.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Issues with transitions - getting stuck on Conversation and Logic Split Nodes using dynamic variable](https://discord.com/channels/1186424376300679209/1437030319541719172) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy in the UI it says equals (=) it doesnt show == so is = fine or no?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes,
=
in the UI is fine. The documentation shows the syntax using
==
in text examples, but the UI may display it as
=
or "equals"—they represent the same equality comparison. [(1) ]() The key point is that
==
(or
=
in the UI) is a string comparison. So for your boolean variable, use:
Copy code
{{ai_enabled}} == "true"
Or in the UI, select the equals condition and compare against the string
"true"
.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy if I want to transition to one of the next two nodes based on function node results then do i remove the transitions from the prior node which goes to two nodes right now and instead send the one node through the function node that then branches ot the other two?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- Yes, that's the correct approach. You should route your prior node to the function node first, then add transition conditions on the function node that branch to the two destination nodes based on the function result. [(1) ]() The flow would be: Prior Node → Function Node → (branches to) Node A or Node B On the function node, you can define equation conditions to transition out based on the dynamic variable set from the function response:
Copy code
{{ai_enabled}} == "true"
{{ai_enabled}} == "false"
Each condition points to a different destination node. Equation conditions are evaluated first (before prompt conditions) , and the agent travels on the first condition that evaluates to true. To set this up: 1. Remove the direct transitions from your prior node to the two destination nodes 2. Connect your prior node to the function node instead 3. On the function node, add transition conditions using the "+" button 4. Create separate equation conditions for each branch, each pointing to the appropriate destination node , [(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] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you start your flow on a funtion node?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The available sources don't explicitly state whether you can set a function node as the starting node of a conversation flow. The documentation describes function nodes as being "used to call a function" and notes that they are "not intended for having a conversation with the user, but agent can still talk while in this node if needed." [(1) ]() Since function nodes are designed for executing actions rather than initiating dialogue, and the documentation recommends attaching a conversation node to tell the user the result of a function, it's likely that starting with a function node may not provide the expected user experience. Check out these potentially useful sources: - [Function Node Overview]() - [Conversation Flow Overview]() - [Node Overview]() Would you like me to try to answer generally, or would you prefer to test this directly in the UI or reach out to Retell support for confirmation?
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can you have two function nodes in a row?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- The available sources don't explicitly state whether you can connect two function nodes in a row. However, based on how nodes and edges work in Conversation Flow: - Nodes are the fundamental building blocks, and edges are connections between nodes that define the conversation flow. [(1) ]() - You can add transition conditions on function nodes to determine which node to transition to next. [(2) ]() - There is no documented limit on the number of nodes, and you can connect nodes by clicking and holding the circle to start a line that connects one node to another. [(3) ]() Since function nodes support transition conditions and can connect to other nodes, it's architecturally possible to connect a function node to another function node. The key consideration is that function nodes are "not intended for having a conversation with the user" [(2) ]() , so chaining them would mean executing multiple functions sequentially without conversational interaction between them. If you need the agent to speak between function calls, you'd want to insert a conversation node between them to tell the user the result. I'd recommend testing this directly in the UI to confirm the behavior.
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[2] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[3] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I use the api to make a tool
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Based on community feedback, creating tools via the
conversation_flow.create()
endpoint does not work as expected—the
tools
parameter is accepted but the tools don't actually get created. [(1) ]() The workaround is to use the Update Conversation Flow API instead: 1. First, create the conversation flow without tools 2. Then use the update endpoint to add the tools Here's the tool structure format from the Create Conversation Flow API documentation: [(2) ]()
Copy code
json
[  
  {  
    "type": "custom",  
    "name": "get_customer_info",  
    "description": "Get customer information from database",  
    "tool_id": "tool_001",  
    "url": "<https://api.example.com/customer%22,>  
    "method": "GET"  
  }  
]
The
tools
array accepts objects with these fields: - `type`: e.g.,
"custom"
- `name`: unique function name - `description`: what the function does - `tool_id`: identifier for the tool - `url`: endpoint URL - `method`: HTTP method (GET, POST, PATCH, PUT, DELETE) For the update endpoint, see: [Update Conversation Flow]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Tool creation not working via conversation_flow method (python sdk)](https://discord.com/channels/1186424376300679209/1408324136060715099) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I get the tool id after do use in a function node
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To retrieve the
tool_id
after creating a tool, you can use the Get Conversation Flow API endpoint to retrieve the full conversation flow structure, which includes the tools array with their IDs. [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
The response includes the
tools
array with each tool's configuration: [(2) ]() , [(1) ]()
Copy code
json
{
  "type": "custom",
  "name": "get_customer_info",
  "description": "Get customer information from database",
  "tool_id": "tool_001",
  "url": "<https://api.example.com/customer%22,>
  "method": "GET"
}
[(2) ]() Workflow: 1. Create or update your conversation flow with the tool via the API 2. Call the Get Conversation Flow endpoint with your
conversation_flow_id
[(1) ]() 3. Parse the response's
tools
array to find the
tool_id
for each tool The
tool_id
from this response is what you'd reference when configuring function nodes.
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy after clicking test chat from making my convo flow agent via api I get the error "Failed to get LLM response" how do I fix this
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The "Failed to get LLM response" error when testing a conversation flow agent created via API can have several causes based on community reports: Common causes and fixes: 1. JSON schema issues with tools — One user resolved this by checking their tools configuration: "It was a JSON schema issue. But Retell had no error or warning of the problem... Check your tools." [(1) ]() 2. Logic Split Node at the start — If your flow starts with or immediately transitions to a Logic Split Node, this can cause the error. Try replacing the split node at the beginning with a normal conversation node first. [(2) ]() 3. Model configuration issues — The LLM model settings may not be saving correctly. After creating via API, verify the model is properly set by retrieving the flow. [(3) ]() Troubleshooting steps: - Verify your
model_choice
is properly configured in your API request — this is a required field [(4) ]() - Ensure your
nodes
array has valid node configurations with proper
instruction
objects - Check that
start_speaker
is set to either
"user"
or
"agent"
- Retrieve your conversation flow using the Get endpoint to verify all settings were saved correctly [(5) ]() Required fields when creating via API: -
model_choice
(required) -
start_speaker
(required) -
nodes
array (required) [(4) ]() Try refreshing the page and creating a new test chat, and verify your flow structure matches the expected schema.
​ To learn more, see the sources I considered: [[1] Discord message from @realtors_90628 on 2025-11-30](https://discord.com/channels/1186424376300679209/1186462578310910112/1444480408547889315) [[2] Failed to get LLM response in Logic Split Node](https://discord.com/channels/1186424376300679209/1423335592753631292) [[3] New Feature Conversation Flow LLM Button Issue](https://discord.com/channels/1186424376300679209/1328547687561297952) [[4] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[5] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy i think its because the purple begin node isnt connected to my first node. how do I make the begin node connect through the api?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To connect the begin node to your first node via the API, you need to set the
start_node_id
parameter when creating or updating your conversation flow. [(1) ]() This parameter specifies which node the flow begins with—effectively connecting the purple "begin" tag to your first node. Here's an example from the Create Conversation Flow API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
  model_choice: { model: 'gpt-4.1', type: 'cascading' },
  nodes: [
    {
      id: 'start',
      instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
      type: 'conversation',
    },
  ],
  start_speaker: 'agent',
}) ;
Key points: - Set
start_node_id
to match the
id
of your first node (e.g.,
"start"
) - The
start_node_id
field is described as "ID of the start node in the conversation flow" - You can also set
begin_tag_display_position
to control where the begin tag appears visually in the frontend If you've already created the flow without setting
start_node_id
, you can update it using the Update Conversation Flow endpoint and include the
start_node_id
parameter pointing to your first node's ID.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do I need headers or query parameters for my functions in the convo flow? do I need the x-api-key?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Headers and query parameters are optional for custom functions in conversation flow—you don't need them unless your endpoint requires them. [(1) ]() Regarding `x-api-key`: You don't need to send an API key header to your endpoint. Instead, Retell sends an
X-Retell-Signature
header that you can use to verify the request is from Retell. Here's how verification works:
Copy code
javascript
import { Retell } from "retell-sdk";
this.app.post("/check-weather", async (req: Request, res: Response) => {
  if (
    !Retell.verify(
      JSON.stringify(req.body) ,
      process.env.RETELL_API_KEY,
      req.headers["x-retell-signature"] as string,
    )
  ) {
    console.error("Invalid signature") ;
    return;
  }
  // ... handle request
}) ;
Summary: - **Headers**: Optional—use only if your endpoint requires authentication or custom headers - **Query parameters**: Optional—use only if your endpoint needs them - **x-api-key**: Not required in the function config. Use
X-Retell-Signature
verification on your server side instead You can also allowlist Retell's IP address (
100.20.5.228
) to secure your server from public network access.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
p
@AI Evy if i dont use x-api-key though I do need to use x-retell-signature?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer No, using
X-Retell-Signature
is **optional**—it's a security measure you can choose to implement, not a requirement for your function to work. [(1) ]() The
X-Retell-Signature
header is provided by Retell so you can verify that incoming requests to your endpoint are actually from Retell. Your options: 1. Skip verification entirely — Your function will still work; you just won't have proof the request came from Retell 2. Use signature verification — Verify using the
X-Retell-Signature
header with your Retell API key 3. IP allowlisting — Alternatively, you can secure your server by only allowlisting Retell's IP address:
100.20.5.228
If you do want to implement verification, here's the pattern:
Copy code
javascript
import { Retell } from "retell-sdk";
if (
  !Retell.verify(
    JSON.stringify(req.body) ,
    process.env.RETELL_API_KEY,
    req.headers["x-retell-signature"] as string,
  )
) {
  console.error("Invalid signature") ;
  return;
}
For a simple setup or testing, you can skip verification. For production, signature verification or IP allowlisting is recommended for security.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy does my agent id change every time i publish?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- No, your
agent_id
does not change when you publish. The
agent_id
remains the same unique identifier for your agent. [(1) ]() What changes is the version number. Each agent has a
version
field that increments when you publish new versions. From the Get Agent Versions API response:
Copy code
json
{
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "version": 0,
  "is_published": false
}
The
agent_id
stays constant across all versions of your agent—only the
version
integer changes. Note from community feedback: If you're seeing calls go to a different agent than expected, check whether the
from_number
is assigned to a specific agent in the dashboard—that assignment can override the
agent_id
you pass in API params. [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) [[2] Agent_ID problem (by using api)](https://discord.com/channels/1186424376300679209/1422374498459717633) ​
p
@AI Evy is the bug where post doesnt work still an issue or functions can work with post now not just get?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Custom functions now support GET, POST, PUT, PATCH, and DELETE HTTP methods—this is documented functionality, not a bug. [(1) ]() , [(2) ]() The earlier issue where POST appeared to send as GET was caused by a trailing slash in the endpoint URL. [(3) ]() To ensure POST works correctly: 1. Remove any trailing slash from your endpoint URL - Correct: ` - Incorrect: ` 2. Verify your endpoint protocol matches your connection type [(4) ]() - HTTPS endpoints: Use
wss://
prefix - HTTP endpoints: Use
ws://
prefix The changelog confirms custom functions were enhanced to support all HTTP methods (GET, POST, PUT, PATCH, DELETE) along with custom headers and query parameters. [(5) ]() If you're still experiencing issues, add logging to verify what's actually being received at your endpoint.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Custom Tool Function Call sends a "GET" from Retell to my URL and not a "POST" . Empty request body.](https://discord.com/channels/1186424376300679209/1284824056801132678) [[4] Troubleshooting Guide](https://docs.retellai.com/integrate-llm/troubleshooting) [[5] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy im getting this error for my function nodes function call Axios Error: error code: ERR_BAD_RESPONSE, error message: Request failed with status code 500 response status: 500 response data: ["Internal Server Error"]
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer A 500 Internal Server Error means the issue is on your server/endpoint side, not Retell's. Retell successfully sent the request to your custom function URL, but your server returned a 500 error. [(1) ]() Troubleshooting steps: 1. Check your endpoint logs — The error is coming from your server, so review your server logs to see what's failing when Retell calls your endpoint 2. Verify your endpoint handles the request body correctly — Retell sends requests with this structure: - `name`: the name of the custom function - `call`: the call object with context about the call - `args`: the arguments for the custom function as a JSON object 3. Test your endpoint independently — Try calling your endpoint directly with a tool like Postman or curl to confirm it works outside of Retell 4. Check request timeout — The request will timeout in your specified timeout period, or 2 minutes if not specified. When request fails, it will be retried up to 2 times. 5. Verify response format — Your response should have a status code between 200-299 to indicate success. Response can be string, buffer, JSON object, or blob. 6. Check function result size — The function result is capped at 15,000 characters to prevent overloading the LLM context window. The 500 error typically indicates an unhandled exception in your code—check for issues like missing environment variables, database connection failures, or malformed request parsing.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy im trying the test chat and after the function node gets a result back it doesnt seem to leave the function?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer If your function node isn't transitioning after receiving a result, check these settings: [(1) ]() 1. Verify "Wait for Result" is configured correctly - If
wait for result
is turned on, the agent will transition once the function result is ready and the agent is done talking (if "speak during execution" is enabled) - If
wait for result
is turned off, the agent transitions immediately after the function gets invoked 2. Check your transition conditions Since the function node takes function result into consideration for transition timing, you can write your transition condition to be based on the function result. Make sure you have edges connected from the function node to the next node(s) with appropriate transition conditions. 3. Add a conversation node after the function node The function node is not intended for having a conversation with the user. To tell the user the result, you need to attach a conversation node to the function node. You can create different conversation nodes for different function results, so that it can engage the user in different ways when function result varies. 4. Debugging tips - Review your transition conditions to ensure they precisely match your intended triggers [(2) ]() - Add transition finetune examples to help the model understand your expectations - Check if the LLM is failing to recognize the trigger condition [(3) ]() If transitions still aren't working, try making your transition conditions more flexible and general. [(2) ]()
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[3] Discord message from @jakeslaps on 2025-02-05](https://discord.com/channels/1186424376300679209/1186462578310910112/1336700494097154190) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do I attach a conversation node or transition to one based on a condition being true? could it be becaus eim returning booleans and it expects strings/
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You need to attach a conversation node after your function node and use transition conditions to route to different nodes based on the function result. [(1) ]() Regarding your boolean return values: For equation-based transition conditions, the comparison operators work as follows: [(2) ]() -
==
,
Contains
,
Not Contains
, and
Not Equal
are string comparisons — they do not require numerical input - Other comparison operators (
>
,
<
, etc.) require numerical input and will always evaluate to false if the input is not a number So if you're returning booleans and trying to use them in equation conditions, you may need to: 1. Return strings instead (e.g.,
"true"
or
"false"
) and use string comparison:
Copy code
{{result}} == "true"
2. Use prompt-based conditions instead of equations — these let the LLM evaluate the condition based on context. Example prompt conditions: -
CRM lookup returned successful result
-
Function returned a positive result
Transition setup from function nodes: You can write transition conditions based on the function result. Create different conversation nodes for different function results so the agent can engage users differently depending on what the function returns. [(1) ]() If your condition logic is based on dynamic variables from the function result, use equation conditions. If you need the LLM to interpret the result semantically, use prompt conditions. [(2) ]()
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy here is my tool result. {"ai_enabled":"true","clinic_id":"zon_clinic","agent_name":"DevMediniAgent"} and my function condition is ai_enabled = "true". any idea why it isnt transitioning?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The issue is that equation conditions require the value to be stored as a dynamic variable first—you can only use variables that are passed in as dynamic variables for equation conditions. [(1) ]() Your function is returning
{"ai_enabled":"true",...}
, but for an equation condition like
{{ai_enabled}} == "true"
to work,
ai_enabled
needs to exist as a dynamic variable that the equation can reference. Two options to fix this: 1. Use a prompt-based condition instead of an equation — Prompt conditions can evaluate information learned during the call (like function results) without needing it stored as a dynamic variable first. Example: -
Function returned ai_enabled as true
-
The function result indicates AI is enabled
2. Extract the function result into a dynamic variable — Use an Extract DV Node after your function node to store
ai_enabled
as a dynamic variable, then your equation condition
{{ai_enabled}} == "true"
should work. [(2) ]() The key distinction: equation conditions only work with variables passed in as dynamic variables, while prompt conditions can reference information extracted by the LLM during the call. [(1) ]()
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy do I need to extract it before the function is called or after though? because if i do it after then wont it not have it for when it needs it
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You need to extract it after the function is called. The flow should be: *Function Node → Extract DV Node → Next Node (with equation condition) * The transition timing works like this: when the function node has
wait for result
turned on, the agent will transition once the function result is ready. [(1) ]() So the sequence is: 1. Function node executes and returns
{"ai_enabled":"true",...}
2. Transition to an Extract DV Node (you can use a simple prompt condition like "when function completes") 3. The Extract DV Node extracts
ai_enabled
from the conversation context and stores it as a dynamic variable [(2) ]() 4. Transition from the Extract DV Node to your next node using the equation condition
{{ai_enabled}} == "true"
[(3) ]() The function result is included in the agent's context, so the Extract DV Node can access it. [(4) ]() You're not extracting it before the function runs—you're extracting it from the result that's now in context after the function completes. Alternatively, if you want to skip the extra node, use a prompt-based condition directly on the function node instead of an equation. Prompt conditions can evaluate information learned during the call (like function results) without needing it stored as a dynamic variable first. [(3) ]()
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[4] Discord message from @estomes on 2025-07-20](https://discord.com/channels/1186424376300679209/1186462578310910112/1396548157999157410) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy i did what you said but now it is just sitting at the extract variable node and not transitioning on the conditions
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer This is a known issue with Extract DV Nodes and equation-based transitions. The problem occurs when equation conditions evaluate before the variable is fully extracted. [(1) ]() [(2) ]() Why this happens: Extract DV Nodes can transition before actually extracting variables. When you use
{{variable}} exists
directly after extraction, the condition may evaluate before the variable populates, causing the node to get stuck or loop. [(2) ]() Recommended fix — use a Logic Split Node: Instead of putting equation conditions directly on your Extract DV Node: 1. Extract DV Node → transition with a simple prompt condition (e.g., "when extraction is complete" or no condition) 2. Logic Split Node → place your equation conditions here (e.g.,
{{ai_enabled}} == "true"
) 3. Route from the Logic Split Node to your different destination nodes The Logic Split Node transitions immediately and evaluates without waiting for user input, which breaks the stuck/loop pattern. Alternative: Community feedback suggests that if you imported your agent from a sample template, the sample may have incorrect configuration that causes this behavior. Try creating a new agent from scratch rather than modifying an imported one. [(1) ]()
​ To learn more, see the sources I considered: [[1] extract variable node transition](https://discord.com/channels/1186424376300679209/1393706083108786357) [[2] need help looping](https://discord.com/channels/1186424376300679209/1440485344951664650) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
for the extract DV ndoe should I be using {{ or }} when tyoing in it? also, im usign an extract node in a conversation flow @AI Evy
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- For the Extract Dynamic Variable Node itself, you do not use
{{
or
}}
when configuring the variable. [(1) ]() When creating a variable in the Extract DV Node, you fill in: - Variable Name – A short name to reference this variable (e.g.,
ai_enabled
) - Description – A brief explanation of what this value should be - Variable Type – Choose from
Text
,
Number
,
Enum
, or
Boolean
The
{{ }}
syntax is used **elsewhere**—specifically in transition conditions (equation type) or when referencing the variable in prompts, custom functions, or other nodes after extraction. [(2) ]() Example: - In the Extract DV Node: just enter
ai_enabled
as the variable name (no brackets) - In a transition condition (equation) : use
{{ai_enabled}} == "true"
- In a custom function parameter: use
{{ai_enabled}}
to reference the extracted value [(3) ]() Important note from community feedback: When referencing variables in custom functions, use the variable name directly like
{{make}}
, not dot notation like
{{scheduling_info_extraction.make}}
.
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[3] Extracted Dynamic Variables not sending through custom function in Conversation Flow Prompt](https://discord.com/channels/1186424376300679209/1442542149546803312) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy will the agent keep the variables it gets from the fucntion node in memory or do I need to extract them from the function node
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The function result is kept in the agent's **conversation context/memory**—the LLM can reference it for prompt-based conditions and responses. [(1) ]() However, if you need to use the value in equation-based transition conditions (like
{{ai_enabled}} == "true"
) , you must extract it into a dynamic variable first using an Extract DV Node. [(2) ]() In short: - For prompt-based conditions or speaking the result: The agent remembers the function result—no extraction needed - For equation conditions: You need to extract the value into a dynamic variable, because equation conditions only work with variables passed in or explicitly stored as dynamic variables So it depends on how you want to use the data. If you're routing based on equation logic, extract it. If you're just having the agent respond based on the result or using prompt conditions, the context is already available.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[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.
p
@AI Evy can you show me the conditions that I can use in the function node comparisons for the api, like what the symbols would be. eg greater then, equals, exists, does not exist, etc
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Here are the equation condition operators you can use for transition conditions in conversation flow: [(1) ]() Comparison Operators: -
>
— greater than (requires numerical input) -
<
— less than (requires numerical input) -
==
— equals (string comparison, does not require numerical input) -
!=
— not equal (string comparison) String Operators: -
CONTAINS
— checks if a string contains a value -
NOT CONTAINS
— checks if a string does not contain a value Existence Operators: -
exists
— returns true if the variable is defined and has a value -
does not exists
— returns true if the variable is undefined or has no value Logical Operators: -
AND
— both conditions must be true -
OR
— at least one condition must be true Example syntax:
Copy code
{{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"
{{name}} exists
{{user_email}} exists
{{user_phone}} not exists
Important: The
==
,
Contains
,
Not Contains
, and
Not Equal
operators are **string comparisons**—they do not require numerical input. The other comparison operators (
>
,
<
) require numerical input and will always evaluate to false if the input is not a number.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy any way to guarantee the agent doesnt talk on a transfer node?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes—the Call Transfer Node is designed so that the agent will not speak when it's in this node. [(1) ]() If you want the agent to say something like "Let me transfer you right away" before the transfer happens, put a Conversation Node (with
skip response
turned on) before the Call Transfer Node. This setup ensures: 1. The Conversation Node handles any pre-transfer message 2. The Call Transfer Node executes silently
​ To learn more, see the sources I considered: [[1] Call Transfer Node](https://docs.retellai.com/build/conversation-flow/call-transfer-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I turn on and off speak during execution in the transfer node through the api
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The Call Transfer Node supports Speak During Execution as a configurable setting. [(1) ]() When enabled, a text input box appears where you can write instructions for the agent to follow to generate an utterance like
Let me check that for you.
to say while the function is being executed. You can choose between
Prompt
and
Static Sentence
. However, the available sources don't include the specific API field names or parameters for enabling/disabling "Speak During Execution" on a transfer node programmatically. The documentation describes the dashboard UI behavior but doesn't show the corresponding API schema. Check out these potentially useful sources for API details: - [Call Transfer Node]() - [Agent Transfer Node]() You may also want to check the API reference documentation for conversation flow nodes, or I could try to provide a general answer based on common API patterns if you'd like.
​ To learn more, see the sources I considered: [[1] Call Transfer Node](https://docs.retellai.com/build/conversation-flow/call-transfer-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy does transfer work in test chat or no it wont call?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer No—the Call Transfer Node only works during phone calls instead of web calls. [(1) ]() Test Chat is a web-based testing tool, so transfer functionality won't actually execute a call transfer there. To test transfers, you need to make an actual phone call. [(2) ]() Also keep in mind: when using Test Chat, you're testing the last version with all your edits, but when you make an actual call, you're talking to the last published version. Make sure to publish your agent after editing before testing transfers on real calls. [(3) ]()
​ To learn more, see the sources I considered: [[1] Call Transfer Node](https://docs.retellai.com/build/conversation-flow/call-transfer-node) [[2] Discord message from @emanuelkr on 2025-04-10](https://discord.com/channels/1186424376300679209/1186462578310910112/1359898516184371243) [[3] "Test Chat" functions entirely differently from actual call](https://discord.com/channels/1186424376300679209/1405212619840819302) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I allow a convo node to call a function whenever it needs it? and how do I do this through the API?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer In Conversation Flow, conversation nodes themselves don't directly call functions—you need to use a Function Node for that. [(1) ]() The agent transitions from a conversation node to a function node when the transition condition is met. Setup in Dashboard: 1. Add a Function Node after your conversation node 2. Configure the function in the Function Node (select from your pre-configured custom functions) [(2) ]() 3. Set up transition conditions from the conversation node to the function node [(1) ]() 4. The transition condition determines when the agent moves to execute the function For API configuration: The available sources don't include the specific API schema for configuring function nodes or their transition conditions programmatically. The documentation covers dashboard setup [(2) ]() [(1) ]() but doesn't show the corresponding API field names. Check out these potentially useful sources: - [Custom Function]() - [Node Overview]() Would you like a general answer based on common API patterns for conversation flow configuration?
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy is it the same for multiptompt?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- No, multi-prompt agents handle function calling differently than conversation flow. In multi-prompt (single/multi-state) agents, you configure tools directly within the agent's states rather than using separate function nodes. [(1) ]() The LLM decides when a function is needed based on conversation context, extracts the required parameters, and Retell calls your function. Key differences: - **Multi-prompt agents**: Tools are defined in
general_tools
(available across all states) or within specific
states[].tools
arrays. [(2) ]() The LLM autonomously decides when to call functions based on the prompt and conversation flow. - **Conversation flow agents**: You explicitly control when functions execute by creating dedicated Function Nodes and defining transition conditions to reach them. For multi-prompt agents via API, you configure tools like this in the LLM object:
Copy code
json
"general_tools": [
  {
    "type": "end_call",
    "name": "end_call",
    "description": "End the call with user."
  }
]
State-specific tools go in the
states[].tools
array, and state transitions are defined via
edges
within each state.
​ To learn more, see the sources I considered: [[1] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[2] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can multiprompt agents have function nodes or just convo agents?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- **Function Nodes are only available in Conversation Flow agents**—not in multi-prompt (single/multi-state) agents. [(1) ]() Nodes (including Function Nodes, Conversation Nodes, Logic Split Nodes, etc.) are the building blocks specifically of Conversation Flow agents. [(2) ]() [(1) ]() Multi-prompt agents handle functions differently: you define tools directly in the agent's prompt configuration (via
general_tools
or state-specific
tools
arrays) , and the LLM decides when to call them based on conversation context. [(3) ]() You specify explicit tool calling instructions in your prompt to guide when functions should be triggered. Summary: - Conversation Flow agents → use Function Nodes (and other node types) - Multi-prompt agents → define tools in prompts; no nodes involved
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy can the conversation agent decide what the inputs to the function at the function node are?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes—the LLM generates the function arguments based on the conversation context. [(1) ]() When you define parameters for a custom function, you provide a description for each parameter, and the LLM uses that description to extract/generate the appropriate values from the conversation. [(2) ]() How it works: 1. You define the parameter schema with descriptions in your function configuration 2. When the Function Node is entered, the LLM generates the arguments based on conversation context and your parameter descriptions [(1) ]() 3. Retell sends the request to your endpoint with the
args
field containing the LLM-generated arguments [(2) ]() You can also use const values for fixed inputs: In your parameter schema, you can set
"const"
to hardcode a value (including dynamic variables) instead of having the LLM decide:
Copy code
json
{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "number",
      "const": 1234
    },
    "last_name": {
      "type": "string",
      "const": "{{last_name}}"
    },
    "first_name": {
      "type": "string",
      "description": "User first name"
    }
  }
}
In this example: -
order_id
is always
1234
(const) -
last_name
uses a dynamic variable (const) -
first_name
is resolved by the LLM based on the description For query parameters, there's also a switch to toggle between description (LLM-resolved) and const value (applied directly) .
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy what if I want my agent to check for availability in someones calendar at a function node, and then keep doing that until it finds an opening. How do I have it loop back 1 node to repeat the process instead of building the same function node over and over?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You can create a loop by connecting a node back to a previous node using edges. [(1) ]() How to set it up: 1. Create your Function Node that calls the calendar availability check 2. Add a Conversation Node after it to handle the result (e.g., ask the user for a different time if no availability) 3. Add transition conditions from the conversation node: - One condition routes to the next step when availability is found - Another condition routes back to the Function Node to repeat the check [(2) ]() To connect nodes in a loop: Click and hold the circle at the bottom of a node to start a line that connects the node to other nodes—including nodes that come before it in the flow. [(1) ]() Example flow:
Copy code
[Conversation Node: Ask for preferred time] 
        ↓
[Function Node: Check calendar availability]
        ↓
[Conversation Node: Handle result]
        ↓ (no availability found) → loops back to ask for new time
        ↓ (availability found) → proceed to booking
Use equation conditions based on the function result (stored as a dynamic variable) or prompt conditions to determine whether to loop back or proceed. [(2) ]()
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy function nodes are just for functions, I use a conversation node if I want the agent to decide between a yes or no and route to different nodes for yes and no?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[2] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Yes, that's correct. [(1) ]() Conversation Nodes handle dialogue and user interactions—you write the instruction for what the agent should say/ask, and then define transition conditions to route to different nodes based on what the user responds. [(2) ]() For a yes/no scenario: 1. Create a Conversation Node that asks the question 2. Add transition conditions on that node—for example: [(3) ]() - Prompt condition:
User said yes
→ routes to Node A - Prompt condition:
User said no
→ routes to Node B The transition happens when the user is done speaking, and the LLM evaluates which condition is met. [(2) ]() [(3) ]() Function Nodes are specifically for executing custom functions and API calls—they don't handle conversational branching based on user responses. [(1) ]() Quick summary: - Conversation Node → dialogue + routing based on user responses - Function Node → execute actions/API calls
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
@AI Evy how do I force the conversation flow agent to collect info, it seems to transition to the next node right away without tryign to gather the info it needs
a
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Conversation Flow Agent Not Staying in Node Order](https://discord.com/channels/1186424376300679209/1356715885804392699) [[3] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
### Answer The key is to write transition conditions that only trigger when the required information has been collected. [(1) ]() How to fix this: 1. Write specific transition conditions that explicitly require the information to be gathered before transitioning. For example: -
User responds to question of their age
-
User said something about booking a meeting
-
User has provided their name and phone number
2. Cover all possible cases in your transition conditions to ensure smooth flow and prevent the agent from getting stuck or transitioning prematurely. 3. Use equation conditions to check if dynamic variables exist before transitioning:
Copy code
{{name}} exists
   {{user_email}} exists
   {{user_phone}} not exists
4. Update your node instruction and global prompt to focus on the specific task. One community member had a similar issue and resolved it by changing the global prompt so the agent's mission was to "work through each node" rather than broadly "collect customer details"—and making transitions more specific. [(2) ]() 5. Add fine-tune examples if you observe incorrect transitions—you can add transition finetune examples to help the model learn when transitions should and shouldn't happen. [(1) ]() Important: The transition happens after the user is done speaking, and the LLM evaluates which condition is met. [(3) ]() If your condition is too vague, the LLM may determine it's satisfied before you intended.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
for "Use equation conditions to check if dynamic variables exist before transitioning: " do I put {{name}} exists in the transition conditions or in the prompt?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
@AI Evy for "Use equation conditions to check if dynamic variables exist before transitioning: " do I put {{name}} exists in the transition conditions or in the prompt?
a
### Answer You put
{{name}} exists
in the transition conditions, not in the prompt. [(1) ]() Specifically, you select Equation as the transition condition type (not Prompt) . Example equation conditions for checking if dynamic variables exist:
Copy code
{{variable_name}} exists
{{variable_name}} does not exists
{{user_email}} exists
{{user_phone}} not exists
This returns true if the variable is defined and has a value, which is useful for ensuring information has been collected before transitioning. Note: You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM during the call (like a name the user just provided) , you would need to use a prompt condition instead—for example:
User has provided their name
.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy my function was called with "previous node: warm_intro new node: verify patient Debug Tool Invocation: verifypatient tool_call_id: tool_call_00db9e {} Tool Result tool_call_id: tool_call_00db9e Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"success":false,"code":"1","error":"2","verified":false},"MISSING_PARAMS","Provide phone and/or (first_name + last_name + dob)"]" does this mean no parameters were sent to the function? how do I make the agent send parameters?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, the
{}
in your debug output indicates no parameters were sent to your function. [(1) ]() To make the agent send parameters, you need to define them in your function's parameter schema. When you configure a custom function, you define parameters using JSON schema format. For each parameter, you provide a description that tells the LLM what information to extract from the conversation. Example parameter schema for your use case:
Copy code
json
{
  "type": "object",
  "required": [
    "phone",
    "first_name",
    "last_name",
    "dob"
  ],
  "properties": {
    "phone": {
      "type": "string",
      "description": "Patient's phone number"
    },
    "first_name": {
      "type": "string",
      "description": "Patient's first name"
    },
    "last_name": {
      "type": "string",
      "description": "Patient's last name"
    },
    "dob": {
      "type": "string",
      "description": "Patient's date of birth"
    }
  }
}
Key points: - Make sure
"type": "object"
is at the top level of your JSON schema—this is a common mistake that causes save failures - The LLM uses the
description
field to extract/generate values from the conversation [(2) ]() - You can also use
"const"
for fixed values or dynamic variables like
"const": "{{patient_phone}}"
[(1) ]() Also check: Before the function node is called, ensure the conversation has actually collected the required information. If the agent transitions to the function node before gathering patient details, the LLM won't have anything to extract.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy when the agent calls the backend how is the parameters it sends formated? is it in args or something?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, the parameters are sent in the
args
field of the request body. [(1) ]() When Retell calls your custom function endpoint (for POST, PUT, and PATCH requests) , the request body is in JSON format and includes: - `name`: the name of the custom function - `call`: the call object with context about the call, including real-time transcript up to when the request is sent - `args`: the arguments for the custom function, as a JSON object So if your function expects
phone
,
first_name
,
last_name
, and
dob
, you would access them from
args
in your backend code. For example, in the request body you'd receive something like:
Copy code
json
{
  "name": "verifypatient",
  "call": { ... },
  "args": {
    "phone": "555-1234",
    "first_name": "John",
    "last_name": "Doe",
    "dob": "1990-01-15"
  }
}
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @punk8357. I'll get back to you soon.
p
@AI Evy does the agent have info on what the next node is for? if I make its transition condition an equation instead of explaining where to go and why how will it know which node to go to next?
a
### Answer The agent doesn't need to "know" what the next node is for—**the transition condition determines which node to go to, not the agent's understanding of it**. [(1) ]() How it works: - Each transition condition (whether prompt or equation) has a
destination_node_id
that specifies exactly where to go when that condition is met [(1) ]() [(2) ]() - For equation conditions, they are evaluated from top to bottom, and the agent travels on the first condition that evaluates to true [(1) ]() - The agent doesn't interpret the purpose of the destination node—it simply follows the path when the condition is satisfied Example from the API:
Copy code
json
{
  "edges": [
    {
      "id": "edge_1",
      "transition_condition": {
        "type": "prompt",
        "prompt": "Customer wants to book appointment"
      },
      "destination_node_id": "book_appointment"
    }
  ]
}
[(2) ]() So if you use an equation like
{{user_age}} > 18
, the agent doesn't need to understand why it's going to the next node—it just goes there when the equation evaluates to true. The routing is hardcoded by the
destination_node_id
, not decided by the LLM. [(1) ]() Key distinction: - **Prompt conditions**: LLM evaluates whether the condition is met based on conversation context - **Equation conditions**: Hardcoded mathematical/logical evaluation—no LLM interpretation needed
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy im using the equations for transition condition now, and the AI asked all the questions so it should have the variables as existing. but its not moving past that node. Do I need to set the variables in advance that are in the equation as dynamic variables some how?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- Yes—**equation conditions can only use variables that are passed in as dynamic variables**, not information the LLM extracts during the conversation. [(1) ]() The documentation states: > Note: You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM (such as information learned during the call) , you can use prompt conditions. This is the key distinction: - Dynamic variables are values you pass in before or at the start of the call (via the API's
retell_llm_dynamic_variables
field for outbound calls, or via the inbound webhook) . [(2) ]() - Information the agent collects during the conversation (like a name the user just provided) is not automatically stored as a dynamic variable that equation conditions can check. What to do instead: 1. Use prompt conditions for information gathered during the call—for example:
User has provided their name and phone number
[(1) ]() 2. Use equation conditions only for variables you've pre-populated before the call starts, or for system default variables like
{{current_time}}
,
{{direction}}
,
{{user_number}}
, etc. [(2) ]() A community member experienced this exact issue—the equation
{{status}} exists
wasn't working because the variable wasn't a pre-set dynamic variable. The node was waiting for a user response before transitioning. [(3) ]() Summary: Switch your transition conditions from equations to prompt conditions if you're checking for information the LLM collected
during the conversation.
​ 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] Issues with transitions - getting stuck on Conversation and Logic Split Nodes using dynamic variable](https://discord.com/channels/1186424376300679209/1437030319541719172) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
Can I create the variables at the beginning of the call and then the agent will set them or no they need values in advance too @AI Evy ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- No—dynamic variables need values passed in at the start of the call; the agent cannot "set" them during the conversation for use in equation conditions. [(1) ]() [(2) ]() How dynamic variables work: - For **outbound calls**: You set values in the
retell_llm_dynamic_variables
field when calling the Create Phone Call API [(1) ]() - For **inbound calls**: You supply them via the Inbound Call Webhook The key limitation: You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM (such as information learned during the call) , you can use prompt conditions. [(2) ]() What this means for your use case: If you want to check whether the agent has collected information (like a name, phone, DOB) during the conversation, you cannot use equation conditions like
{{name}} exists
. Instead, use prompt conditions such as: -
User has provided their name
-
User has provided their phone number and date of birth
The LLM will evaluate whether that information has been gathered based on the conversation context. Summary: - Equation conditions → only for pre-set dynamic variables or system defaults like
{{current_time}}
,
{{user_number}}
, etc. [(1) ]() - Prompt conditions → for information the agent collects during the call [(2) ]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
so how do I guarantee the AI collected the info i need to call my functions then if i can only use prompt conditions not equation conditions @AI Evy ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To guarantee the AI has collected the required info before calling your function, write specific, explicit prompt conditions that clearly describe what information must be gathered. [(1) ]() Best practices for prompt conditions: 1. Be explicit about what's needed — write conditions like: -
User has provided their first name, last name, date of birth, and phone number
-
User responds to question of their age
-
User said something about booking a meeting
2. Cover all possible cases in your transition conditions to ensure smooth flow and prevent the agent from transitioning prematurely. 3. Add transition finetune examples — if you observe the agent transitioning before collecting all info, you can add finetune examples showing the expected behavior. One community member had this exact issue where the caller provided their name upfront, causing the flow to stall. The solution was to use transition finetune examples showing that when certain info is already provided, the agent should still proceed correctly. [(2) ]() Additionally, you can use "Extract Variables in Real Time" — this feature lets agents extract and store dynamic variables mid-conversation with reliably and accurately retrieved information. Your agents can automatically save names, emails, budgets, and preferences, then reference collected data anytime during the call. [(3) ]() Summary approach: - Use detailed prompt conditions like
User has provided their phone number AND (first name AND last name AND date of birth)
- Add finetune examples if the agent transitions incorrectly - Consider using real-time variable extraction to store collected info
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Stucks in conversation node](https://discord.com/channels/1186424376300679209/1462438307588739103) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy how do I use "Extract Variables in Real Time" ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer To extract variables in real time, use the Extract Dynamic Variable Node in your Conversation Flow agent. [(1) ]() How to set it up: 1. Add an Extract Dynamic Variable Node to your conversation flow 2. For each variable, fill in: - 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
- Enum Options – Options to choose from (only when type is enum) Variable types you can collect: [(1) ]() [(2) ]() - **Text**: Names, addresses, feedback - **Numbers**: Ages, quantities, prices - **Boolean**: Yes/no decisions, preferences - **Enum**: Predefined lists (services, products, etc.) What this enables: [(2) ]() - ✅ Automatically save names, emails, budgets, and preferences - ✅ Reference collected data anytime during the call - ✅ Pass dynamic variables to webhooks, CRMs, or integrations - ✅ Personalize workflows in real time This works in single, multi-prompt, and conversation flow agents. Important notes from the community: [(3) ]() [(4) ]() - Make sure "Wait for result" is enabled in Transition timing - When using transitions from this node, ensure variables are referenced with double curly braces like
{{variable_name}}
- Keep variable descriptions clear and concise See the full documentation: [E
xtract Dynamic Variable Node]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) [[3] "Extract Variable" moudle is not working correctly.](https://discord.com/channels/1186424376300679209/1463160448902889513) [[4] extract variable](https://discord.com/channels/1186424376300679209/1414908562999742515) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
when the agent gets to the EDV node will it ask questins to get the info or only put the info in variables if its available from call info @AI Evy ?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer The Extract Dynamic Variable Node **only extracts information from the existing conversation**—it does not ask questions to gather the info. [(1) ]() The documentation states: "Extract dynamic variable node is used to extract information from conversation and store them as dynamic variable. **It's not intended for having a conversation with the user.**" What this means for your flow: If you need the agent to ask questions first, you should: 1. Use a Conversation Node before the Extract Dynamic Variable Node to gather the required information through dialogue 2. Then use the Extract Dynamic Variable Node to pull that collected information from the conversation transcript and store it as variables The EDV node looks at what's already been said in the call and extracts values based on the variable descriptions you provide—it won't prompt the user for missing information. [(1) ]() [(2) ]() Recommended flow structure: - Conversation Node (asks for name, DOB, phone, etc.) - Extract Dynamic Variable Node (extracts and stores those values) - Function Node (uses the extracted variables)
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy so what is the poiint of EDV nodes then? is the agent more likely to give the right info to my function nodes if the variables it extracts matches the function inputs?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer --- The main point of Extract Dynamic Variable (EDV) nodes is to reliably capture and store specific values from the conversation so you can use them later—including in function nodes. [(1) ]() Why this matters for your function calls: 1. You can pass extracted variables directly to function parameters using
{{variable_name}}
syntax in the
const
field of your function's parameter schema. [(2) ]() Example:
Copy code
json
{
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string",
      "const": "{{first_name}}"
    },
    "last_name": {
      "type": "string",
      "const": "{{last_name}}"
    }
  }
}
2. This is more reliable than relying on the LLM to extract values at function-call time. When you use EDV nodes first, the variables are explicitly stored. Then in your function node, you reference them with
const
values—the LLM doesn't have to re-interpret the conversation to fill those parameters. 3. You can also set response variables from your function to store API response data for use later in the flow. Common issue to avoid: When referencing extracted variables in function parameters, use the variable name directly like `{{variable_name}}`—not nested paths like
{{extraction_node.variable_name}}
. [(3) ]() [(4) ]() Summary: EDV nodes give you explicit control over what gets captured and stored, making your function calls more predictable and reliable than having the LLM infer parameter values on the fly.
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Extracted Dynamic Variables not sending through custom function in Conversation Flow Prompt](https://discord.com/channels/1186424376300679209/1442542149546803312) [[4] Dynamic Variable is not sending via custom function.](https://discord.com/channels/1186424376300679209/1430715756030722149) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy my agent wont transition to the next node, what is wrong? heres the prompt "Step (B2-B2-B4): Collect params: verify patient Ask the caller their Patient's phone number for variable phone. Ask the caller their Patient's first name for variable first_name. Ask the caller their Patient's last name for variable last_name. Ask the caller their Patient's date of birth (ask naturally, then format as YYYY-MM-DD) for variable dob." and transiition conditin is "If the conversation should follow branch B1 (option #1), transition to "verify patient"."
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Your transition condition is too vague and self-referential. The LLM doesn't understand what "branch B1 (option #1) " means—it needs to evaluate something concrete from the conversation. [(1) ]() The problem: Your condition
"If the conversation should follow branch B1..."
doesn't describe what the user actually said or what information was collected. How to fix it: Write conditions that clearly describe what must happen in the conversation. Examples of good prompt conditions: -
User has provided their phone number, first name, last name, and date of birth
-
User responds to question of their age
-
User said something about booking a meeting
Recommended approach for your case: Change your transition condition to something like: -
User has provided the patient's phone number, first name, last name, and date of birth
Or if you want to ensure all four pieces of info are collected: -
User has answered all questions about the patient's phone, first name, last name, and date of birth
Additional tips: [(1) ]() [(2) ]() - Make sure your prompt is concise and declarative - Match actual language patterns the user would say - Focus only on the content of `transition_condition.prompt`—the
condition
field is not used by the LLM to trigger transitions [(2) ]() If you've observed incorrect transitions, you can also add transition finetune examples to improve behavior. [(1) ]()
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Transition condition in Conversation flow agent](https://discord.com/channels/1186424376300679209/1389012084276334724) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy is it possible to make a retell agent handle text messages?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer Yes, Retell AI agents can handle text messages through SMS and chatbot functionality. [(1) ]() Two ways to use SMS with Retell agents: 1. SMS nodes within voice agents — Trigger outbound or follow-up texts during or after a call 2. Standalone SMS/Chat agents — Fully automated text-based conversations with no voice required To create a standalone SMS/Chat agent: - Open the Retell Agent Builder - Select "Create an Agent" and choose Chat Agent - Build your prompting or conversation flow just like voice agents - Use variables like
{{first_name}}
,
{{email}}
, etc. to personalize messages To send outbound SMS programmatically, use the Create Outbound SMS API: [(2) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.createSMSChat({
 from_number: '+12137771234',
 to_number: '+14155551234',
}) ;
console.log(chatResponse.agent_id) ;
Note: You can use your existing voice number to send SMS (local, toll-free, or branded) —no additional SMS provider setup is required. [(1) ]() However, you'll need A2P registration sorted out for SMS compliance. [(3) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[2] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) [[3] Discord message from @artiombic on 2025-08-28](https://discord.com/channels/1186424376300679209/1186462578310910112/1410598525259092059) ​
p
@AI Evy what about whatsapp is that easier?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer I don't have information about WhatsApp integration in the available sources. The documentation covers SMS and chat functionality, but doesn't mention WhatsApp specifically. [(1) ]() [(2) ]() [(3) ]() Retell currently supports: - SMS via Twilio integration (requires A2P registration for compliance) [(1) ]() - Chat via API and web widgets [(2) ]() Check out these potentially useful sources: - [Create Outbound SMS]() - [Create Chat Completion]() - [Documentation]() Would you like me to try to answer generally based on my knowledge, or would you prefer to reach out to Retell support directly for WhatsApp-specific questions?
​ To learn more, see the sources I considered: [[1] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) [[2] Create Chat Completion](https://docs.retellai.com/deploy/create-chat-completion) [[3] Inside Retell AI | The Conversational AI Platform Behind Scalable AI Phone Systems | Retell AI](https://www.retellai.com/blog/inside-retell-ai-conversational-ai-phone-system) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.