Notify Vendors That Certificates Are About to Expire Using Alerts in D365FO

Back in the days, when Microsoft has introduced Dynamics 365 for Finance and Operations, one of the missing functionalities were alerts. It took some time for Microsoft to re-implement alerts in D365FO, which happened in 2018 with version 8.0.

However, the new standard alert functionality did not turn out to be too flexible:

  • Email message body became hard-coded, and it was not possible to use email templates, neither system nor organizational.
  • Initially, alerts and workflows were part of the same framework and it was possible to use Batch email sending status form and Email distributor batch to send alert emails from D365FO. Later, that also changed, so it was not possible to use these options to send alert emails.

What has Docentric improved?

We have supported the above-mentioned functionalities, and even more:

  • Previously, all alert emails used the same Email ID (Email template) and now you can select from different email templates on an alert rule.
  • Previously, you first had to use Batch email sending status and Email distributor batch, but later you could not use them. And now with Docentric you can choose between Email provider and Email distributor batch.
  • A bonus: We have improved Email distributor batch and it is now possible to select arbitrary records for different batch jobs. Also, we have introduced Email distributor clean-up.
  • The Batch email sending status form is greatly improved by adding a user-friendly form to preview and update outgoing email messages. We have added email fields (Cc, Bcc, Reply-to, etc.) and metadata fields (Company ID, Context information, Account ID, Document ID, Alert rule, Notification ID, etc.) to allow better monitoring and tracking of outgoing emails, but also scheduling different Email distributor batch jobs for different emails.
  • Custom placeholders can be used, including Image and HTML placeholders.
  • We introduced an improved WYSIWYG Email template body editor with list of available placeholders.
  • The email recipient field may contain placeholders.
  • Cc and Bcc fields are added and may also contain placeholders.
  • Alert email attachments can be added through settings on the email template using Tags.

Check our video article and find out what Docentric has improved regarding alerts >>

A use case: Notify vendors that certificates are about to expire

We will demonstrate the alert rules and alert emails improvements done by Docentric on an example of notifying vendors that their certificates will expire soon.

Since the vendors are external companies, an alert pop-up notification is not useful, but the vendor needs to be notified by email. We also want to specify the body of the email message with the dynamic and relevant data, so we will use an email template for that purpose. Finally, we do not want to send alert emails for certificate expiration along with other alert emails, that’s why we will schedule a separate series of batch jobs.

The Solution

First, we need to configure an email template, at the organization or system level, depending on the business need. In our example, we will use Organization email templates (Organization administration > Setup > Organization email templates):

We see the Docentric settings fast tab with the necessary settings. Note a class that implements the placeholders for our use case, and in this example it is named DocVendorCertificateAlertEmailHandler_CCBA.

We configure the email message body using a combination of static text and placeholders, which will provide the dynamic content.

Placeholders can also be used in the subject of email templates.

Once the email template is ready, we can create an alert rule that will raise an alert and send an email to the vendor, warning him that his certificate is about to expire. In our example, the field to be monitored is Expiration date, and our goal is to send notification to the vendor 7 days before the certificate expires.

We configured to send an email when an alert occurs and to send that email using Docentric. We also selected an email template we have previously created for this purpose, and we chose to send an alert email using Email distributor batch (the Email processing option instead of the default, Synchronous mode).

In order to get notifications generated by the configured alert rules, it is necessary to start a batch job which will process the alert rules and create notifications. Learn more on Batch processing of alerts – Finance & Operations >>

And finally, let’s see what our email looks like when the alert we set on the vendor certificates occurs. We specified sending the alert email using Email distributor batch, that’s why we will find the prepared email message in System administration > Periodic tasks > Email processing > Batch email sending status (how convenient!):

There are few things we can do with the alert email that is created and saved into Batch email sending status. We can:
(1) Show message -> Show the message in a new dialog, where we can review it,
(2) Download message -> Download the email message, which you can open, e.g. in MS Outlook,
(3) Update message -> Modify furthermore before Email distributor batch processes it.

Here is the example of the generated email message:

Resources

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 >>