Batch Processing Troubleshooting — Common Errors and Fixes in Dochly
First checks before troubleshooting
Most batch errors are documented in the job log with an exact error reason per record. Before investigating further, open Dochly → Batch Jobs → Job History → [Job Name] and read the failure rows. The error reason text usually identifies the fix directly.
Run the source report directly in Salesforce Reports. Confirm it returns the expected records and that the ID column is present. Many batch issues trace back to a report that has changed, moved to a personal folder, or returned unexpected results.
If generation is failing on multiple records, test the template individually: open a record from the failing set and use Dochly → Generate Document (single record mode). If single generation also fails, the issue is in the template — not the batch configuration.
Dochly → Settings → Connection Status must show green. An expired or disconnected connection causes all batch jobs to fail at the API call stage. Re-authenticate if the status shows yellow or red.
Job won't start or stays queued
- Salesforce async Apex queue is at capacity — too many concurrent async jobs across the org
- Another large Dochly batch job is consuming available async workers
- Salesforce is experiencing a platform delay — check trust.salesforce.com for org-level incidents
- Check Setup → Apex Jobs → Scheduled and Queued jobs — if the queue is full with other jobs, wait for them to clear before your job picks up
- Check trust.salesforce.com for any active incidents on your Salesforce instance
- If the queue is clear and the job still hasn't started after 15 minutes, cancel it and relaunch — occasionally async submissions get stuck and a fresh submission resolves it
- The Dochly Admin permission set is not assigned to your user — only Dochly Admin can create batch jobs
- No Active templates exist in the org — batch jobs require at least one Active template
- Dochly connection is disconnected — batch jobs cannot be launched without an active connection
- Setup → Users → [Your User] → Permission Set Assignments — confirm Dochly Admin is listed
- Dochly → Templates — confirm at least one template has status Active (not Draft)
- Dochly → Settings → Connection Status — reconnect if the status is not green
Report validation errors
- The report was built without adding the Record ID field as a column
- The report uses a custom ID field rather than the standard Salesforce ID field
- Open the report in Salesforce → Edit → add the Record ID column (field label: "Opportunity ID", "Account ID" etc. — the standard 18-character Salesforce ID field for the object)
- Save the report and re-select it in the batch job panel — validation should now pass
- Report was moved to a personal folder — Dochly cannot access reports in personal folders
- Report was deleted or renamed after being saved to a batch job configuration
- The Dochly system user doesn't have access to the folder containing the report
- Open the report in Salesforce → click the folder name in the breadcrumb → confirm it is a Public or shared folder (not "My Personal Custom Reports")
- If in a personal folder: Reports → click the report's dropdown → Move → select a public folder
- If the report was deleted, recreate it and update the batch job configuration to point to the new report
Generation failures on specific records
- A required merge field in the template is blank on the failing records but populated on the successful ones
- A formula field referenced in the template throws an error on specific records due to a data edge case (e.g. division by zero, null parent reference)
- A conditional logic branch references a field that is null on only some records
- Open one of the failing records in Salesforce — compare its field values to a successfully generated record. Identify the field that differs (blank vs populated)
- For merge fields that may be blank: add a default value filter in the template:
{{Field__c | default: "N/A"}} - For formula field errors: check the formula on the affected records in Salesforce — formula errors show as #Error in the record. Fix the formula or the underlying data
- Run a targeted re-job for the failed records only after fixing the data issues
- The Dochly system user's profile or permission set doesn't have Read access to a field used in the template
- Salesforce sharing rules restrict the Dochly system user from accessing certain records
- Field-level security was changed after the template was built — a field that was accessible is now restricted
- Setup → Object Manager → [Object] → Fields → [Field] → Field Accessibility — confirm the Dochly system user's profile has Read access
- Setup → Sharing Settings — confirm the org-wide default or sharing rules allow the Dochly system user to access the affected records
- For org-wide changes: Setup → Users → [Dochly System User] → verify the profile and permission sets still include all required object and field permissions
Email delivery failures
- Emails landed in spam or were filtered by the recipient's email security system
- Org-level Salesforce email deliverability is set to "System email only" — blocking outbound customer-facing email
- The daily Salesforce email limit (5,000 emails/day for most orgs) was hit during the batch run — emails after the limit are dropped silently
- The email delivery field (Contact.Email) contained an invalid or inactive address
- Setup → Deliverability → confirm Access Level is "All email" (not "System email only")
- Setup → Email Log Files — generate a log for the batch run date/time window and check for delivery failures or bounces per address
- For large batches approaching 5,000 emails: split into multiple jobs run on different days, or use Salesforce Mass Email or Marketing Cloud for high-volume sends
- Ask recipients to check spam/junk folders and whitelist the sending domain
- The email field is empty on those specific records — contact data is incomplete
- The wrong email field is configured as the delivery recipient — e.g. Account.Email instead of Contact.Email
- Populate the email field on each failed record — or update via a mass update if many records are affected
- Check the delivery field configuration in Dochly → Batch Jobs → [Job] → Delivery Settings — confirm the correct email field is selected
- Add the email field as a column in the source report filter — "Email is not blank" — to exclude records without email addresses from future runs
Scheduled job not triggering
- The schedule was deactivated (accidentally or by another admin) before the trigger time
- The timezone configured on the schedule doesn't match the org's timezone — the job ran at the wrong local time
- The Salesforce scheduled Apex job was aborted — check Setup → Apex Jobs → Scheduled Jobs
- Salesforce had a platform incident at the exact trigger time — check trust.salesforce.com for the relevant date/time
- Dochly → Batch Jobs → Scheduled Jobs — confirm the job status is Active and the "Next run" datetime matches what you expect
- Setup → Apex Jobs → Scheduled Jobs — confirm the Dochly scheduled job appears and its Next Scheduled Run is correct in UTC (Salesforce stores scheduled Apex in UTC — convert from your local timezone)
- If the Apex job is missing: deactivate and reactivate the Dochly schedule to recreate the Apex scheduled job entry
- Verify the timezone in the schedule configuration matches the timezone the times are expressed in
Duplicate documents generated
- No prevention field is configured — the same records are included in every batch run because the report filter doesn't exclude already-processed records
- A manual re-run was launched on top of a scheduled run that also fired — both processed the same records
- The prevention field was reset prematurely before the next batch cycle was intended to start
- Configure a prevention field (checkbox) on the object and add a report filter for that field being FALSE. Configure a post-generation update to set it TRUE. See Schedule a batch run for the full prevention field pattern
- For existing duplicates: delete the older file versions from the affected records' Files lists. Sort by Created Date to identify which is the correct (most recent) version to keep
- If using scheduled jobs: do not also run manual "Run Now" jobs covering the same record set on the same day
Storage and file errors
- The Salesforce org has reached its File Storage limit — no more files can be created
- A very large batch run was started without checking available storage first
- Setup → Storage Usage — check available File Storage. If near the limit, free space by archiving or deleting older files before re-running
- Estimate required storage before large runs: average document size (KB) × number of records = total storage needed. Confirm this is available before launching
- Consider using an external storage destination (e.g. SharePoint or Google Drive via Dochly integrations) for large-volume batch runs to avoid consuming Salesforce file storage
Quick-reference error table
| Symptom | Most likely cause | Fix |
|---|---|---|
| Job stays Queued >10 min | Apex queue full or Salesforce platform delay | Check Apex Jobs queue; check trust.salesforce.com; relaunch if needed |
| New Batch Job button disabled | Missing Dochly Admin permission or no Active template | Assign Dochly Admin permission set; set a template to Active |
| Report validation: ID column not found | Report missing the Record ID column | Add the standard ID field column to the report |
| Report not accessible | Report in personal folder or deleted | Move report to a shared public folder |
| Generation error on some records | Blank required field or formula error on specific records | Open failing record; fix missing data; re-run targeted job |
| Insufficient access errors | Dochly system user missing field/record access | Check field-level security and sharing rules for the system user |
| Emails not received | Deliverability off; daily limit hit; spam filtering | Check Setup Deliverability; check Email Log; split large runs across days |
| Email field blank errors | Contact.Email empty on specific records | Populate email field; filter report to exclude blank email records |
| Scheduled job didn't fire | Schedule deactivated; timezone mismatch; Apex job aborted | Check Scheduled Jobs in Dochly and Apex Jobs in Setup; reactivate if needed |
| Duplicate documents on records | No prevention field; job ran twice against same records | Configure prevention checkbox field with post-generation update |
| Storage limit errors mid-run | Salesforce File Storage at capacity | Check and free storage before running; use external storage for large volumes |
Support checklist — what to include when contacting Dochly support
If the issue persists after working through the relevant sections, include this information when contacting support for the fastest resolution.
- 1The batch job name and its current status (Queued / Processing / Completed with failures / Cancelled)
- 2A screenshot of the job log summary — showing total, success, failure counts, and duration
- 3The exact error reason text from 2–3 of the failing records in the per-record log
- 4The Salesforce Record ID of one specific failing record — so support can investigate the data on that record
- 5The template name and whether single-record generation also fails for the same record
- 6The source report name and whether the report validates successfully when you select it in the job panel
- 7For scheduled job issues: the schedule configuration (frequency, time, timezone) and the exact time the job was expected to run vs when it actually ran (or didn't)
- 8Whether this is a new issue (worked before and broke) or has never worked — and any recent changes (template edits, permission changes, report moves, Salesforce releases) that may coincide
Frequently asked questions
Batch Processing series complete
You've covered the full Dochly Batch Processing series — setup, running jobs from reports, scheduling recurring runs, monitoring and tracking results, and troubleshooting every common error. Your batch document workflows are now production-ready.
Rated 5 stars · Native Salesforce app · Free to install