Skip to main content

Setup

This page explains how to set up email notifications, one module at a time. You don't have to switch everything on at once. Start with the module that matters most to you and add the others later.

Before you start​

  • An email account works in Business Central. Open Email Accounts and check that a default account exists and can send a test email.
  • Users have the right permissions. Assign the Aptean Notification permission set to the people who will manage notification rules.
  • Users have email addresses. If you will notify Business Central users, open User Setup and fill in E-Mail for each user. See Who receives the email.

The email layouts are set up for you when the app is installed, so there's nothing to do there unless you want to change them. See Customise the email layouts.


Step 1: Create your Distribution Groups​

A Distribution Group is a named list of people who receive an email, such as QA Team, Auckland Warehouse or Purchasing. The same group can be used by Expiration, Inspection, Status Management and Compliance notifications, so you only set up each team once.

  1. Search for Distribution Groups and choose New.
  2. Enter a Code and Description, for example QA and Quality Assurance team.
  3. In Recipients, add one line per person:
    • User: choose a Business Central user. Their email address is looked up each time an email is sent, so it stays up to date.
    • External: type the email address of someone who doesn't use Business Central, such as a contractor or an external auditor.
  4. Repeat for each team.
tip

Add at least one recipient before using a group in a rule. A group with no recipients can't be selected.

Who receives the email​

For a User recipient, the app uses the first email address it finds, in this order:

  1. E-Mail on the user's User Setup card
  2. Contact Email on the user's card
  3. Authentication Email (their sign-in address)

If none of these are filled in, that person is skipped. Each address is emailed only once per notification, even if the person is in the group twice.

Each Distribution Group also creates a matching User Task Group with the same code. That group is used when compliance rules create user tasks.


Step 2: Expiration Management​

Send a warning when an item or lot is approaching its expiration date, has passed it, or has had its expiration date changed. Purchase shelf-life warnings are sent as well.

Turn on email​

  1. Open Expiration Management Setup. Enable Alerts must already be on.
  2. In Email Alerts, turn on Send Email From BC.
  3. Enter a Default Email Recipient, such as a shared quality inbox. This address is used for any alert that doesn't match one of your rules. If you haven't created any rules yet, it is required.
  4. Choose whether to turn on Send in Background. See Send immediately or in the background.

Route alerts to the right team​

Choose the Expiration Notification Rules action and add one line per rule:

FieldWhat to enter
Code / DescriptionA short name for the rule. The code is added to the end of the email subject, so recipients can see why they got it.
All Alert TypesLeave on to match every type of expiration alert. Turn it off to pick one Alert Type.
Location CodeThe location the stock is held at. Leave blank for any location.
Item Category CodeLeave blank for any category.
Inventory Posting GroupLeave blank for any group.
Distribution Group CodeWho receives the email.
EnabledNew rules start switched off. Turn this on when the rule is ready.

A blank field means "any". A rule with only a Distribution Group filled in catches everything.

Example​

CodeLocation CodeItem Category CodeDistribution Group Code
AKLAKLAKL-WHSE
CHCCHCCHC-WHSE
CHILLEDCHILLEDCHILLED-TEAM
  • A lot of frozen peas expires in the Auckland warehouse. Only the AKL rule matches, so AKL-WHSE is emailed.
  • A lot of yoghurt (category CHILLED) expires in Christchurch. Both CHC and CHILLED match. A rule for a specific location beats one with a blank location, so CHC-WHSE is emailed.
  • The same lot of yoghurt has stock in both Auckland and Christchurch. Each location is checked on its own, so AKL-WHSE and CHC-WHSE are both emailed. A group is never emailed twice for the same alert.

Good to know​

  • The app checks where the lot currently has stock. If the lot has no stock left anywhere when the email is due, no email is sent. The alert is marked as handled and the reason is logged.
  • If no rule matches, the email goes to the Default Email Recipient. If that is also blank, the send fails and the reason is logged.
  • If you don't create any rules, every alert goes to the Default Email Recipient, which is how the app worked before rules were introduced.

Send an alert manually​

On Expiration Management Alerts, select one or more alerts and choose Send Expiry Notification Mail. Your rules are applied in the same way. The Notification Log FactBox shows who each alert was sent to.


Step 3: Inspection Status​

Send an email when a lot's inspection status changes, for example to Released, Rejected or On Hold. This alert is separate from expiration warnings. An expiration warning doesn't change the inspection status.

Turn on email​

  1. Open Inspection Status Setup. Enable Alerts must already be on.
  2. In Email Alerts, turn on Send Email Alert.
  3. Enter a Default Email Recipient for alerts that don't match a rule. If you haven't created any rules yet, it is required.
  4. Choose whether to turn on Send in Background.

Route alerts to the right team​

Choose the Inspection Status Notification Rules action. Rules work exactly like Expiration Notification Rules, with one difference. Instead of an alert type, you can choose the New Inspection Status to react to. For example, you could send Rejected lots to the QA manager and Released lots to the warehouse. Leave it blank to match any status change.

Send an alert manually​

On Inspection Status Alerts, select one or more alerts and choose Send Inspection Status Mail. Results appear in the Notification Log FactBox.


Step 4: Status Management​

Send an email when a tracked record, such as a non-conformance, moves to a new status.

Turn on email​

  1. Open Status Management Setup. Enable Alerts must already be on.
  2. In Email Alerts, turn on Send Email From BC.
  3. Choose whether to turn on Send In Background. If you do, you must also schedule the background job. This page doesn't remind you to set it up.

Who receives it​

By default, the email goes to the Notify by E-mail address on the alert, which the Status Management module sets.

To send it to a team as well, find the status line in the lines of Status Management Setup and fill in Notify Distribution Group. The group's members and the alert's own address are both emailed. You can manage groups from this page with the Distribution Group action.

Alert Report Selections (optional)​

By default, every status email uses the standard Status Update Notification layout. An alert report selection lets a particular status line use a different report, and attach it as a PDF if you want. Use this to give recipients the full picture. For example, a non-conformance moving to Open could arrive with the complete non-conformance attached.

1. Create the report selection. Choose the Alert Report Selections action and add a line:

FieldWhat to enter
Code / DescriptionA short name, for example NC-DETAIL.
Report IDThe report to use. It must be built on the Status Management Alert table. Changing the report clears both layout fields.
Report LayoutThe layout for the PDF attachment. Leave blank to use the report's default layout.
Send as AttachmentTurn on to attach the report as a PDF.
Email Body LayoutOptional. A layout of the same report to use as the email body, such as a Word layout you have customised.

2. Assign it to a status line. In the lines of Status Management Setup, set Report Selection on each line that should use it. Lines left blank keep the standard email.

What the recipient gets:

Email Body LayoutSend as AttachmentEmail bodyAttachment
Filled inOffEmail Body Layoutnone
Filled inOnEmail Body LayoutPDF using the Report Layout
BlankOffReport Layoutnone
BlankOnStandard status update emailPDF using the Report Layout

The attachment is named after the report and the alert number, for example Status Mgt. Alert - Non-Conformance Detail 1234.pdf.

You can't delete a report selection while a status line still uses it.

Non-Conformance Detail report​

The app includes a ready-made report for non-conformance status emails: Status Mgt. Alert - Non-Conformance Detail (report 66005). It shows the non-conformance header and lines, the root cause, the corrective, preventive and other follow-up actions, and any attachments. For vendor non-conformances, it also shows the vendor's item reference.

It comes with two layouts:

LayoutBest used as
Status Mgt. Alert - Non-Conformance Detail - RDLCReport Layout, for the PDF attachment
Status Mgt. Alert - Non-Conformance Email BodyEmail Body Layout: the standard status email plus the non-conformance details

Recommended setup: create a report selection with:

  • Report ID 66005
  • the RDLC layout as Report Layout
  • Send as Attachment on
  • the Word layout as Email Body Layout

Then assign it to the status lines for the Non-Conformance table.

Send an alert manually​

On Status Management Alerts, select one or more alerts and choose Send Status Changed Mail. If you select a single alert, the email opens so you can check or edit it before sending.


Step 5: Compliance Documents​

Remind people before a compliance document expires, such as a supplier's food-safety certificate, a customer's licence or an item specification. Compliance documents are checked once a day.

Turn on email​

  1. Open Compliance Documents Setup.
  2. Turn on Send Email From BC.

This also creates the daily background job (Aptean Compliance Notification Engine in Job Queue Entries), which runs from 08:00. If you turn the setting off later, the job is deleted.

Create Compliance Notification Rules​

Each rule belongs to a Distribution Group. To create rules, open the group first:

  1. Open Distribution Groups, select the group that should receive the reminders, and choose Compliance Notification Rules.
  2. Add a line for each rule:
