Campaign API limits and reliability
# support
l
I have question about campaign API. If I have 100 concurrent requests in VAPI, and my plan is to send 50k calls with one campaign with schedule start and end time, how it is handled by campaign? Vapi schedule calls only to this schedulePlan? other calls in queue ? campaign is finished, when all customers are processed? Im afraid of losing data, because of campaign API issues. is there time limit like for openai batch api 24h?
c
Hi legolaz1336, For handling a large scale campaign like you described, Vapi processes calls according to your set concurrency limits. If you have 100 concurrent requests, those are the maximum calls processed at any given time. Here’s how it's handled: - **Scheduling**: Vapi will adhere to your specified schedule for starting and ending the campaign. Calls will be made only within this schedule. - **Queue Management**: If your campaign isn't completed within the desired time frame due to concurrency limits, the remaining calls will be queued. They'll be processed as soon as slots become available, respecting your scheduled timings. - **Completion**: The campaign is considered complete when all scheduled calls have been processed. As for reliability and data loss concerns, Vapi ensures queue management for calls but doesn’t impose a strict 24-hour time limit like OpenAI. The calls remain in the queue until processed. For improvements or additional reliability, you might consider an enterprise plan which offers unlimited concurrency and includes reserved capacity options ([see more here](https://docs.vapi.ai/enterprise/plans)).
l
@Kings_big💫 is ther a limit of concurrent campaign at the same time? how is it handled during parallel campaigns? is it calling sequentially campaign to campaign or processing at the same time?
k
Vapi concurrency limit default is 10, attempting to make more than your limit will result in failed connections, which can hinder your outreach efforts significantly..
l
Is there a limit to how many campaigns can run concurrently (e.g. running two campaigns with 50 calls each)? How is it managed when multiple campaigns run in parallel? Are the campaigns executed sequentially?
k
You can run as many campaigns in parallel as you want, up to your total concurrency limit..
l
thanks you!
@Kings_big💫 I created campaign with 449 calls, but it got stuck on 375, could you please check? campaign_id = 'e855a2af-5527-4564-a69c-230b3051dfd3' Im not sure, but this call is the last '01094a48-c85d-409d-a3af-07c630950da0'
k
Looking into it
Ended Reason call.in-progress.error-providerfault-outbound-sip-503-service-unavailable
Call failed to start because of subscription concurrency limit error..
l
are there calls in queue? they should have been ended 🤔 or you are saying there is timeout of rate limit error? all calls should have max duration 5mins, but it was more than this time limit.
k
Means you’ve reached the maximum number of simultaneous calls allowed by your plan..
l
ok ok, I thought campaign should handle it under the hood and we dont need to think of maintenance of paralleliazation. I dont understand now how it works. Seems if I go to agency or startup plans, we still can encounter being stuck.
k
Vapi auto-manages campaigns within your plan’s concurrency limit, but if calls exceed that limit or overlap, they may queue or fail so higher plans reduce but don’t eliminate the risk unless you upgrade to Enterprise..
l
Given that calls can fail even within a campaign, what is the recommended best practice for ensuring all contacts in a large list are eventually called? Should I implement my own retry logic on my side to handle these concurrency limit failures? Or should I be pacing the creation of smaller campaigns, but now it doesnt make sense to rely on campaign? Campaign feature was rolled out for non code users?
I think with current logic of management queue in campaign, it should stuck any how, right? if those calls, where got concurrency issue, they flagged as customer busy, then we release the available slots. so there might be other issues why campaign stuck on 375 calls 😢
k
Set up your schedule plan so that all calls get triggered at least once, rather than splitting them into multiple smaller campaigns. The goal is to use your own schedule plan while keeping the concurrency limit in mind, ensuring all your calls go through without any issues. All campaigns run in parallel, no matter whose account they're on. So, if you schedule more than one, they'll run side by side instead of one after the other. There's no cap on how many campaigns you can run at once, but there is a limit on the number of concurrent calls you can make, based on your organization's concurrency limit.
If you’re using your own OpenAI key, you might Batch API concurrent request limit.
There's a new update coming this week to the campaign API. It'll let you know if any calls were dropped or didn't trigger because of this concurrency limit. Until a call is scheduled or triggered, it stays in a scheduled state. It's a good idea to set up your schedule plan considering the call concurrency limit and average call duration, so you have some buffer time and avoid hitting the limit..
l
it is good news. could you please overriding maxDurationSeconds attribute, when creating campaign, I see no error sending post request, but the call exceeds max duration.
Copy code
campaign_payload = {
  "name": "09_120505_2",
  "phoneNumberId": "9cd54dca",
  "assistantId": "d4cbadbb",
  
  "customers": [

    {
      "number": "+32030",
      "numberE164CheckEnabled": False,
      "name": "f934b",
      
      "assistantOverrides": {
        "variableValues": {

          "name": "DGDG ant",
          "address": "addresss",
          "maxDurationSeconds": 10,
        }
      }
    },
  ]
}
not working
c
Hey legolaz1336, Thanks for reaching out! We're currently swamped with a bunch of tickets and it's taking us longer than usual to get back to everyone. I know waiting isn't fun, but we want to make sure we give your issue the attention it deserves rather than rushing through it. We'll circle back with you soon to get this sorted out.
k
MaxDurationSeconds must be set at the assistant level or directly in the call payload, it won’t work inside assistantOverrides.variableValues because that only handles template variables..
2 Views