Salesforce Document Generation Limits in 2026: What They Are and How to Work Within Them
Salesforce document generation limits are the platform limits that any generation process runs within: governor limits like heap and CPU time, file size and storage limits, and batch processing limits. Knowing them helps you build reliably at scale.
This guide explains the Salesforce document generation limits that matter in 2026, how they affect generation, and how a native tool is designed to work within them.
Exact figures change over time and vary by edition, so we describe the categories and mitigation rather than specific numbers. Always confirm current limits in the official Salesforce documentation for your org.
Governor limits in Salesforce document generation
The core Salesforce document generation limits are governor limits: heap size, CPU time, and the number of records and queries allowed in a transaction. Generating a document consumes these resources, so large or complex documents can approach them.
A single large document, or many generated at once, uses heap and CPU within a Salesforce transaction. Well-built native tools stay within these limits by processing efficiently and using asynchronous or batch patterns for heavy jobs.
Tools that call an external service move some processing outside the org, which trades governor limits for callout limits and data-residency considerations instead.
CPU and heap
Each transaction has CPU time and heap limits that document generation consumes.
Query limits
The number of records and SOQL queries per transaction is capped by the platform.
File size and storage among Salesforce document generation limits
Salesforce document generation limits also include file size and file storage limits, which apply to the generated documents stored in your org and vary by edition. Large documents can approach per-file size limits, and high volume consumes storage.
Two things to manage: individual document size, and the cumulative storage that generated files consume over time. Both can become a cost or a limit as volume grows.
One way to manage storage is to keep generated files out of Salesforce. Dochly Storage can sync documents to external drives so they do not inflate your Salesforce file storage.
Explore: Dochly Storage: control where generated documents live
Batch limits in Salesforce document generation
Batch generation is subject to Salesforce batch processing limits that govern how many records are processed per batch and how many batches run. When you generate thousands of documents, batch and governor limits together set your throughput.
A native tool built for batch chunks work within these limits and processes large volumes reliably, avoiding the errors that come from exceeding a single transaction limit.
See how native batch document processing is designed to handle volume within platform limits.
Confirm current limits for your edition. Governor, file and batch limits change over time and vary by Salesforce edition. Always check the official Salesforce documentation and test at your expected volume.
How native tools cope with Salesforce document generation limits
Native tools cope with Salesforce document generation limits by processing inside the org with limit-aware patterns: batching, asynchronous processing, and careful heap and CPU management, while avoiding callout limits entirely. This lets them generate at scale within the platform.
Because a native tool runs inside Salesforce, it never incurs the callout limits that come with sending data to an external service, and it keeps data inside the trust boundary. It manages governor limits directly rather than working around a middleware boundary.
| Limit type | What it affects | Native approach |
|---|---|---|
| Heap / CPU | Large or complex documents | Efficient in-org processing |
| Callouts | Data sent to external services | None, runs natively |
| File size / storage | Generated documents in the org | Optional external storage |
| Batch | High-volume generation | Native batch chunking |
How to work within Salesforce document generation limits
To work within Salesforce document generation limits, keep documents efficient, use batch for volume, offload storage where useful, and test at your real volume before going live. Each step reduces the risk of hitting a limit in production.
Keep documents efficient
Avoid unnecessarily large or complex templates that consume heap and CPU, and reuse components where possible.
Use batch for volume
For high-volume generation, use native batch processing that chunks work within platform limits rather than one large transaction.
Offload storage and test
Consider external storage for generated files, and test at your expected peak volume before going live.
Salesforce document generation limits: frequently asked questions
Salesforce document generation limits are manageable once you understand them: keep documents efficient, use native batch for volume, offload storage where useful, and test at real volume. A native tool is designed to work within these limits by default.
See native batch processing, manage files with Dochly Storage, or explore native document generation.