alarsen2k45.
09/16/2025, 5:22 PMAI Evy
09/16/2025, 5:22 PMAI Evy
09/16/2025, 5:22 PMfrom_number) . Your webhook endpoint can then use this number to look up client information in your CRM. In your webhook's JSON response, you can set dynamic variables (such as the client's name or other context) so that the Retell agent has this information before greeting the caller.
Example flow:
1. Client calls your Retell number.
2. Retell sends a webhook to your endpoint with the caller’s number.
3. Your endpoint queries your CRM for client info using the from_number.
4. Your endpoint responds to Retell with dynamic variables in the response payload.
5. The Retell agent receives the context and can greet the caller personally.
Sample request payload:
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
Sample response payload:
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"crm_id": "12345"
}
}
}
Set your Retell number’s inbound_webhook_url via API or dashboard. The agent will then use the provided dynamic variables for context when answering the call [(1) ]() [(2) ]() [(3) ]() .AI Evy
09/16/2025, 5:22 PMAI Evy
09/16/2025, 5:22 PMalarsen2k45.
09/16/2025, 7:52 PMalarsen2k45.
09/16/2025, 7:52 PMAI Evy
09/16/2025, 7:52 PMAI Evy
09/16/2025, 7:52 PMjson
{
"call_inbound": {
"dynamic_variables": {
"customer_name": "John Doe"
}
}
}
[(1) ]()
If the dynamic variables are not showing up for your agent, it is important to confirm that:
- The structure of your response matches the above format exactly.
- All dynamic variable values are strings.
- You are sending a 2xx HTTP status code in your response.
If you share your actual webhook response, I can help check for any issues in formatting or structure.AI Evy
09/16/2025, 7:52 PMAI Evy
09/16/2025, 7:52 PMalarsen2k45.
09/16/2025, 7:54 PMAI Evy
09/16/2025, 7:54 PMAI Evy
09/16/2025, 7:54 PMjson
{
"call_inbound": {
"metadata": {
"crm_id": "IUNbDRJ2NZdfoISqE7mi",
"lookup_source": "GHL"
},
"dynamic_variables": {
"age": "35",
"name": "andrew larsen",
"email": "alarsen2k@icloud.com",
"phone": "+18645615666",
"gender": "Male",
"smoker": "No",
"last_name": "larsen",
"first_name": "andrew",
"term_amount": "25 Years",
"quote_monthly": "19",
"coverage_amount": "$350,000"
}
}
}AI Evy
09/16/2025, 7:54 PMAI Evy
09/16/2025, 7:55 PMAI Evy
09/16/2025, 7:55 PMalarsen2k45.
09/16/2025, 7:57 PMAI Evy
09/16/2025, 7:57 PMAI Evy
09/16/2025, 7:57 PMjson
{
"call_inbound": {
"dynamic_variables": {
"name": "andrew larsen",
"first_name": "andrew",
"last_name": "larsen",
"phone": "+18645615666",
"email": "alarsen2k@icloud.com",
"coverage_amount": "$350,000",
"term_amount": "25 Years",
"quote_monthly": "19",
"quote_classification": "your_value",
"smoker": "No",
"age": "35",
"gender": "Male",
"health_concerns": "your_value"
}
}
}AI Evy
09/16/2025, 7:57 PMAI Evy
09/16/2025, 7:57 PMAI Evy
09/16/2025, 7:57 PMalarsen2k45.
09/16/2025, 8:05 PMAI Evy
09/16/2025, 8:05 PMAI Evy
09/16/2025, 8:06 PMjson
{
"call_inbound": {
"dynamic_variables": {
"first_name": "andrew"
}
}
}
- In your agent prompt, reference the variable as {{first_name}} (not {{contact.first_name}} or similar) . If you use {{contact.first_name}}, then your dynamic_variables must have a key exactly named "contact.first_name", which is not standard per the documentation [(1) ]() [(2) ]() .
If {{first_name}} is not set or is missing, the agent will say the raw variable name (e.g., "first underscore name" or literally "{{first_name}}") [(1) ]() .
Double-check:
- All dynamic variable values are strings.
- The webhook response JSON has no syntax errors or trailing commas.
- Your agent prompt matches the variable names exactly as they appear in dynamic_variables.
If your prompt and webhook both use "first_name" and the variable is set as a string, the agent should correctly say "Hi andrew" [(1) ]() [(2) ]() .AI Evy
09/16/2025, 8:06 PMAI Evy
09/16/2025, 8:06 PMalarsen2k45.
09/16/2025, 8:08 PMAI Evy
09/16/2025, 8:08 PMAI Evy
09/16/2025, 8:08 PMAI Evy
09/16/2025, 8:08 PMjson
{
"call_inbound": {
"metadata": {
"crm_id": "IUNbDRJ2NZdfoISqE7mi",
"lookup_source": "GHL"
},
"dynamic_variables": {
"age": "35",
"name": "andrew larsen",
"email": "alarsen2k@icloud.com",
"phone": "+18645615666",
"gender": "Male",
"smoker": "No",
"last_name": "larsen",
"first_name": "andrew",
"term_amount": "25 Years",
"quote_monthly": "19",
"coverage_amount": "$350,000",
"health_concerns": "Excellent – No health issues",
"quote_classification": "Preferred Plus"
}
}
}
If your prompt references {{first_name}}, this should work. If your prompt uses {{contact.first_name}}, either update the prompt to {{first_name}}, or change your webhook to:
json
"dynamic_variables": {
"contact.first_name": "andrew",
...
}
But the recommended and standard approach is to use simple keys like {{first_name}} in both the prompt and the webhook [(2) ]() [(3) ]() .
Double-check your prompt variable references and ensure they match your webhook keys exactly.AI Evy
09/16/2025, 8:08 PMAI Evy
09/16/2025, 8:08 PMalarsen2k45.
09/16/2025, 8:15 PMAI Evy
09/16/2025, 8:15 PMAI Evy
09/16/2025, 8:16 PMAI Evy
09/16/2025, 8:16 PMAI Evy
09/16/2025, 8:16 PMAI Evy
09/16/2025, 8:16 PMalarsen2k45.
09/16/2025, 8:17 PMAI Evy
09/16/2025, 8:17 PMalarsen2k45.
09/16/2025, 8:17 PMAI Evy
09/16/2025, 8:17 PMAI Evy
09/16/2025, 8:17 PMAI Evy
09/16/2025, 8:17 PMalarsen2k45.
10/13/2025, 6:59 PMAI Evy
10/13/2025, 6:59 PMAI Evy
10/13/2025, 6:59 PMAI Evy
10/13/2025, 6:59 PMAI Evy
10/13/2025, 6:59 PM{{variable_name}} syntax
- Correct handling of missing variables with defensive prompting
- Best practices for agent instructions and conversation flow
- Tool calling integration if applicable [(2) ]()
Based on the troubleshooting we've been doing with your dynamic variables, I can also specifically look for any issues that might be causing the "first underscore name" problem you're experiencing.
Feel free to paste your prompt and I'll provide targeted suggestions for improvement based on Retell AI's documentation and best practices.alarsen2k45.
10/13/2025, 7:30 PMalarsen2k45.
10/13/2025, 7:30 PMAI Evy
10/13/2025, 7:30 PMAI Evy
10/13/2025, 7:31 PM"Hi {{first_name}}, thanks for calling [Company Name]. I understand you're interested in scheduling an appointment."
## Essential Components for Appointment Booking
1. Appointment Functions Setup:
Add the "Check Availability" and "Book Appointments" functions to your agent . For Cal.com integration:
javascript
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',
}) ;AI Evy
10/13/2025, 7:31 PM"When a customer wants to schedule an appointment:
1. Call the 'Check Availability' function to show available slots
2. When the customer selects a time, trigger the 'Book Appointment' function to confirm the booking"AI Evy
10/13/2025, 7:31 PM{{current_time_[timezone]}}
- Structure your prompts to handle objections and guide toward booking [(1) ]()
Response Control:
Define precisely what words the agent speaks during interactions to maintain brand voice consistency . Use structured pathways to reduce ambiguity and improve accuracy .
Tool Integration:
Connect your agent to Cal.com by entering credentials and event ID, ensuring time zone settings match between Cal.com and Retell AI dashboard [(3) ]() .
This structure provides the foundation for an effective appointment booking agent while maintaining natural conversation flow and consistent brand representation.AI Evy
10/13/2025, 7:31 PMAI Evy
10/13/2025, 7:31 PMalarsen2k45.
10/13/2025, 7:32 PMalarsen2k45.
10/13/2025, 7:33 PMAI Evy
10/13/2025, 7:33 PMAI Evy
10/13/2025, 7:33 PM{{current_time}}
This provides the current time in America/Los_Angeles timezone (e.g., "Thursday, March 28, 2024 at 11:46:04 PM PST") .
Timezone-Specific Current Time:
{{current_time_[timezone]}}
For example:
- {{current_time_Australia/Sydney}}
- {{current_time_America/New_York}} [(1) ]() [(2) ]()
Calendar Information:
{{current_calendar}}
This provides a 14-day calendar in America/Los_Angeles timezone [(1) ]() .
Timezone-Specific Calendar:
{{current_calendar_[timezone]}}
For example: {{current_calendar_Australia/Sydney}} .
These are automatic system variables that Retell provides by default - you don't need to set them up in your webhook response or configure them anywhere . Just reference them directly in your agent prompts using the double curly brace syntax.
Note that some users have reported occasional issues with the {{current_time}} variable showing incorrect dates, though this appears to be intermittent [(3) ]() .AI Evy
10/13/2025, 7:33 PMAI Evy
10/13/2025, 7:34 PMAI Evy
10/13/2025, 7:37 PMalarsen2k45.
10/13/2025, 7:37 PMAI Evy
10/13/2025, 7:37 PMYou are David, a warm and empathetic voice agent for Financial Enabler. Your role is to connect with prospects who have shown interest in indexed annuities and help them schedule a consultation with our licensed retirement specialist.
AGENT PERSONALITY:
- Name: David
- Tone: Warm, empathetic, confident, and conversational - never robotic
- Approach: Understanding and supportive of retirement concerns
- Goal: Schedule prospects for a consultation to receive their free book
PROSPECT CONTEXT:
- They responded to ads about indexed annuities vs traditional annuities
- They completed a survey about their retirement goals
- They're interested in receiving "Why I Bought Indexed Annuities" by Sheryl J. Moore
- The free book is only provided after booking and attending a consultation
CONVERSATION GUIDELINES:
- Acknowledge their interest in learning about indexed annuities
- Reference their survey responses when available using dynamic variables
- Explain that the free book comes after scheduling with our licensed specialist
- Focus on booking the appointment rather than providing detailed financial advice
- Use empathetic language about retirement planning concerns
- Maintain a consultative, not sales-heavy approach
DYNAMIC VARIABLES (when available) :
- Greet using: "Hi {{first_name}}, this is David from Financial Enabler"
- Reference their information: {{age}}, {{retirement_goals}}, etc.
BOOKING OBJECTIVE:
Your primary goal is to schedule prospects with our licensed retirement specialist so they can receive their free book and get personalized guidance on indexed annuities for their retirement planning.AI Evy
10/13/2025, 7:37 PMAI Evy
10/13/2025, 7:37 PMAI Evy
10/13/2025, 7:37 PM