Help Center Batch Processing Monitor and Track Batch Jobs

Monitor and Track Batch Document Jobs in Dochly

Updated June 2026 7 min read Batch Processing
Dochly doesn't have an Active Jobs panel or a Job History screen — every call to a bulk action creates a DH_Generation_Batch__c record that tracks progress with Total, Completed, Failed, Cancelled, and Status fields, and you can poll it programmatically with the Dochly: Get Batch Status Flow action. This guide covers every monitoring touchpoint: where to look, what the status values mean, how to read the tracking record, investigating failures, and building your own notifications.

Where to monitor batch runs

DH_Generation_Batch__c record

Created automatically for every bulk action call. Total, Completed, Failed, Cancelled, and Status fields give you the authoritative picture of a run.

Dochly: Get Batch Status action

Call this Flow action with a batchId to get total / completed / failed / cancelled / status / isFinished programmatically — the basis for polling, notifications, or a custom progress UI.

Reports on DH_Generation_Batch__c

Build a standard Salesforce report or list view on this object to see every batch run across the org, filterable by Status, and to spot long-running or stuck runs.

The target records themselves

Each successfully processed record has the generated document in its Files related list. Spot-check individual records here to confirm output — this is the ground truth for whether a specific record's document exists.

Notifications you build

Dochly doesn't send batch emails on its own. Add a Send Email step to your Flow (after checking Get Batch Status) if you want completion or failure alerts.

Salesforce Apex Jobs

Setup → Apex Jobs. Shows the async Apex execution behind a bulk action call, alongside any other async Apex in your org — useful for investigating Salesforce-level queue delays.


Batch status reference

The DH_Generation_Batch__c record's Status field takes one of six values:

Queued

Run is waiting to start

The bulk action call has been submitted and is waiting for asynchronous processing to begin. For orgs with many concurrent async jobs, queuing may take a few minutes before processing starts.

In Progress

Records are actively being generated

Poll Dochly: Get Batch Status (or check the DH_Generation_Batch__c record directly) to see Completed/Failed/Cancelled counts increase as the run proceeds.

Completed

All records processed successfully

Every record in the Id collection was processed with no failures. Completed = Total, Failed = 0.

Completed With Errors

Run finished but some records failed

The run finished, but Failed > 0 — typically due to missing data or a template error on specific records. Successful records have documents; failed records do not.

Failed

The run itself failed

Processing did not complete — distinct from Completed With Errors, where the run finished but individual records failed. A Failed status usually points to a configuration problem (e.g. an invalid Template Id) rather than per-record data issues.

Cancelled

Run was stopped before completion

The underlying async Apex job was aborted (Setup → Apex Jobs) before finishing. Records already processed retain their documents; unprocessed records were skipped.


Reading the DH_Generation_Batch__c record

The DH_Generation_Batch__c record is the primary tool for verifying a batch run. Query it directly, view it as a Salesforce record, or call Dochly: Get Batch Status with its Id. Here's an example of what one looks like once a run finishes:

DH_Generation_Batch__c — June 2026 Invoice Run Completed With Errors
147Total
144Completed
3Failed
0Cancelled
These four counters plus Status are everything the tracking record gives you out of the box — it doesn't list which specific records failed or why. For that level of detail, see "Investigating per-record failures" below.

Investigating per-record failures

Because DH_Generation_Batch__c only reports aggregate counts, finding out exactly which records failed and why takes a bit more legwork:

Check the records directly

The most reliable method: query or list-view your target Id collection and check each record's Files related list. Records with no new file are the ones that failed. Cross-reference the Failed count on DH_Generation_Batch__c to confirm you've found all of them.

Build your own fault-path logging

If you need a persistent, queryable log of exactly which record failed and why, add a Fault path after the bulk action element in your Flow that writes the error details to a custom object (or a Task, or a Chatter post) — Dochly doesn't provide this out of the box.

Common failure causes

Blank required merge fields, a formula field that errors on specific records, field-level security blocking the Dochly integration user from a field the template references, or a record that was deleted/merged between query time and generation time.

Re-processing failures

Once you've identified the failed record Ids (by comparing your original Id collection against which records now have a generated Files entry), build a new Id collection containing just those records and call the bulk action again after fixing the underlying data issue.

See Batch processing troubleshooting for the most common generation-failure causes and fixes.


Live progress with Get Batch Status

There's no auto-refreshing progress panel in Dochly. To track a run in progress, call Dochly: Get Batch Status with the batchId your Flow captured when it invoked the bulk action.

What it returns

total, completed, failed, cancelled, status, and isFinished (a boolean). Use isFinished to decide whether to keep polling or move on to a completion step.

Building a polling pattern

A common approach: a Wait element followed by a Get Batch Status call in a loop, exiting once isFinished is true — or a separate Scheduled-Trigger Flow that periodically checks open DH_Generation_Batch__c records. If you need a live UI, a Screen Flow with a Get Batch Status call on a refresh action is the closest equivalent to a "progress panel," and it's something you build, not something Dochly ships.


Building in notifications

Dochly has no notification settings screen. Add these directly to your Flow:

Completion notification

After confirming isFinished via Dochly: Get Batch Status, add a Send Email action with the Total/Completed/Failed/Cancelled counts and a link to the DH_Generation_Batch__c record. Send it whether the run finished cleanly or with errors.

Failure alert

Add a Decision element that checks Status = Failed (or Completed With Errors) and branches to an immediate alert email or Chatter post, rather than waiting for a scheduled completion check.


Reflecting status on your own records

Dochly's package doesn't automatically write status fields onto the records you process — the only status tracking it provides is the DH_Generation_Batch__c record itself. If you want per-record visibility in your own reports and dashboards, build it yourself as part of your Flow, as covered in Set up batch document processing:

A custom checkbox field

Add your own field (e.g. Invoice_Sent__c) and set it to TRUE in a Flow step after the batch reaches a finished Status. Use it as a prevention filter for recurring runs and as a report filter for "records generated" dashboards.

A custom date/time field

Add your own field (e.g. Generated_Date__c) and populate it with the current datetime in the same post-batch Flow step, for time-to-generate reporting.

Use them in Salesforce reports

Once you've built these fields, add them to your Opportunity or Account reports to show which records have been processed by a given batch run.

Trigger downstream automation

Build a record-triggered Flow on your custom "generated" checkbox changing to TRUE — update the Opportunity Stage, create a Task, post to Chatter, or start the next step in your process.


Frequently asked questions

DH_Generation_Batch__c records are ordinary Salesforce records and persist according to your org's normal data retention — they aren't automatically purged by Dochly. For a permanent audit trail beyond the aggregate counts (e.g. which records failed and why), build your own logging as described in "Investigating per-record failures" above, since Dochly doesn't ship a separate detailed job-log object.
Check the Failed count on the DH_Generation_Batch__c record first to confirm how many records failed. Then compare your original Id collection against which of those records now have a new file in their Files related list — the ones without a new file are the failures. See Batch processing troubleshooting for common causes.
Yes, for the aggregate level: build a Salesforce report on the DH_Generation_Batch__c object (Total, Completed, Failed, Cancelled, Status, per run) and export it to CSV. There's no built-in per-record log object to export — if you need row-level detail per record, you'll need the custom fault-path logging described above.

Batch monitoring gives you visibility into every generation run through the DH_Generation_Batch__c record and the Get Batch Status action. Final guide in this series: Batch processing troubleshooting — common errors and fixes in Dochly — diagnose and fix every batch processing issue from Flow errors to generation failures.

Dochly
Get Early Access Contact Us to Get Started with Dochly

Not on AppExchange yet — contact us and we'll set you up