Help Center Batch Processing Set Up Batch Processing

Set Up Batch Document Processing in Salesforce with Dochly

Updated June 2026 8 min read Batch Processing
Batch document processing generates documents for hundreds or thousands of Salesforce records in a single automated operation — no manual record-by-record clicks, no user action required. This guide covers everything you need to configure before running your first batch job: permissions, source report setup, output format, storage, delivery, and notification settings.

What batch processing is

Batch processing in Dochly takes a Salesforce report — which defines a set of records — and generates a personalised document for every record in that report simultaneously. Each document is unique, populated with the live data from its individual Salesforce record, and stored back on that record automatically.

The key difference from single document generation is scale and automation: instead of opening each record and clicking Generate, batch processing handles the entire set in one operation, running in the background while your team continues working.

Without batch

Manual generation

  • Open each Salesforce record individually
  • Click Generate Document on every record
  • 50 invoices = 50 separate clicks and waits
  • Easy to miss records or generate inconsistently
  • Requires user presence throughout
With batch

Batch processing

  • One report defines all target records
  • One click (or scheduled) starts the entire run
  • 50 invoices = same time as 500 invoices
  • Consistent output — same template, same settings
  • Runs in background — no user presence needed

When to use batch vs single generation

Use batch when

You need to generate the same document type for more than 5–10 records at once. The records share a common filter (same month, same status, same region). The operation is recurring — monthly invoices, quarterly reports, annual renewals. Speed and consistency matter more than per-document customisation at send time.

Use single generation when

Generating one document for a specific record in an active deal workflow — e.g. a sales rep generating a proposal for a customer they're about to call. The document requires per-send customisation (specific signer, custom message, override settings). The record count is small enough to handle manually.


Common use cases

Monthly

Invoice run for all Closed Won deals

Generate and send invoices for every Opportunity closed this month in a single end-of-month batch operation.

Annual

Contract renewal pack for all active accounts

Generate personalised renewal agreements for every active Account contract expiring in the next 90 days.

Compliance

Policy acknowledgement distribution

Generate and send policy documents to all Contacts who haven't acknowledged an updated terms or compliance notice.

HR

Employee document batch

Generate onboarding packets, handbook acknowledgements, or benefit summaries for all employees who joined this quarter.

Quarterly

Account statement generation

Generate quarterly account summaries for all active Accounts, storing each statement on the Account record automatically.

Ad hoc

Bulk data export to PDF/Word

Generate formatted reports from any Salesforce report — converting CRM data into branded, distributable documents at any scale.


Prerequisites

Confirm these are in place before configuring batch processing settings:

Dochly installed and connected

Dochly must be installed from AppExchange and the connection status must be green. Batch Processing requires a connected Dochly instance — Setup Wizard must have been completed successfully. See Install Dochly from AppExchange.

Dochly Admin permission set

Batch job configuration requires the Dochly Admin permission set. Verify it's assigned: Setup → Users → [Your User] → Permission Set Assignments. The Dochly User permission set is not sufficient for configuring batch jobs.

At least one Active template

Batch jobs require an Active Dochly template to generate from. Confirm at least one template is set to Active status in Dochly → Templates before configuring a batch job. Draft templates cannot be used in batch runs.

A Salesforce report ready

Batch jobs use Salesforce reports as their record source. You need a report saved in a shared or public folder that returns the records you want to generate documents for. The report must include the Record ID column.


Setup walkthrough

1

Confirm permissions and access

Open the Dochly app → Batch Jobs. If you can see the Batch Jobs tab and the New Job button, your permissions are correct. If the tab is missing or greyed out, confirm the Dochly Admin permission set is assigned to your user.

Also confirm the users who will run batch jobs (if different from you) have at minimum the Dochly User permission set — they can run pre-configured jobs but cannot create or modify job configurations without Dochly Admin.

2

Prepare the source Salesforce report

Before creating a batch job, prepare the Salesforce report that will define which records get documents. The report must meet these requirements:

  • Report type is based on the same object as your template's primary object
  • The Record ID column is included
  • Filters use relative date values where applicable ("This Month", "Last 90 Days") so the report stays relevant on re-runs without manual updates
  • The report is saved in a Public or shared folder — not a personal folder
  • The report is a Tabular or Summary report type — Matrix reports are not supported as batch sources

Run the report and verify the row count is as expected. Every row becomes one document generation — confirm there are no unexpected records in the results before using the report as a batch source.

3

Configure output settings

Go to Dochly → Batch Jobs → Settings (or configure per-job in the New Job panel). Set the default output configuration:

Batch Jobs → Output Settings

Required
Output format

