Creating Email Jobs

In Continia Document Output, email jobs are used to substitute manual execution of routine tasks with automation. The tasks associated with an email job will be sent to the Document Queue when the email job is run.

To create a new email job, follow these steps:

  1. Choose the Search icon, enter Email Jobs, and then choose the related link.
  2. In the action bar, select New.
  3. In the new line, in the Job No. column, enter a descriptive name for the email job.
  4. In the Type column, select Email Template.
  5. In the Email Template Code column, select a template code.
  6. Optional: To add filters in order to specify in detail which documents to process, do as follows:
    1. Select the Table Filter field to open the corresponding page.
    2. Select a line in the table to add a filter.
    3. In the Field Number field, select the three dots to open the Fields Lookup page. This page lists all available fields from the first table that's linked to the template, including any customized fields you may have added yourself.
    4. In the list of field numbers, select the one that you want to filter on.
    5. On the Table Filter page, in the Field Filter field, enter the value you want to filter on. This is a free-text field, but standard Business Central filter rules apply.

      Tip

      You can use standard Business Central filter criteria in the Field Filter field. For more information, see Entering criteria in filters and Enter filter criteria (Microsoft articles).

    6. Repeat steps 6.b.-6.e. for any additional field numbers you want to filter on. If you apply multiple field numbers as filters, all of them must be met in order for the email job to include a document.
    7. Select Close to close the page and add your selected filter(s).
  7. If you don't want Document Output to check whether documents have already been sent, select Disable Check for sent earlier.

    Warning

    Selecting Disable Check for sent earlier will resend the same emails continuously if no additional filters are applied. When you select this, you should ensure that your applied filters filter on at least one value that changes after the documents have been sent, to avoid having the same identical records emailed repeatedly.

  8. Optional: In Starting Time and Ending Time, set an interval to limit a job to only run within a set timeframe regardless of how often the job queue entry is running. Individual days can be selected in which the job should be allowed to run. If none are selected, the job will run every day.
  9. In the Enabled column, select the checkbox to enable the job.

The email job will now automatically send documents according to your selected filter criteria and overall setup. For more information on the use of filters, see Applying filters to email jobs below.

Note that Document Output is automatically configured with two standard email jobs:

  • Queue dispatches all documents from the Document Queue.
  • Delete-Log will delete log entries in accordance with the settings on the corresponding email template.

This video is part of the course Get started using Document Output on Continia Learn.

Applying filters to email jobs

Table filters define the conditions for your email jobs. When you set up email jobs, you should typically use table filters, as they specify what state a document must be in to be eligible for sending. Without filters, email jobs will indiscriminately send any documents that are associated with a particular email template.

Common filter options are Status, Posting Date, Document Type and CDO Handled. For example, you can filter invoices on posting date, so that invoices that have been handled prior to implementation aren't resent. Or you can filter sales orders on status, so that only released order confirmations are sent.

Important things to note and precautions to take when applying filters to email jobs:


PrecautionDescription
Ensure that your filters don't cause multiple emails to be sent unnecessarily.For example, consider the following scenario:
  • On the Email Jobs page, under Table Filter, you've applied the Handled (DO) filter and entered the value No in the Field Filter column.
  • On the Email Jobs page, under Disable Check for sent earlier, you've selected the box to disable the feature.
  • On the Output Profiles page, you've specified that the PEPPOLBIS3 profile for sales invoices should consider sales invoices as handled once a PDF email and a PEPPOLBIS3 invoice have been sent.
An email with a PDF sales invoice is sent, but the output profile doesn't mark the job as handled, because no PEPPOLBIS3 invoice has been sent yet. Meanwhile, the email job determines that another email must be sent, as the critera are met (Handled (DO) = No). As Disable Check for sent earlier has been selected, the email job will continue to send identical emails until a PEPPOLBIS3 invoice is sent as well, causing the output profile to mark the job as handled and thereby changing the email job criteria.
Ensure that multiple applied email job filters aren't mutually exclusive.For example, consider a scenario in which you've applied two filters:
  • The Output Profile filter with the Field Filter value OIOUBL
  • The Bill-to Customer No. filter with the Field Filter value 10000
If customer number 10000 isn't set up with the OIOUBL output profile, no output will be generated in this scenario.
Ensure that email job filters, template line filters, and output profile filters aren't mutually exclusive.For example, if you filter on the same field for both the email job and the template but ask the email job to include the filter value while specifying that the template must exclude this value, the job will fail. This could look as follows:
  1. On the Email Jobs page, under Table Filter, you've applied the Bill-to Customer No. filter and entered the value 20000 in the Field Filter column.
  2. On the Email template card, under General > Variants, you've also applied the Bill-to Customer No. filter. But on the email template line, you've entered the value <>20000 in the Bill-to Customer No. field, meaning that customer number 20000 must be excluded.
These two filters will conflict and cause the job to fail.

See also

Setting up Job Queues