scheduledPlan with VAPI
# support
f
I’m working on setting up the scheduledPlan feature in the VAPI voice assistant API and encountering some issues with how the timing parameters are handled. Initially, I only used the earliestAt parameter to schedule the call, but this caused the AI to call twice, which I’m trying to avoid. To fix this, I tested adding the latestAt parameter as well, setting it exactly 1 minute later than earliestAt. However, with this setup, no call was triggered at all. I suspect that the interplay between earliestAt and latestAt might be crucial for correct scheduling, but I’m not sure about the exact expected behavior or how to configure these parameters properly to ensure a single call happens in the desired time window. Could anyone share how you precisely configure scheduledPlan using these parameters? Are there best practices or example configurations that reliably prevent duplicate calls while ensuring calls are actually made within a timeframe? Any insights or code snippets would be very helpful!
v
To reliably schedule a single call in VAPI, set the
earliestAt
parameter to your desired start time and omit
latestAt
unless you need a flexible window. Here’s a recommended example:
Copy code
json
{
  "assistantId": "your-assistant-id",
  "phoneNumberId": "your-phone-number-id",
  "customer": { "number": "+11231231234" },
  "schedulePlan": {
    "earliestAt": "2025-05-30T00:00:00Z"
  }
}
This will trigger the call at or after the specified
earliestAt
time, ensuring only one call is made.
If you use
latestAt
, make sure the window is wide enough for the system to attempt the call; a very narrow window may prevent the call from being triggered at all. For more, see the [Vapi scheduling docs](https://docs.vapi.ai/phone-calling/outbound-calls). Source: - [Outbound Calls | Vapi Documentation](https://docs.vapi.ai/phone-calling/outbound-calls)
f
My Goal: I want to reliably schedule one and only one call at a specific time, with no subsequent retries if the first call is prematurely terminated by the customer. My Configuration: I am using the recommended configuration for a single, fixed-time call: JSON { "assistantId": "your-assistant-id", "phoneNumberId": "your-phone-number-id", "customer": { "number": "+11231231234" }, "schedulePlan": { "earliestAt": "2025-10-15T19:40:00Z" // Note: 'latestAt' is intentionally left empty } } The Issue/Timeline: Scheduled Time: 19:40 (7:40 PM) Actual Call Start: 19:42 (7:42 PM) Customer Action: The customer answered, and the call ran for approximately 1 minute. The customer then hung up (terminated the call). Unexpected Behavior: The VAPI AI initiated a second call approximately 2 minutes later (around 19:45). My Question: I scheduled the call with the intention of having only one attempt. Why did the system automatically redial, even with a strict earliestAt and no latestAt defined? How can I configure the scheduling/call plan to specifically disable the automatic retry mechanism for calls that are terminated by the customer, ensuring the system registers the user hang-up as a "completed" attempt for scheduling purposes?
c
The retry occurred because the latestAt value is left empty. To prevent retries, use latestAt.
Copy code
{
  "assistantId": "your-assistant-id",
  "phoneNumberId": "your-phone-number-id",
  "customer": { "number": "+11231231234" },
  "schedulePlan": {
    "earliestAt": "2025-10-15T19:40:00Z",
    "latestAt": "2025-10-15T19:41:00Z"  // Add this line - 1 minute window or less
  }
}
f
Ok,thank you Kyle. 🙂
c
Glad you were able to get this resolved. We’ve closed this ticket, but your input is very valuable to us. Please take a moment to complete the survey, which should appear in a couple of days—your feedback directly helps us improve our support.
4 Views