hans_70884
11/27/2025, 7:31 AMAI Evy
11/27/2025, 7:31 AMAI Evy
11/27/2025, 7:31 AM{"timezone": "America/New_York", "appointment_time": "2025-01-15T14:00:00"})
Dynamic Variables:
If you have timezone information from your CRM or previous interactions, you can inject it using dynamic variables in your agent configuration to personalize the conversation from the start.
Since I don't have Retell AI-specific documentation on this topic, would you like me to provide a more general answer based on common patterns for voice AI timezone handling? Alternatively, you can:
- Visit [Contact Sales]() for specific impleAI Evy
11/27/2025, 7:36 AMAI Evy
11/27/2025, 7:36 AMhans_70884
11/27/2025, 7:48 AMAI Evy
11/27/2025, 7:48 AMAI Evy
11/27/2025, 7:49 AMAt the start of every booking conversation, ask: "What timezone are you in?" and store the response in {{user_timezone}}.
2. Leverage System Variables for Reference
Retell provides {{current_time_[timezone]}} system variables . For example:
- {{current_time_Australia/Sydney}} gives current time in AEDT
- {{current_time_Pacific/Auckland}} gives current time in NZDT
3. Create Explicit Conversion Rules in Your Prompt
TIMEZONE CONVERSION RULES:
- All available slots from check_slots are in Australia/Sydney timezone (AEDT, UTC+11)
- When user specifies their timezone, you MUST convert their requested time to AEDT before checking slots
- Example: If user in Pacific/Auckland (UTC+13) requests 10 AM, check slots for 8 AM AEDT
- NEVER offer times that don't exist after conversion
- If 5 PM AEDT is the last slot and user is in Pacific/Auckland, the latest you can offer is 3 PM their time (= 5 PM AEDT)
CONVERSION PROCESS:
1. User states their timezone and desired time
2. Calculate the offset difference (e.g., NZDT is UTC+13, AEDT is UTC+11, difference = +2 hours)
3. Convert user's requested time to AEDT by subtracting the difference
4. Check available slots in AEDT
5. Present results back to user in THEIR timezone
4. Handle Edge CasesAI Evy
11/27/2025, 7:49 AMBOUNDARY RULES:
- If converted time falls outside available slots, inform user: "The closest available time in your timezone is [TIME], which is [TIME] AEDT"
- Always confirm both timezones: "I'm booking you for 10 AM New Zealand time, which is 8 AM Australian Eastern time. Does that work?"
## Community-Reported Issues to Avoid
Users have reported timezone issues with Cal.com integration where times were being incorrectly converted [(2) ]() . The Cal.com v2 API provides outputs in UTC only, which requires manual timezone handling [(3) ]() . When using external booking systems, ensure you're handling the timezone parameter correctly in your tool calls [(2) ]() .
## Tool Configuration
Structure your check_slots tool to:
1. Accept user_timezone as a parameter
2. Perform conversion logic server-side (recommended) or instruct the LLM explicitly
3. Return slots with clear timezone labels
## Prompt Structure Example
You are a booking assistant handling appointments across multiple timezones.
CORE RULES:
- All internal slots are in Australia/Sydney (AEDT, UTC+11)
- Current time in AEDT: {{current_time_Australia/Sydney}}
- User timezone: {{user_timezone}}
WORKFLOW:
1. Capture user timezone if not already known
2. When user requests a time, convert to AEDT before checking availability
3. Present available times in user's timezone with AEDT confirmation
4. Never hallucinate availability - only offer times that exist after conversion
CONVERSION EXAMPLES:
- User in Pacific/Auckland (UTC+13) wants 10 AM → Check 8 AM AEDT slots
- User in America/Los_Angeles (UTC-8) wants 2 PM → Check 9 AM next day AEDT slots (19 hour difference)AI Evy
11/27/2025, 7:49 AMAI Evy
11/27/2025, 7:49 AMhans_70884
11/27/2025, 7:50 AMhans_70884
11/27/2025, 7:50 AMAI Evy
11/27/2025, 7:50 AMAI Evy
11/27/2025, 7:50 AMuser_timezone)
- Description (what the value should be)
- Variable Type: Text, Number, Enum, or Boolean
3. Update your prompt to tell the agent when to extract variables
---
## Complete Timezone Booking PromptAI Evy
11/27/2025, 7:50 AMAI Evy
11/27/2025, 7:51 AMROLE: Appointment booking assistant for Australian business (AEDT timezone)
TIMEZONE RULES:
- All available slots from check_slots are in Australia/Sydney (AEDT, UTC+11)
- Current AEDT time: {{current_time_Australia/Sydney}}
- User timezone: {{user_timezone}}
WORKFLOW:
1. Ask: "What timezone are you in?" (if {{user_timezone}} is empty)
2. Extract timezone using extract_user_timezone function
3. When user requests a time, convert to AEDT before checking slots
4. Only offer times that exist after conversion
5. Confirm booking in both timezones
CONVERSION LOGIC:
- Pacific/Auckland (NZDT, UTC+13) : User time MINUS 2 hours = AEDT
- America/Los_Angeles (PST, UTC-8) : User time PLUS 19 hours = AEDT next day
- Always calculate offset before checking availability
BOUNDARY HANDLING:
- Last available slot: 5:00 PM AEDT
- If user in NZDT requests 7:00 PM (= 5:00 PM AEDT) , say: "Latest available is 5:00 PM your time, which is 5:00 PM AEDT"
- If user in NZDT requests 8:00 PM (= 6:00 PM AEDT) , say: "That time isn't available. Latest is 5:00 PM your time (5:00 PM AEDT) "
CONFIRMATION FORMAT:
"I'm booking you for [USER_TIME] [USER_TIMEZONE], which is [AEDT_TIME] Australian Eastern time. Correct?"
NEVER:
- Hallucinate available times
- Offer slots outside business hours after conversion
- Skip timezone confirmation
---
## Required Tool Configuration
In your prompt, add:
When user states their timezone, immediately call extract_user_timezone to store it.
This tells the agent when to invoke the Extract Dynamic Variables function .
---
**AI Evy
11/27/2025, 7:51 AMAI Evy
11/27/2025, 10:27 AMhans_70884
11/27/2025, 10:28 AMAI Evy
11/27/2025, 10:28 AMAI Evy
11/27/2025, 10:28 AMcallback_reason (Text) - Why they need a callback
- conversation_context (Text) - What was being discussed
- user_situation (Text) - Personal context (e.g., "birthday", "meeting", "busy")
- callback_time (Text) - When to call back
In your prompt:
When user requests a callback, extract the following information using extract_callback_context:
- Why they need the callback
- What you were discussing
- Any personal situation they mentioned
- Their preferred callback time
### 2. Store Variables in Your Database
Use a Custom Function to save this data to your system [(3) ]() :
Create a custom function tool:
- Name: store_callback_context
- HTTP Method: POST
- Endpoint: Your database API
- Parameters:
json
{
"type": "object",
"properties": {
"user_phone": {
"type": "string",
"description": "User's phone number"
},
"callback_reason": {
"type": "string",
"description": "Reason for callback"
},
"conversation_context": {
"type": "string",
"description": "What was being discussed"
},
"user_situation": {
"type": "string",
"description": "Personal context mentioned"
}
}
}AI Evy
11/27/2025, 10:28 AM{{variable_name}} syntax [(7) ]()
5. Natural Resume: Agent picks up conversation naturally based on context
This approach leverages Retell's dynamic variable system to maintain conversation continuity across multiple calls.
---AI Evy
11/27/2025, 10:28 AMjavascript
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: user_phone_number,
override_agent_id: 'your_agent_id',
retell_llm_dynamic_variables: {
callback_reason: "birthday celebration",
conversation_context: "discussing appointment scheduling",
user_situation: "was celebrating birthday"
}
}) ;
### 4. Reference Context in Callback Prompt
Callback agent prompt:
You are calling back {{user_name}} who requested a callback.
PREVIOUS CONTEXT:
- Callback reason: {{callback_reason}}
- What you were discussing: {{conversation_context}}
- User's situation: {{user_situation}}
GREETING STRATEGY:
- Reference their situation naturally: "Hey! How was your {{user_situation}}?"
- Resume where you left off: "I'm calling back about {{conversation_context}}"
- Don't repeat information they already provided
Example: "Hi {{user_name}}! How was your birthday? I'm calling back to continue our conversation about {{conversation_context}}."
### 5. Update Call Metadata
You can also update call metadata after extraction using the Update Call API [(6) ]() :
javascript
const callResponse = await client.call.update('call_id', {
metadata: {
callback_scheduled: true,
callback_context: "birthday celebration",
last_topic: "appointment scheduling"
}
}) ;AI Evy
11/27/2025, 10:28 AM