Previous

Automate with email jobs

  • 5 min.

Document Output's email jobs allow you to automate generating documents from Business Central reports and sending them directly to the document queue for dispatch. You can set up automation to find and then dispatch unsent documents that match a designated status, posting date, or other table field. This can eliminate manual tasks for sending, and reduce the time you waste just waiting for reports to be generated and rendered before sending emails.

Edit the email job List

You can view the list of E-Mail Jobs through the Document Output > Setup menu.

Role Center_Document Output_Setup_E-Mail Jobs

New installations of Document Output come with two email jobs already set up.

  • The QUEUE job operates once a minute to send all reports in the document queue. You will need to enable this email job to use the document queue.
  • The DELETE_LOG job clears the email log. This is not enabled on new installations, because local legislation may require you to store your email log for different periods.

You can edit this list to add new automated jobs for different email templates. Perhaps you'd like newly posted shipment notices to be sent straight away. Or maybe you want released purchase orders to be sent without waiting for any manual action. Email jobs are where these automatic actions are set up.

E-Mail Jobs_Edit List

Note

Email jobs search for reports that have a 0 value in the No. Printed column of the report table. If a report, for example a purchase order, has been revised and needs to be resent, the No. Printed column no longer has the value 0, and therefore an email job does not find this report. If you add a checkmark at the Disable Check for sent earlier column, the value of the No. Printed column is disregarded and the email job dispatches reports repeatedly until other conditions are no longer met.

Work with table filters and field filters

Once you specify the email template code, the Table Filter is where you specify how the automation should work. Commonly used table filters are built from the status and posting date, but there is a broad range of fields that could suit your company's individual needs. Choose the appropriate field with the Fields Lookup.

Fields Lookup_Status

Lastly, enter the relevant field value in the Field Filter column. For example, the image below shows a table filter set up to automatically find and dispatch unsent purchase orders with a Released status. Depending on the field selected, the value you can enter in the Field Filter column could also be a formula, using Microsoft's formats for date and time, and filter criteria.

Table Filter Purchase Header_Field Number_Caption_Filter

Scenario

In this scenario video, Ester and Robin from Cronus want to set up some automatic sending of reports.

They need to work on these tasks:

  • Purchase orders should be sent as soon as they change from open to released.
  • Shipping notices should be sent as soon as they are posted.

Other resources

More learning resources for this topic include: