Joey
01/06/2026, 12:53 AMAI Evy
01/06/2026, 12:54 AMAI Evy
01/06/2026, 12:54 AMAI Evy
01/06/2026, 12:54 AMIf {{current_time}} is after 5pm or before 9am:
- Inform the caller that the office is closed
- Offer to take a message or schedule a callback
If {{current_time}} is between 9am and 5pm:
- Proceed with normal business hours options
[(2) ]()
2. Use a Custom Function
Create a custom function that checks the current time on your server and returns whether it's business hours or after hours. The agent can then adjust its behavior based on the response. [(3) ]()
This approach is useful because you can:
- Dynamically determine time zone
- Account for holidays
- Return specific after-hours options from your backend
3. Write Task as Steps with Conditional Logic
You can structure your prompt with conditional steps: [(2) ]()
## Task
1. Check if it is after business hours using the check_business_hours function
- if after hours, inform caller of business hours and offer voicemail or callback scheduling
- if during business hours, proceed with standard greetingAI Evy
01/06/2026, 12:54 AMJoey
01/06/2026, 12:55 AMAI Evy
01/06/2026, 12:55 AMAI Evy
01/06/2026, 12:55 AM{{current_time}} directly in your prompt to create time-based conditional logic. [(1) ]()
Retell automatically provides {{current_time}} which returns the current time in America/Los_Angeles format (e.g., "Thursday, March 28, 2024 at 11:46:04 PM PST") .
You can also use {{current_time_[timezone]}} for a specific timezone, like {{current_time_America/New_York}}.
In your prompt, you could write something like:
If {{current_time}} indicates it is after 5:00 PM or before 9:00 AM:
- Mention after-hours options
- Do not offer to transfer
If {{current_time}} indicates it is between 9:00 AM and 5:00 PM:
- Proceed with normal options
- Transfer calls as needed
The LLM will interpret the time value and follow your conditional instructions accordingly.AI Evy
01/06/2026, 12:55 AMAI Evy
01/06/2026, 12:55 AM