jrok1308
10/18/2025, 9:24 PMAI Evy
10/18/2025, 9:24 PMAI Evy
10/18/2025, 9:24 PMAsk if user is interested in an in person tour.
- if yes, transition to schedule_tour.
- if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
2. Use specific phrases to trigger transitions
Community members have found success by adding more explicit language in their prompts to ensure reliable state transitions [(2) ]() . One approach is to make the transition instructions more emphatic:
Wait for the user response:
If positive response: Immediately and reliably initiate the transfer. You must invoke the transfer_call_six function at this point without fail. This is critical and non-negotiable. There must be no delay or hesitation.AI Evy
10/18/2025, 9:24 PMAI Evy
10/18/2025, 9:24 PMAI Evy
10/18/2025, 9:24 PMjrok1308
11/02/2025, 9:52 PMjrok1308
11/02/2025, 9:53 PMAI Evy
11/02/2025, 9:53 PMAI Evy
11/02/2025, 9:53 PMAI Evy
11/02/2025, 9:53 PMAI Evy
11/02/2025, 9:53 PMjrok1308
11/02/2025, 11:35 PMAI Evy
11/02/2025, 11:35 PMAI Evy
11/02/2025, 11:35 PMexample.com and app.example.com .
For your specific case, try:
- quinio-care-connect.lovable.app (without
The documentation confirms that domains are added in the Public Keys section by navigating to your Retell dashboard, clicking on the public key you want to configure, adding the domains where your public key can be used, and saving your changes .
For testing purposes, the documentation also mentions that you can add localhost to your allowed domains list to enable development and testing on your local machine before deploying to production .
If you're still experiencing errors with the standard domain format (quinio-care-connect.lovable.app) , I recommend reaching out to Retell support directly, as there may be platform-specific validation issues not covered in the documentation. You can visit [Contact Sales]() or check [) for additional support options.
The documentation doesn't mention any restrictions on specific hosting platforms like lovable.app, domain verification requirements, or the ability to create keys without initially adding domains .AI Evy
11/02/2025, 11:35 PMAI Evy
11/02/2025, 11:35 PMjrok1308
11/04/2025, 10:27 AMAI Evy
11/04/2025, 10:27 AMAI Evy
11/04/2025, 10:27 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
Response contains:
- `chat_id`: Unique identifier for the chat session
- `agent_id`: The agent handling the chat
- `chat_status`: Current status (e.g., "ongoing")
- `start_timestamp`: When the chat began
- Additional fields like retell_llm_dynamic_variables, metadata, etc.
The endpoints you tried (/create-web-call, /v2/create-web-chat) are not documented in the official API references .
---
## Authentication
For backend API calls, you should use your Secret API Key (not the Public Key) . The authorization header format is:
Authorization: Bearer YOUR_RETELL_API_KEYAI Evy
11/04/2025, 10:27 AM/create-chat endpoint creates a chat session , but the sources don't explicitly document:
- A separate endpoint for sending individual messages after session creation
- Whether responses are synchronous or webhook-based for programmatic chat implementations
The documentation shows that chat sessions have a message_with_tool_calls array that contains the conversation history , and transcript field with the full conversation , but doesn't detail the message-by-message API flow for custom implementations.
---
## Webhooks
According to the agent configuration documentation, you can set a webhook_url at the agent level [(3) ]() . When configured, this webhook will receive chat events . The webhook_timeout_ms parameter controls the timeout (default 10000ms) .
---
## Chat Widget vs Custom Implementation
The Chat Widget was introduced in the June 2025 changelog [(2) ]() , and the documentation emphasizes that you can "embed a Retell Chat agent directly into your website or app" using a simple copy-paste embed script .
However, the available sources don't provide detailed documentation for building a fully custom chat UI without using the widget or the Web SDK. The primary documented approach is the widget implementation .
---
## What's Missing from the Documentation
I don't have information in the sources about:
1. A specific endpoint for sending individual messages after chat creation
2. How to receive streaming or rAI Evy
11/04/2025, 10:27 AMAI Evy
11/04/2025, 10:27 AMAI Evy
11/04/2025, 10:27 AMjrok1308
11/05/2025, 10:16 PMAI Evy
11/05/2025, 10:16 PMAI Evy
11/05/2025, 10:17 PMAI Evy
11/05/2025, 10:17 PMAI Evy
11/05/2025, 10:17 PM- {{appointment_date}} exists
- {{appointment_date}} does not exists
- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
Prompt conditions (evaluated after equation conditions) :
- "User said something about booking a meeting"
- "User said something about cancelling a meeting"
Note: You can only use variables passed in as dynamic variables for equation conditions . For information extracted by the LLM during the call, use prompt conditions .
## For Your Healthcare Use Case
For your appointment booking system with external webhook functions:
1. Add your functions first (check_availability, verify_patient_identity, etc.) before creating Function Nodes [(2) ]()
2. Use Extract Dynamic Variable Nodes to capture patient information like name, DOB, appointment date [(4) ]()
3. Use Function Nodes to call your n8n webhooks - the function executes automatically upon entering the node [(2) ]()
4. Use transition conditions with equation-based checks (e.g., {{patient_verified}} == true) to route between nodes [(7) ]()
5. Connect nodes by clicking and holding the circle to draw connections between them [(6) ]()
**AI Evy
11/05/2025, 10:17 PMAI Evy
11/05/2025, 10:17 PMAI Evy
11/05/2025, 10:24 PMAI Evy
11/05/2025, 10:24 PMAI Evy
11/05/2025, 10:24 PMAI Evy
11/05/2025, 10:24 PMjrok1308
11/05/2025, 10:29 PMjrok1308
11/05/2025, 10:29 PMAI Evy
11/05/2025, 10:29 PMAI Evy
11/05/2025, 10:29 PMAI Evy
11/05/2025, 10:29 PMAI Evy
11/05/2025, 10:30 PMappointment_date across states.
## Known Multi-Prompt Issues
There's a documented incident where "Conversation Flow agent potentially stay silent after function node" when "a function and response is happening at same time" [(5) ]() . While this was specific to Conversation Flow and was resolved, it illustrates timing issues between function execution and state transitions that can affect reliability.
Community reports show edge condition evaluation challenges in multi-prompt agents [(6) ]() [(7) ]() . Users found that explicit transition instructions in prompts helped, but didn't fully resolve reliability issues [(7) ]() .
## Recommendation
For your production healthcare booking system requiring 100% reliability with external webhooks and soft-locking, rebuild in Conversation Flow [(1) ]() [(2) ]() . The structured node-based approach with explicit transition conditions will provide the predictability and debugging capabilities you need .
Conversation Flow is specifically designed for "more difficult conversations while maintaining context throughout the flow" [(2) ](AI Evy
11/05/2025, 10:30 PMAI Evy
11/05/2025, 10:30 PMAI Evy
11/05/2025, 10:30 PM- {{appointment_date}} exists
- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18AI Evy
11/05/2025, 10:30 PMjrok1308
11/05/2025, 10:54 PMAI Evy
11/05/2025, 10:54 PMAI Evy
11/05/2025, 10:54 PMget_user_details with description "Get user details based on name and age"
2. Select HTTP Method
- Choose the HTTP method (GET, POST, PATCH, PUT, or DELETE)
3. Add endpoint URL
- Add the URL where Retell will send the request to execute your custom function
- This has to be a valid URL
*4. Set request headers (optional) *
- Define custom headers to include with the request
- Header values can be static or include dynamic variables
*5. Set query parameters (optional) *
- Define query parameters to include in the request URL
- Query parameter values can be static or include dynamic variables
6. Define parameters
- Define the parameters for the custom function using JSON schema format or JSON form
- Only available for POST, PATCH and PUT requests
Example parameter schema :
json
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}AI Evy
11/05/2025, 10:54 PMAI Evy
11/05/2025, 10:54 PMAI Evy
11/05/2025, 10:54 PMjrok1308
11/05/2025, 11:02 PMAI Evy
11/05/2025, 11:02 PMAI Evy
11/05/2025, 11:03 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
model_choice: { model: 'gpt-5', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;AI Evy
11/05/2025, 11:03 PMprompt or static sentence types [(1) ]()
3. Custom functions - With JSON schemas, HTTP methods (GET, POST, PUT, PATCH, DELETE) , endpoint URLs, headers, and query parameters [(1) ]() [(3) ]()
4. Transitions - Via the edges array with transition conditions [(1) ]()
5. Tools - Custom functions with full configuration
6. Global settings - Including global_prompt, model_temperature, tool_call_strict_mode, default_dynamic_variables, and knowledge_base_ids
## Example Request Body Structure
The API accepts a comprehensive configuration object :AI Evy
11/05/2025, 11:03 PMmcps array in the API request [(1) ]() [(6) ]() . However, there are known issues with MCP response variables not being properly extracted in some scenarios [(4) ]() [(5) ]() .
For your 29-node healthcare booking agent, the programmatic API approach using /create-conversation-flow is the recommended method to automate setup instead of manual clicking [(1) ]() .
**AI Evy
11/05/2025, 11:03 PMAI Evy
11/05/2025, 11:03 PMAI Evy
11/05/2025, 11:03 PMjson
{
"global_prompt": "You are a helpful customer service agent.",
"tools": [
{
"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"
}
],
"start_node_id": "start",
"model_temperature": 0.7,
"tool_call_strict_mode": true,
"default_dynamic_variables": {
"company_name": "Retell Inc",
"support_hours": "9 AM - 5 PM"
},
"start_speaker": "agent",
"model_choice": {
"type": "cascading",
"model": "gpt-5"
},
"nodes": [
{
"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"
}
]
}
]
}