0

does callout limitation depends on the number of times the execute method is invoked in a batch class? I have read that it depends on the number of callouts per execute method, so we should use batch size of 1 if have to utilize the maximum of 100 callouts, but if we have 25000 records, and the batch size is 1, will it reach the maximum limit for callouts?

  • For very Salesforce-specific questions, [Salesforce SE](https://salesforce.stackexchange.com) is a better place to ask. – identigral Aug 22 '19 at 21:17

1 Answers1

0

In batch job every start,execute and finish get fresh set of governor limits because they're separate transactions. So you get 100 callouts. You still must complete them under 120 seconds - but that's a different limit.

I'm not aware of any limit how many callouts you can make within 24 h so probably there isn't one. There's this limit though

The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period: 250,000 or the number of user licenses in your org multiplied by 200, whichever is greater

You will have to balance it all out. If the callouts take 1 second (so you can do all 100) - feel free to set the batch size to 1 and really use 250K execute's. I can't imagine what functionality would require 100 webservice calls to process one record - but in theory you can. If you need to process more than 250K records daily - well, increase the batch size but then you grand total of possible callouts goes down.

eyescream
  • 18,088
  • 2
  • 34
  • 46