I have a requirement where in I need to call an API that will return me up to 100 fields and every field would contain maximum 255 characters.

My question is is there any limitation in salesforce that is related to size of data I can read in an API call. This size will help me in defining my Batch size.



1 Answer 1


Here's my advice: don't overthink it. You can't possibly harm the platform with any size you might set, because the platform will reduce the batch size dynamically as the number of fields and/or size of the fields changes. Your main concern should be if your client can handle it. For mobile devices, and really, anything that a user interacts with directly, should probably use smaller values, because it'll be more responsive for the user experience (e.g. use less memory and data bandwidth). For large-scale data replication to desktops or servers, feel free to set it to 2,000; if the system can't accommodate you, it'll make the batch size smaller.

  • Do you mean that, if I submit 50000 records with batch size of 2000, depending upon the data bandwidth, sales force will change the batch size ? Dec 29, 2016 at 6:53
  • @sfdeveloper Your question appeared to be about queries. Are you asking about insert/update/delete statements?
    – sfdcfox
    Dec 29, 2016 at 7:07
  • my question is regarding data bandwidth limits while reading data from external systems. so is there any limits to read data from external systems in one REST API call. Dec 29, 2016 at 8:04
  • @sfdeveloper That's a completely different question than what you originally posited. When you're making callouts, you do have a 6 MB/12 MB limit per transaction, so you'll need to plan with that limit in mind. Odds are, you'll want to use a batch size of about 200 in that case.
    – sfdcfox
    Dec 29, 2016 at 8:40
  • is it 6 MB or 12 MB or it depends. Dec 29, 2016 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .