https://retellai.com/?utm_source=discord&utm_medium=seo logo
Passing wrong arguments to Check Availability date...
# ❓・bug-report
o
I'm trying to check calendar availability , I set the timezone correctly so I asked to the agent the date and time and it replies correctly, however, when I tell to book a date in the calendar in future, when it needs to check availability I'm seeing is taking wrongly the date arguments : How can I fix this ??
s
please give us more context like the transcript and node transitions
o
Hi , this is the transition, it's in spanish so, I can translate 🙂
Transcript: Agent: ¡Hola! Soy Valeria, parte del equipo de la doctora Itzel Iniesta. ¿En qué puedo ayudarte hoy? User: Hola, Valeria, me gustaría agendar una cita. Agent: ¡Con gusto! Agent: Antes de proceder, Agent: necesitaré algunos datos. Por favor, indícame tu nombre completo, User: Mi nombre es María Pérez. Agent: Gracias, User: Mi correo electrónico María arroba Gmail punto com. User: Mi Agent: Ahora solo necesito User: número de teléfono es tres cero cinco cuatro nueve ocho siete cinco cuatro seis. Agent: Perfecto, User: La fecha en la que quiero agendar la cita es el próximo jueves veintisiete de febrero del dos mil veinticinco, a las tres y media de la tarde. Agent: Deme unos Agent: segundos mientras agendo la cita. Agent: Parece que hubo un problema al agendar tu cita. ¿Podrías confirmar nuevamente tu correo electrónico para asegurarme de que esté correcto? User: María arroba Gmail punto com. Agent: Gracias por confirmar. Parece que el sistema tuvo un inconveniente con el correo electrónico. ¿Podrías verificar si hay algún detalle adicional, como mayúsculas o caracteres especiales, que deba corregirse? Por ejemplo, ¿es "maria@gmail.com" todo en minúsculas? User: Sí, Agent: ¡Perfecto! Ahora procederé a agendar tu cita. Deme unos segundos. User: Ok. Agent: ¡Listo, María! Tu cita ha sido agendada para el jueves 27 de febrero de 2025 a las 3:30 pm. Recibirás un correo con los detalles de tu cita. ¿Hay algo más en lo que pueda ayudarte? User: No Agent: ¡Listo, María! Tu cita ha sido agendada para el jueves 27 de febrero de 2025 a las 3:30 pm. Recibirás un correo con los detalles de tu cita. ¿Hay algo más en lo que pueda ayudarte?
__Detail Logs__
I see in the line to call the "check_availability" the passing arguments are wrong: 2025-02-20 02:11:13.475 call_3f0a8463c9aada53cc437b8399b info: Calling tool: check_calendar_availability Arguments: {"start_time":"**2025-02-20T00:00:00.000Z**","end_time":"**2025-02-20T23:59:00.000Z**","timezone":"America/New_York"}
However , in the "Book_Appointment" it used the right Value : Arguments: {"time":"Thursday, **February 27, 2025 at 3:30 PM**","timezone":"America/New_York","name":"María Pérez","email":"María@gmail.com"}
How to also , avoid calling Book_Appointment if the Check_Availability failed .... ?
s
Sorry I dont speak spanish and dont understand what's going on here. Maybe support can help. But in general I suggest using the cal.com api with custom functions. Then, you have more control over how you send your data to cal.com
o
I understand , but my question here is , your Built-in "Check Availability function" isn't supposed to handle this ?
Bassically here , I'm seeing the agent is passing the below argument: Arguments: {"start_time":"2025-02-20T00:00:00.000Z","end_time":"2025-02-20T23:59:00.000Z","timezone":"America/New_York"} But in my example, it should have passed : Arguments: {"start_time":"2025-02-2**8**T**14:30**:00.000Z","end_time":"2025-02-28T2**8**:**15:00**.000Z","timezone":"America/New_York"}
s
I'm not from retell team. I dont know how their check availability function works. sorry.. someone from support will need to look into this.