https://retellai.com/?utm_source=discord&utm_medium=seo logo
I want to implement logic for our agent based on t...
# ❓・ai-evy-support
d
@AI Evy I want to implement logic for our agent based on the time of day. Is there any way to do that in Retell?
a
Thanks for tagging me @Dan@beHuman. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can implement time-based logic in Retell AI using dynamic variables [(1) ]() . Retell AI provides several default system variables for time-related functionality . You can use these time variables in your agent's prompt, begin message, conversation flow conditions, and other components : -
{{current_time}}
- Current time in America/Los_Angeles timezone -
{{current_time_[timezone]}}
- Current time in a specified timezone, for example:
{{current_time_Australia/Sydney}}
-
{{current_calendar}}
- 14-day calendar in America/Los_Angeles -
{{current_calendar_[timezone]}}
- 14-day calendar in specified timezone, for example:
{{current_calendar_Australia/Sydney}}
For conversation flow logic, you can use equations to check if the dynamic variable is set properly . If you want to check if the dynamic variable is not set in conversation flow equations, you can use:
{{user_name}} contains {{
which would evaluate to true if it's not set . However, based on community discussions, there have been some reported issues with timezone-specific time variables in conversation flow conditions [(2) ]() [(3) ]() . If you encounter issues with time-based conditions in conversation flow, you may need to simplify your conditions or test with hardcoded values first [(2) ]() . The time variables work best when included in prompts with clear context, such as "Current time is: {{current_time_America/Los_Angeles}}" .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] {{current_time_America/Los_Angeles}} doesn't work.](https://discord.com/channels/1186424376300679209/1370089406047981678) [[3] date and time issue](https://discord.com/channels/1186424376300679209/1403409075353423933) ​
d
Could you provide me with the current_time variable with the timezone being EST (let's say NYC)
@AI Evy Could you provide me with the current_time variable with the timezone being EST (let's say NYC)
a
Thanks for the follow-up, @Dan@beHuman. I'll get back to you soon.
### Answer For NYC/EST timezone, you would use the dynamic variable:
Copy code
{{current_time_America/New_York}}
[(1) ]() , [(2) ]() Retell AI provides timezone-specific time variables using the format
{{current_time_[timezone]}}
where you specify the timezone [(1) ]() . For New York (which covers EST/EDT automatically based on the season) , the timezone identifier is
America/New_York
[(2) ]() . You can also use the calendar version if you need date information:
Copy code
{{current_calendar_America/New_York}}
[(1) ]() This will provide a 14-day calendar in the America/New_York timezone .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] How can I set the current time in the agent](https://discord.com/channels/1186424376300679209/1370089305606848653) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy I want our Retell agent to be able to take a message which it can pass on to another number.
a
Thanks for the follow-up, @Dan@beHuman. I'll get back to you soon.
### Answer I don't have specific information about message-taking functionality in the available sources. The documentation I have access to focuses on agent configuration settings like voice parameters, responsiveness, and backchannel settings [(1) ]() [(2) ]() [(3) ]() [(4) ]() , but doesn't cover message relay or forwarding capabilities. For implementing message-taking functionality that can pass messages to another number, you would likely need to use Retell AI's tool calling capabilities or external integrations, but I don't have the specific documentation for those features in the current sources. Here are some potentially useful sources to explore: - [Create Agent]() - [Update Agent]() - [Step 2: Configure the basic settings]() Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.