Serenic Navigator: Deploying Digests

What are Digest e-mails?

Serenic Navigator offers the ability to have e-mails sent to users based on documents and transactions being submitted for approval. Historically, an e-mail is generated for each transaction at the moment of submission. In every version of Serenic Navigator since 5.0 Improvement 2, there has been a new set of frequency based options that allow an organization to instead batch all these email notifications into a summary ‘digest’, listing all the transactions requiring action in a single email.

The options are outlined on the E-Mail Template Card under the Frequency tab:

The “Immediately” option causes an e-mail to be sent per transaction at the moment of submission. This option requires no additional IT setup beyond specifying what mail server to send e-mails through (along with creating user set up cards, e-mail templates, and e-mail actions).

The Daily, Periodically, and Weekly options cause individual e-mails to be queued up to be delivered at some future point in time based on the other settings. However, you cannot simply switch from Immediately to Daily and start getting Digest e-mails being sent out at 3 PM (for example) without additional setup (and possibly additional licensing, contact your partner or Serenic for more details).

Job Queue & NAS

The e-mails that are waiting to go out are stored in the E-Mail Ledger Entry, which is also where you can go to review past e-mails sent. In order for the system to be able to send out e-mails at a later point in time, something has to start the sending process. The recommended way to accomplish this is through use of the Navision Application Server (NAS) and the Job Queue functionality.

The Job Queue is a way of telling the system to run a process with no user interaction at a specific time or on a recurring basis. NAS is the engine that checks if there are any jobs in the job queue to run.

NAS must be installed on a server in your environment, and configured to work with your Microsoft Dynamics NAV installation. The startup parameter for NAS must be “JOBQUEUE” and the NAS service must be setup to Autostart using a Login with permissions to access Microsoft Dynamics NAV.

With that complete, NAS will run any job queue entries in the system, so we must set up A Job Queue Entry to send the digests out.

Here’s an example that will run once a night on all weekdays:

Once you have setup your Job Queue Entry just right, you must make sure that the Status is not On Hold, or the Job Queue will ignore this entry. To reset the Status to “Ready”, under Related Information, choose Reset Status.

Job queue frequency versus digest send frequency

Something that is very easy to get confused is that the frequency of the Job Queue process running is simply how often the Job Queue will check to see if any digest e-mails must be sent. But, the send frequency on the E-Mail Template Card is the deciding factor of when e-mails will be sent. So, if you specify on the E-Mail Template card to send out e-mails daily at 2 PM, but do not set your Job Queue up to run until 9 PM at night, then all of the 2 PM digests will be sent at 9 PM. However, if you set the Job Queue to run every half-hour, no digests will be sent out until the 2 PM batch, regardless of how often the Job Queue checks for anything to send.

To put it another way, think about putting out your mail in the mailbox. The Job Queue is how often and when the postal worker will check the mailbox. The E-Mail Template Card digest send frequency is how often and when you put the mail in the mailbox to be picked up.

Customization flexibility

This section is intended for implementers and developers to consider ways to adjust the mechanics of the system, rather than the user configurable settings.

When a submission triggers creation of an e-mail in the queue, the system tags each pending e-mail with a date and time that it should be sent. The calculation of this date and time is handled by a single and easy to customize function on the e-mail template table called CalcSendTime. Here’s how the Daily option is coded, for example:

The Daily option has a “Send Time” option (i.e. 2 pm). So, when an e-mail is queued, if it is after 2 PM, the “Send After” date is set to tomorrow and the “Send Time” at 2 PM. Otherwise, it’s marked to send today at 2 PM.

To create your own frequency option, such as every hour, you would need to simply add a new frequency option, and a new frequency case in this function that sets the “Send After” date and the appropriate “Send Time”.

You’ll also need to ensure that your job queue settings will support whatever new frequency you create.

Additional information

Multiple NAS duties

Based on personal experience, it is not recommended to have the same NAS run multiple NAS options, such as ADCS and job queue together. It may work for you in your environment, but be aware of the potential need for a multiple NAS scenario.

Mail server security implication

This section is for IT professionals with knowledge of mail server setup and security.

When using immediate as the delivery option, the e-mail is generated by the client machine, although in the case of the RTC, this may be the service tier server. When using any digest options, the e-mail is generated by the NAS machine instead. Make sure any SMTP server you have in your requirement is going to allow the correct server to send SMTP mail. Discuss your authentication options with your partner if necessary – Anonymous, Basic, and NTLM are the available options. I have had the most success with anonymous authentication and IP based filtering.

The ‘secret’ Frequency option “QueueImmediate” allows you to ensure NAS is sending the emails out rather than any other machines, but make sure to setup the Job Queue to run as frequently as you want immediate emails to go out. This option can be also used easily to handle the “Every x hours” scenario above.

One comment

Comments are closed.