correctly identifying date and time
# support
m
I am trying to get my assistant, designed to answer inbound sales calls, to take actions based on the current day of the week and time. I want it to transfer calls to my sales team if they're open (M-F 10-6 Eastern) or take a message if they're closed. But I can't get the assistant to reliably identify the correct current day or time. Here's an example call log: fcacc0df-b0c7-4828-a9a4-3cab957a83c8
v
@MichaelK To assist you with this, I would need to know the current day of the week and time in the Eastern Time Zone to determine if the sales team is available. However, since I don't have access to real-time data, I can guide you on how to implement this logic in your assistant. Your assistant should be programmed to: 1. Convert the current UTC time to Eastern Time (ET). You can do this by subtracting 5 hours from UTC (or 4 hours during Daylight Saving Time). 2. Check the current day of the week. If it's Monday through Friday, proceed to the next step. If it's Saturday or Sunday, it should take a message. 3. If it's a weekday, check if the current ET time is between 10 AM and 6 PM. If it is, transfer the call to the sales team. If not, take a message. You will need to implement this logic in your assistant's codebase, using the appropriate date and time functions provided by the programming language you are using. If you need further assistance with the code, please provide the programming language or platform details, and I can guide you more specifically.
You can continue this conversation by mentioning me in the message.
m
When you say "implement this logic in your assistant's codebase" what are you referring to? Can I implement this logic in the Assistant's prompt?
v
@MichaelK I apologize for any confusion. When I mentioned implementing logic in your assistant's codebase, I was referring to the underlying programming that controls your assistant's behavior. However, since you are working with a Voice API for voice developers, you might be limited to configuring your assistant through prompts or predefined settings rather than direct programming. To implement the logic within the constraints of your Voice API, you would typically set up rules or conditions within the assistant's configuration. This might involve specifying the operating hours and setting up the assistant to check the current time against these hours before deciding to transfer calls or take messages. If your Voice API allows for dynamic responses based on variables like time and day, you could set up your assistant's prompt to include conditional logic that checks the current time and day against your sales team's availability. If the API does not support such dynamic responses, you may need to integrate with an external service or script that can provide the current time and day, and then use that information to guide the assistant's actions. If you need more specific guidance on how to set this up within your Voice API, please provide more details about the capabilities of your API or ask support for more info on this.
m
I am trying to ask support about this. Are you not part of VAPI support?
This is what I wrote: * When a caller indicates they would like to be transferred to a sales agent, follow these steps: 1. Check Current Day and Time: Current time: {{time}} Current day: {{day}} 2. Time Frame Options: * If it is currently between Friday 10:00pm and Monday 2:00pm, inform the caller that our sales team is available on weekdays only and offer to send them a link so that they can schedule a time to talk with a publishing consultant. * If it is currently between either: * Monday 2:00pm and Monday 10:00pm OR * Tuesday 2:00pm and Tuesday 10:00pm OR * Wednesday 2:00pm and Wednesday 10:00pm OR * Thursday 2:00pm and Thursday 10:00pm OR * Friday 2:00pm and Friday 10:00pm, THEN offer to transfer the caller to a Spines Publishing Expert. * If it is currently between either: * Monday 10:00pm and Tuesday 2:00pm OR * Tuesday 10:00pm and Wednesday 2:00pm OR * Wednesday 10:00pm and Thursday 2:00pm OR * Thursday 10:00pm and Friday 2:00pm, THEN offer the caller the option of scheduling a call. This does not work
23 Views