Run Email Distributor Batch for Different Outgoing Emails

We improved Batch email sending status by adding new email message and context information fields. Also, we made the form itself more user-friendly and functional.
Learn in detail about these improvements >>

On the other hand, to support new mail message fields such as Cc, Bcc and Reply-to we also needed to extend the existing Email distributor batch; this extension we called Docentric email distributor batch.
Learn how to turn on Docentric Email distributor batch >>

We also enabled better error logging of the email messages sent via Docentric Email distributor batch.
Learn more >>

In version 3.4.1 we additionally improved the Email distributor batch job by enabling a dynamic filter for messages to be processed and also introduced a new operation for cleanup of Batch email sending status.

We are proud to give back to the community by releasing all Email processing improvements for free! Download Docentric Free Edition and try them out right away >>

Dynamic filter for Email distributor batch

Email distributor batch is a built-in operation which iterates through the Batch email sending status records and sends out the email messages that are in the Waiting status. However, there is no option to run different batch jobs for different records.

Let's say that we want to schedule a single batch job for sending outgoing emails with customer invoices and another batch job for sending alert email notifications. With Docentric improvements you can now do that!

Filter for the first batch job should be configured using the Context information field set to SalesInvoice.Report. We will set up Task description to Sends Sales invoices - Email distributor batch.


Filter for the second batch job should be configured using the Alert Rule ID field of the joint table Event inbox which should not be empty (query range value expression: !""). We will set up Task description to Sends alert emails - Email distributor batch.




After scheduling the Sends Sales invoices - Email distributor batch and Sends alert emails - Email distributor batch batch jobs, we can see them in Batch jobs.

In our case, we have 3 alert emails in Batch email sending status waiting to be sent, i.e. in the Waiting status:

After the batch job with the Sends alert emails - Email distributor batch description is executed, these 3 alert emails will change the status to Sent.


Similarly, the Sends Sales invoices - Email distributor batch batch job will send all emails with the Sales invoice reports from Batch email sending status that are in the Waiting status.

Email distributor cleanup

Email distributor cleanup is a new operation created by Docentric which deletes the Batch email sending status records selected via the same dynamic filter (Records to include) as for Docentric email distributor batch.

Unlike Docentric email distributor batch, (Docentric) Email distributor cleanup operation has parameters. They are Created date and time range, Latest status change date time range and Status. Messages that are currently being processed by Email distributor batch cannot be deleted and will be skipped.

The cleanup operation is irreversible. Once the operation is performed, the selected email messages will be physically deleted from the database and cannot be restored.
If you want to archive email messages before deleting them forever, you can subscribe to a special delegate - DocSysEmailCleanupService.processDeletingRecord, and implement an event handler that will copy each deleting Batch email sending status record into your custom table for archiving purposes.

See the related documentation on improved email processing >>

Leave a Reply

Your email address will not be published. Required fields are marked *


Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>