FieldWhat to enter
Code / DescriptionA short name. The code appears in the email subject.
EnabledOn by default.
Compliance TypeCustomer, Vendor, Item, Company or All.
Source No.Optional. Limit the rule to one customer, vendor or item.
Compliance Document CodeOptional. Limit the rule to one type of document.
Purchaser / Salesperson CodeOptional. Only documents for vendors with this purchaser, or customers with this salesperson.
Expiration Alert PeriodHow far ahead to start reminding, for example 1M (one month) or 30D. If you leave it blank, reminders are only sent once the document has expired.
Reminder PeriodHow often to repeat the reminder, for example 1W for weekly. If you leave it blank, only one reminder is sent.
Create User TaskAlso create a Business Central task for the group, due on the expiration date. Only one open task is created per document and rule.

Example​

A rule with Compliance Type Vendor, Expiration Alert Period 1M and Reminder Period 1W emails the group once a week. The reminders start one month before each vendor document expires and stop once the document is renewed with a later expiration date.

Lot compliance documents are matched using the lot's item. Use Item rules to cover them.

Send a reminder manually​

On the Item, Lot, Company, Vendor or Purchase compliance documents pages, select one or more documents and choose Email Compliance Expiry Reminder. A manual send ignores the alert and reminder periods, but a matching enabled rule must still exist.

To run the full daily check immediately, choose Run Notifications Now on Compliance Notification Rules.

See what was sent​

Choose Notification History on any of those compliance documents pages. It shows every reminder sent, and any errors, for the selected document.


Step 6: Non-Conformance follow-up actions​

Tell someone when they become responsible for a non-conformance follow-up action.

  1. Open NC Setup and turn on Send Email From BC.
  2. Make sure each responsible user has an E-Mail on their User Setup card.

From then on, an alert is recorded on Non-Conformance Follow-Up Action Alerts each time the Responsible person on a follow-up action changes. Each alert is emailed to the new responsible person. To send one manually, select it and choose Email Follow-Up Action.

Users can also add the Your Open Follow Up Actions cue to their Role Center. It counts the follow-up actions they are responsible for that are not yet closed.


Send immediately or in the background​

Expiration Management, Inspection Status and Status Management each have a Send in Background setting:

  • Off: the email is sent as soon as the alert is raised.
  • On: the email is queued and sent by the Email Pending Alert Notifications job a few minutes later. The person whose action raised the alert doesn't have to wait.

Either way, it's a good idea to schedule the job, because it also retries any email that failed, for example while the mail server was unavailable.

To schedule it: on Expiration Management Setup or Inspection Status Setup, a notification appears if the job is missing. Choose Set Up Job Queue to create the job. It runs every 5 minutes. To set it up yourself instead, create a recurring Job Queue Entry that runs report 66003 (Email Pending Alert Notifications). You can also run the report by hand at any time.


Check what was sent​

The Notification Log FactBox on Expiration Management Alerts and Inspection Status Alerts shows the following for each alert:

  • which rule matched
  • which Distribution Group and location were used
  • when it was sent
  • whether it succeeded or failed, and why

Status Management sends are logged too, including the alert report selection used. To see them, choose Notification Log on the Expiration Notification Rules or Inspection Status Notification Rules page.

Compliance reminders are logged separately, in Notification History. See Step 5.

Log entries older than three months are removed automatically by Business Central's Retention Policies. You can change the period there.


Customise the email layouts​

Each type of notification uses a report layout for the email body. To change one:

  1. Open Report Selection - Notification Enhancements, or choose Report Selections on any of the setup pages.
  2. Choose the Usage, for example Inspection Status Notification.
  3. Change Email Body Layout Name to your own layout, or change Report ID to your own report.

Keep Use for Email Body switched on. If it's off, the email is sent with an empty body.

Compliance reminders use a fixed email format and are not affected by these settings.


Troubleshooting​

What you seeWhat to check
Default Email Recipient must have a value when you turn on emailYou haven't enabled any notification rules yet. Enter a fallback address, or enable a rule first.
No matching expiration notification rule found and no fallback Email Receiver configuredNo rule matched this alert. Add a catch-all rule, or fill in Default Email Recipient.
Distribution group has no resolved recipientsNobody in the group has an email address. Check User Setup for user recipients.
No open Item Ledger Entries found for this lot…The lot had no stock left when the email was due, so no email was needed.
No recipient email address configured — notification not requiredThe Status Management alert has no Notify by E-mail address and the status line has no Notify Distribution Group.
Report Selection … does not existA status line points to an alert report selection that has since been removed.
No enabled Compliance Notification Rule matches the selected record(s)Check the rule's Compliance Type, Source No. and Enabled fields.
Background emails never arriveCheck that the Email Pending Alert Notifications job queue entry exists and its status is Ready.
The send action isn't visible on an alerts pageTurn on Enable Alerts and the email setting on that module's setup page.