Improved Alert Emails

The improvements of Alerts in D365FO introduced by Docentric:

In D365FO you can set up alerts for important events in the system. When such an event happens, the corresponding user will get a notification in D365FO, but also an alert email can be sent if configured so.

Improved Alert Emails is the functionality based on improved alert email templates but also on additional emailing options such as sending alert emails using Email distributor batch, using Cc and Bcc recipients, and using placeholders in email recipients.

The only feature that is not included in Free Edition is Alert Summary Emails. All other alert improvements you can use completely for free.

Improved alert email templates

Standard Organization email templates and System email templates are applicable to both alert and workflow notifications.
Learn how Docentric improved Email templates >>

Further improvements, specific to alert notification emails, are:

  • The Alert emails flag (see point 1 in the image above): only the email templates with this flag set will be listed in the Email ID lookup on the Alert rule form.
  • The Add email attachments flag (point 2 above): when set, Document management attachments from the table that triggered the alert will be added as attachments to the alert emails. If Attachment tags (point 3) are specified, only the attachments having all the listed tags will be used.
    Note that Attachment tags can be used for workflow notification emails as well.
  • Email template body and subject can contain placeholders bound to alert-related data. Dynamic images and dynamic tables are also supported. All standard alert placeholders, such as %Message% and %LinkToBusinessData% are supported. You can also introduce custom placeholders via custom ETH (Email Template Handler) classes.

Docentric alert email placeholders list

The placeholders are available in an email template when its Alert emails option is turned on. In the placeholder list they are shown with the "AL - " description. In the email body and subject they are written as %Name%.

Defined in DocEmailTemplateHelper::fillStandardPlaceholderDefinitionMapForAlerts(), filled in DocEmailTemplateManager::createAlertStandardPlaceholderMap().

Notification list form

Values shown on the 'Notification list' form for every notification.

Placeholder name Placeholder value AOT value
AL - Company (%Company%) Company field. EventInbox.CompanyId, or "Global" (@SYS314900) if empty.
AL - For (%For%) Notified for field. EventInbox.AlertedFor
AL - Message (%Message%) Message field (Notified with group on the General tab). EventInbox.Message
AL - Occurred (%Occurred%) Notification occurred field. EventInbox.AlertCreatedDateTime, formatted in the company time zone.
AL - Subject (%Subject%) Subject field (Notified with group on the General tab). EventInbox.Subject

Alert event details

Details of the event that fired the alert. They are saved with the notification when the alert fires, so they show the change at that moment, not the alerted record's current values. Some are also shown in the 'Notified when' group on the General tab of the 'Notification list' form.

Which of them have a value depends on the event. %BeforeValue%, %AfterValue% and %Data% are only filled for "field has changed" alerts, %XValue% only for events with a parameter. %Event% is filled for every alert. The values come from the notification's EventInboxData record (type TypeData). Enum values are shown as labels, and RefRecId fields as the referenced record's ID or name, not as the RecId number.

Placeholder name Placeholder value AOT value
AL - After Value (%AfterValue%) Set to value field. EventType.parmCurrentValue()
AL - Before Value (%BeforeValue%) Previous value field. EventType.parmOriginalValue()
AL - Data (%Data%) Before Value and After Value in one text. "Previous value: <BeforeValue>; Set to value: <AfterValue>"
AL - Event (%Event%) What happened, e.g. "Record has been created in User role change log". DocEmailTemplateHelper::buildSubject()
AL - X Value (%XValue%) The value the event compares against, e.g. X in "is set to X". EventType.parmXValue()

URLs that open a form in D365FO, e.g. for use in <a href="...">.

Placeholder name Placeholder value AOT value
AL - Link To Alert (%LinkToAlert%) Opens the notification on the Notification list form. Menu item DocEventAlertInbox
AL - Link To Alert Rule (%LinkToAlertRule%) Opens the alert rule, like the Manage alert rules button. Menu item DocEventRule
AL - Link To Business Data (%LinkToBusinessData%) Opens the alerted record, like the Go to origin button. Menu item EventRule.MenuItemName

Notification and record metadata

ID of the notification and audit info of the alerted record. The alerted record is the business record that triggered the alert, e.g. the sales order that was created or changed, not the notification itself. Not shown on the 'Notification list' form. Created User and Modified User are empty if the alerted record's table doesn't have the CreatedBy or ModifiedBy property turned on.

Placeholder name Placeholder value AOT value
AL - Alert ID (%Alertid%) ID of the notification. EventInbox.InboxId
AL - Created User (%CreatedUser%) Created by of the alerted record. createdBy
AL - Modified User (%ModifiedUser%) Modified by of the alerted record. modifiedBy

Create a custom alert

The standard form for creating a new alert rule (Options > Share > Create a custom alert on every D365FO form) is extended by Docentric. If Send email is turned ON (point 1 in the image below), additional setup (2) is displayed:

 

You can configure the following:

  • Send email using Docentric: if left unchecked, standard alert emails will be created and sent. If checked, Docentric improved Alert emails functionality is activated. All the fields in the Docentric setup become enabled and their values are used when creating and sending alert email messages.
  • Email ID: select Organization or System email template to be used for creating the notification email messages. If the Organization-wide flag (3) is set to No, the available Organization email templates are listed. If the Organization-wide flag is set to Yes, the available System email templates are listed.
  • Send email using: select if the alert emails will be sent in a Synchronous manner (as soon as they are created) or via Email processing (added to the Batch email sending status form and sent in a controlled manner through Email distributor batch). The Batch email sending status form will show additional data such as the alert-related Context information, Account number if applicable, clickable Alert rule ID and Notification ID. Using this data, you can run a separate Email distributor batch job for specific alert emails.
  • Cc: setup the Cc recipients.
  • Bcc: setup the Bcc recipients.
In v3.4.7 we released a new functionality Create alert in a single click, which enables you to create an alert rule for a data field by the right-click on a form control bound to this field.

Using placeholders in email recipients

The fields Email recipients, Cc and Bcc can contain a text that is a combination of valid email addresses and placeholders. Placeholders can be bound to user- or alert-related contact email addresses.

OOTB supported placeholders are:
(1) %USER_XXX% (e.g. %USER_ALICIA%), which will be resolved as the specified user email address (e.g. ALICIA's email address), and
(2) %USERGROUP_XXX% (e.g. %USERGROUP_BudgetApprovers%), which will be resolved as email addresses of all users belonging to the specified user group (e.g. BudgetApprovers).

You can also introduce Custom placeholders via custom ETH classes. Learn how >>

Manage alerts

The standard form where users manage their own alerts (Options > Share > Manage my alerts) is extended by Docentric. You can find the same settings as in the Create a custom alert form:

See also

Watch Video on Improved Alert Emails >>
Improved Email Templates >>
Improved Workflow Emails >>
Alert Summary Emails >>
Improved Alert Rules >>
Improved Email Processing >>

IN THIS ARTICLE