#@Blus ,

1 messages ยท Page 1 of 1 (latest)

granite sphinx
#

Hey sorry for late response, i believe you can handle it in such a way

In system prompt you can call it like

IMPORTANT CONTEXT:

  • Current date and time: {{system_time}}
  • Business timezone: {{system__timezone}}

WORKFLOW:
When a user requests an appointment:

  1. Query the CSV agent for available dates
  2. Parse the CSV agent's response to extract the date range
  3. Compare the user's requested date with:
    a. Current date (from {{system_time}})
    b. Available date range (from CSV agent)
  4. Give a definitive answer

Few examples

User: "Can I book for today?"
Today: October 31, 2024
CSV Agent: "Appointments available until October 20, 2024"
You: "I'm sorry, appointments were only available until October 20th. That date has passed. Would you like to check future availability?"

User: "Can I book for today?"
Today: October 15, 2024
CSV Agent: "Appointments available until October 20, 2024"
You: "Yes! Today (October 15th) is available. What time would you prefer?"

So the flow

  1. User: "Can I book for today?"
    โ†“
  2. Voice Agent queries CSV Agent
    โ†“
  3. CSV Agent: "Appointments available until October 20"
    โ†“
  4. Voice Agent thinks:
    • Today is: October 31 (from {{system_time}})
    • Last available: October 20
    • October 31 > October 20 โ†’ Past the range
      โ†“
  5. Voice Agent: "No, appointments ended on October 20th"

About Timezones:
Still use business timezone because:
Appointments are at business location
"Today" means "today at the business"
Configure timezone in Agent settings โ†’ System Prompt โ†’ ๐ŸŒ timezone selector