calendar wrong date shared in webhooks
# support
t
Hi team, i used vapi GPT4.1 model and extracted variable from conversation, but its not returning correct data . i have shared sample response ##{ "message": { "timestamp": 1751451928021, "type": "end-of-call-report", "analysis": { "summary": "The user, Raj Rajat, called to book an appointment for tomorrow at 11 AM. The AI confirmed the appointment details, including the user's name (Raj Rajat), email (raj@mailinator.com), and phone number (412263825), all for 11 AM EST. The AI confirmed the appointment was being scheduled and that a confirmation would be sent shortly. The call ended after the user thanked the AI.", "structuredData": { "lead_name": "Raj Rajat", "lead_email": "raj@mailinator.com", "lead_phone": 412263825, "call_sentiment": "Positive", "appointmentTime": { "date": "2024-07-20", "time": "11:00:00-04:00", "subject": "appointment" } },
k
Re-publish your analysis plan to restore proper data extraction.
Let me know if your still experiencing same issue..
c
Hey there, could you please describe the analysis plan you were expecting? Specifically, what structured data results were you anticipating from this call, and what did you actually receive? Additionally, please share the call ID so I can review the logs. I'd be happy to assist you further.
t
callid: c3086b09-9db2-4745-83d0-4409668c3c35 & summary of call is Analysis This call was initiated by the user, Harish, who wanted to book an appointment for a service tomorrow at 11 AM EST. The AI confirmed availability for a 30-minute consultation at that time and requested Harish's name, email, and phone number to confirm the booking. Harish provided: * Name: Harish * Email: harish@mail.com * Phone Number: 4125612351 (initially provided partially, then completed) The AI was in the process of confirming all the details when the call ended. The call ended because the customer hung up.This is the data extracted based on the Conversation. { lead_name: "Harish" lead_email: "harish@mail.com" lead_phone: 4125612351 call_sentiment: "Neutral" appointmentTime: { date: "2024-05-24" time: "11:00:00-04:00" subject: "consultation regarding our services" } } you can see i mentioned tomorrow but i got 2024 in response but model called is Model called tool: shared_calendar({"start_date_time":"2025-07-09T11:00:00","end_date_time":"2025-07-09T11:30:00","time_zone":"America/New_York"})
c
Hey, Thanks for your patience. I wanted to let you know that I couldn’t get back to you sooner since it was the weekend here. I’ll make sure to check on your ticket and get back to you tomorrow with an update.
Your structured data extraction doesn't know when the call happened, so when customers say "tomorrow" it guesses randomly instead of calculating the correct date. Modify your structured data system prompt to include the call date context using available template variables.
Copy code
You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. convert time of meeting in ISO 8601 format
Json Schema:
{your schema here}
Only respond with the JSON.
Fixed Prompt (What You Need)
Copy code
You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema.

IMPORTANT: This call occurred on {{date}}. When users say "tomorrow", "today", "next week", etc., calculate dates relative to {{date}}.

For appointment times:
- Convert all relative dates (tomorrow, today, next Monday) to absolute dates
- Use ISO 8601 format for all dates and times
- Always consider the call date {{date}} as your reference point

Json Schema:
{your schema here}

Only respond with the JSON.
Available Template Variables You Can Use \-
{{date}}
- Current date when call happened \-
{{now}}
- Full timestamp when call happened \-
{{year}}
,
{{month}}
,
{{day}}
- Individual date components Result With this fix, when a customer says "tomorrow" on July 8, 2025, the LLM will know to calculate it as July 9, 2025 instead of guessing. Where to make this change: In your Assistant's Analysis Plan → Structured Data Plan → Messages (system prompt)
t
Let me check with this prompt in summary
c
Hey thiyag, I wanted to let you know that we're managing a high volume of support requests at the moment, so our response time might be a bit slower than usual. I truly appreciate your understanding and will get back to you as soon as possible!  Thanks again for your patience!
2 Views