Use this page when a document is too big to generate, takes a long time, or stops because your org reached a limit. If you don't know yet why a document failed, start with the document didn't generate checklist.

What you'll see

One of these messages:

Document is too large to process. Please upload a smaller file or split the document into multiple files

Usage policy violation. Please contact support.

Salesforce returned an error: TotalRequests Limit exceeded.

Or no message: generation runs for a long time on records with a lot of related data, or doesn't finish.

The limits

LimitValueWhat you seeDetails
Template size5 MB per template. Larger templates aren't allowed, and the generated file stays within that sizeDME-DOC-001Usually caused by high-resolution images
Email attachmentIf a document is too large, the email is sent without the attachmentThe email arrives with no documentSee The email wasn't sent or arrived without the attachment
Rows per tableAbout 500 rows per table, or records per relationship or query. No hard limit, but performance may suffer beyond thatSlow generationFilter and limit your queries
Composer page timeoutNone, as long as templates stay within these limits—
Bulk batch sizeConfigurable—Use smaller batches for large jobs
Documents per planBasic: 50 per month and 500 per yearDME-LIC-001Bulk and scheduled jobs use it up fastest. Previews count; failed generations don't
Salesforce API requestsYour org's allowance per rolling 24 hours, shared by all appsDME-SF-005Check in Setup → Company Information
Currency formats in one documentUp to 5 (CurrencyCulture1 to CurrencyCulture5)None documentedSee CurrencyCulture

Most likely causes

  1. The template is over 5 MB. Large photos and logos in the template are the most common cause.
  2. The document pulls more data than it needs. Unused relationships, queries without filters, or tables with more than about 500 rows make generation slow.
  3. Your org reached its plan's document limit.
  4. Your org reached its Salesforce API request limit, often during large bulk jobs.

How to fix it

The template is over 5 MB

  1. Compress or resize large images in the template before you upload it. If images come from a URL field, use smaller source images.
  2. Remove embedded objects, fonts or attachments the document doesn't need.
  3. If the document is genuinely large, split it into several templates.

The document pulls too much data

  1. On Gather Data, remove relationships the template doesn't use. Add only the relationships you need, to keep performance fast. See Set up object relationships in Gather Data.
  2. In each query, select only the fields the template uses.
  3. Filter queries to the record you generate from with pv0. Without a pv0 filter, a query isn't limited to the current record. See Filter a query to the current record (pv0).
  4. Add filters, and set Limit to the maximum number of records the document should show. See Use SOQL queries in Docs Made Easy.
  5. Generate the same document from a record with less related data. If that works, the amount of data is the problem, not the template.

If your solution uses an Apex class to fetch data, that code runs under Salesforce governor limits such as heap size and CPU time. Ask your developer to keep its queries selective. See Apex data relationships.

Your plan's document limit is reached

Basic includes 50 documents per month and 500 per year (Reasonable Use Policy). Each merge preview counts as a generated document; failed generations don't count.

  1. Monthly and yearly limits reset at the start of the next period.
  2. Ask your administrator to check whether bulk or scheduled jobs run more often than intended. In Docs Made Easy Pro, the Usages page shows how many documents the org generated, by whom and from which source (API, Composer or Preview). It doesn't show how much of the limit is left. See Track document usage.
  3. If you need more documents now, or want to know your plan's limits, contact us.

Your org reached its Salesforce API request limit

  1. Wait. The limit is calculated over the last 24 hours, so capacity frees up gradually.
  2. Ask your administrator to check API Requests, Last 24 Hours in Setup → Company Information and find which integrations use the most.
  3. Run large bulk jobs outside working hours. On the Document Bulk Merge record, choose Schedule Batch instead of running the batch at once. See Generate bulk documents.
  4. Split a very large bulk job into several smaller queries, for example by date range, and run them on different days.

Who can fix it

CauseWho
Large images, too many fields, splitting a templateThe template author
Relationships, queries, filters and limitsThe solution's administrator
Bulk schedules and the Salesforce API limitYour Salesforce administrator
Plan limitsDocs Made Easy support

Still stuck?

Contact support and send:

  • your Salesforce Org ID (How to share your Org ID)
  • the solution name or ID, and a link to the record you generated from
  • the size of the template file, and roughly how many related records the record has
  • the time it happened, with your time zone
  • the full error message, including the Error code and Reference if shown