PDF (recommended for most batch jobs), DOCX, or XLSX. PDF is the most compatible format for storage, sharing, and email delivery. Set per-job to override the default.

Recommended: PDF
File naming

Configure the file name pattern for generated documents. Use merge fields for dynamic names — e.g. {{Account.Name}} — Invoice — {{CloseDate | date: "YYYY-MM"}}. Clear file names make documents easy to find in the Files related list.

Recommended: include record name and document type
Concurrency

How many documents to generate simultaneously. Higher concurrency = faster completion but more Salesforce API usage. For large jobs (>500 records), start with medium concurrency to avoid API limit errors. Adjust based on org limits.

Recommended: Medium (default) for most orgs
4

Configure delivery and storage

Batch Jobs → Storage & Delivery

Required
Storage destination

Where generated documents are stored. Attach to originating record is the standard setting — stores each PDF on the Salesforce record it was generated from, in that record's Files related list.

Recommended: Attach to originating record
Email delivery

Optionally email each generated document to the record's associated contact. Set the recipient field (e.g. Contact.Email), email subject, and body. Each recipient receives their own personalised document — not a shared attachment.

Optional — enable for customer-facing batch runs
Post-generation field update

Optionally update a Salesforce field on each processed record when generation completes — e.g. set Invoice_Sent__c = TRUE. Use this as a prevention field to stop the same records being processed in the next batch run.

Recommended: configure a prevention checkbox field
5

Configure notifications

Set who receives notifications about batch job progress and completion. Go to Dochly → Batch Jobs → Settings → Notifications:

  • Completion email: Sent to the configured admin address when the job finishes — shows total processed, success count, failure count, and a link to the full log
  • Failure alerts: Sent immediately when any record fails to generate — allows prompt investigation without waiting for the full job to complete
  • Progress notifications: Optional — send updates at milestones (25%, 50%, 75% complete) for long-running jobs
6

Run a test batch with 5 records

Before running a full production batch, test with a small subset. Filter your source report to return only 3–5 records (use a specific Account name or date range to limit scope). Run the batch job and verify:

  • Documents generate and attach to each record's Files list
  • File names match the configured naming convention
  • Email delivery works if enabled — check that test recipients receive the email
  • Post-generation field updates are applied correctly
  • The job log shows success for all test records

Once the test confirms correct behaviour, update the report to its full production filter set and run the full batch.


Batch size and governor limits

Dochly batch processing runs outside the Salesforce transaction context — using asynchronous Apex and Salesforce Bulk API — which means it avoids the most restrictive Governor Limits that affect synchronous operations. However, some limits still apply.

Recommended batch sizes

Up to 500 records: runs smoothly with default settings. 500–2,000 records: use medium or low concurrency to spread API calls. Over 2,000 records: split into multiple jobs across different time windows, or use Dochly's scheduled batch feature to spread load across days.

Processing time

50 records: approximately 1–3 minutes. 500 records: approximately 10–20 minutes. 5,000 records: approximately 1–3 hours depending on template complexity and concurrency setting. Large jobs run in the background — close the browser and come back to check the job log.

Email delivery limits

Salesforce limits outbound emails to 5,000 per day for most orgs. If your batch run emails documents to more than 5,000 recipients in a day, split the run across multiple days or use Salesforce's Mass Email feature for very large volumes.

Storage consumption

Each generated document consumes Salesforce File storage. A 200KB PDF × 1,000 records = ~200MB of storage. Monitor Salesforce storage usage (Setup → Storage → File Storage) before running large batches to avoid hitting org storage limits.


Frequently asked questions

Dochly processes exactly the records returned by the report at the time the batch job runs — including all report filters. If the report has a filter for "Stage = Closed Won AND Close Date = This Month", only those records are processed. This is the correct approach — your report filters define the batch scope, giving you full control over which records get documents.
Yes, multiple batch jobs can run simultaneously. Each job runs independently in its own async context. Running multiple large jobs at the same time increases total Salesforce API usage — if you have large jobs, stagger them by 30–60 minutes to avoid API limit collisions. Dochly → Batch Jobs → Active Jobs shows all currently running jobs across the org.
Dochly batch jobs checkpoint progress — completed records are not re-processed if the job is interrupted or needs to be retried. If you configured a post-generation field update (e.g. Invoice_Sent__c = TRUE), already-processed records are excluded from the re-run because they no longer match the report filter. For jobs without a prevention field, you would need to manually identify and exclude already-processed records before re-running.

Batch processing is now configured and ready to run. Next in this series: Run a batch document job from a Salesforce report — create your first batch job, configure the report source, and launch the generation run.

Dochly
Salesforce AppExchange — UTECH HUB Install Dochly on AppExchange

Rated 5 stars · Native Salesforce app · Free to install