https://retellai.com/?utm_source=discord&utm_medium=seo logo
One of my inbound voice agent clients is a health ...
# ❓・ai-evy-support
b
One of my inbound voice agent clients is a health clinic. They want the agent to know their office hours, as a alot of user's request human escalation but they are not within office hours so the trasnfer fails... is it possible to have a rigid conv flow agent to know the current date and time, public holidays, etc @AI Evy
a
Thanks for tagging me @breeshwayne. I'll look through relevant sources and get back to you shortly.
### Answer Yes, your conversation flow agent can access current date and time information using system default dynamic variables. [(1) ]() Retell provides several built-in variables for time-based logic: -
{{current_time}}
- Current time in America/Los_Angeles -
{{current_time_[timezone]}}
- Current time in a specified timezone (e.g.,
{{current_time_Australia/Sydney}}
) -
{{current_hour}}
- Current hour in America/Los_Angeles -
{{current_hour_[timezone]}}
- Current hour in specified timezone -
{{current_calendar}}
- 14-day calendar in America/Los_Angeles -
{{current_calendar_[timezone]}}
- 14-day calendar in specified timezone For your office hours use case, you can use equation-based transition conditions to check if the current time falls within business hours: [(2) ]()
Copy code
{{current_hour}} >= 9 AND {{current_hour}} < 17
This allows you to route calls differently based on whether the clinic is open or closed. For public holidays, you would need to: 1. Pass holiday dates as custom dynamic variables (e.g.,
{{holiday_dates}}
) [(1) ]() 2. Use equation conditions like
"December 25, January 1" NOT CONTAINS {{current_date}}
[(2) ]() You can combine these conditions in your conversation flow to prevent transfer attempts outside office hours and instead offer alternatives like voicemail or callback scheduling.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@SolePurpose (Frizzy45)