punk8357
01/29/2026, 12:47 AMAI Evy
01/29/2026, 12:47 AMAI Evy
01/29/2026, 12:48 AMAI Evy
01/29/2026, 12:48 AMnodes array accepts different node types, including function nodes. [(2) ]() [(1) ]()
Here's the general approach using the JavaScript SDK:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
[(3) ]()
You would then call the update endpoint with your nodes array that includes a function node. The nodes parameter accepts multiple node type options. [(1) ]()
Important note: Based on community feedback, when creating tools/functions, you may need to use the Update Conversation Flow API rather than the Create endpoint, as the tools parameter on create may not work as expected. [(4) ]()
Available node types include: [(2) ]()
- **Function Node**: Execute custom functions and API calls
- **Conversation Node**: Handle dialogue and user interactions
- **Extract DV Node**: Extract and store dynamic variables
- SMS Node, MCP Node, Call Transfer Node, End Node, Logic Split Node, etc.
For the specific function node schema and required fields, I recommend checking the full API reference at [Update Conversation Flow]() . [(1) ]()AI Evy
01/29/2026, 12:48 AMpunk8357
01/29/2026, 1:19 AMAI Evy
01/29/2026, 1:19 AMAI Evy
01/29/2026, 1:19 AMAI Evy
01/29/2026, 1:19 AMnodes array has an id, type, and instruction.
Creating Branches/Children (Edges) :
Edges connect nodes and define transition conditions between them. [(2) ]() You add an edges array within a node to specify where it can transition to. [(1) ]()
Here's an example showing how to create nodes with branches:
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',
}) ;
To add edges (branches) to a node, include the edges property with transition conditions:
javascript
{
"id": "start",
"type": "conversation",
"instruction": {
"type": "prompt",
"text": "Greet the customer and ask how you can help them."
},
"edges": [
{
"id": "edge_1",
"transition_condition": {
"type": "prompt",
"prompt": "Customer wants to book appointment"
},
"destination_node_id": "book_appointment"
}
]
}AI Evy
01/29/2026, 1:19 AMdestination_node_id in an edge points to the child/branch node [(1) ]()
- For conditional branching, you can use a Logic Split Node which evaluates conditions and branches to corresponding destination nodes [(4) ]()AI Evy
01/29/2026, 1:19 AMpunk8357
01/29/2026, 1:30 AMAI Evy
01/29/2026, 1:30 AMAI Evy
01/29/2026, 1:30 AMbegin_tag_display_position property. [(1) ]()
This property accepts x and y coordinates to control where elements appear in the dashboard:
json
"begin_tag_display_position": {
"x": 100,
"y": 200
}
The begin_tag_display_position is available when creating or updating conversation flows and components. , [(2) ]() , [(3) ]()
Additionally, if your nodes become cluttered after adding many of them, the Retell dashboard has an Organize button that automatically arranges nodes for better visibility. [(4) ]()AI Evy
01/29/2026, 1:30 AMAI Evy
01/29/2026, 1:30 AMpunk8357
01/29/2026, 1:34 AMAI Evy
01/29/2026, 1:34 AMAI Evy
01/29/2026, 1:34 AMAI Evy
01/29/2026, 1:34 AMx and y coordinates in begin_tag_display_position. [(1) ]()
The API reference only shows an example with values like "x": 100 and "y": 200, but does not document any constraints or valid ranges for these coordinates.
You may need to experiment with values or reach out to Retell support for specific limits. Would you like me to try to answer generally based on typical coordinate system behavior, or would you prefer to check with Retell directly?
Check out these potentially useful sources:
- [Create Conversation Flow]()
- [Create Conversation Flow Component]()
- [Contact Sales]()AI Evy
01/29/2026, 1:34 AMAI Evy
01/29/2026, 1:35 AMpunk8357
01/29/2026, 1:35 AMAI Evy
01/29/2026, 1:36 AMOrganize button to automatically arrange and organize the nodes for better visibility.
The documentation mentions this feature under the "Organize Nodes" section but does not specify the exact location of the button in the UI. Based on the context, it should be accessible somewhere on the conversation flow canvas/editor interface within the Dashboard.AI Evy
01/29/2026, 1:36 AMAI Evy
01/29/2026, 1:36 AMpunk8357
01/29/2026, 9:09 PMAI Evy
01/29/2026, 9:09 PMAI Evy
01/29/2026, 9:10 PMagent_id in different ways depending on the type of webhook or tool call:
Call Event Webhooks (call_started, call_ended, call_analyzed) :
The webhook payload includes the full call object which contains the agent_id. [(1) ]()
Sample payload structure:
json
{
"event": "call_ended",
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
...
}
}
LLM WebSocket (Custom LLM Tool Calls) :
You can receive call details including agent_id by enabling it in the config event. The call_details event will be sent if configured. [(2) ]()
The call details event includes:
- call_id
- agent_id
- from_number, to_number
- metadata
- retell_llm_dynamic_variables
Inbound Webhook:
The inbound webhook payload includes agent_id if the number has an inbound agent id set. [(3) ]()
So for tool calls specifically via the LLM WebSocket, you need to enable call_details in your config event to receive the agent_id at the start of the connection—it's not sent with every individual tool invocation request, but once at connection start. [(2) ]()AI Evy
01/29/2026, 9:10 PMAI Evy
01/29/2026, 9:10 PM