How to send bulk emails

How to send documents with bulk email

You'll often need to send reports or documents to multiple people or mailing groups. Setting up mass-mailing lists for sending documents is called bulk emailing.

You can also set up advanced filtering for recipients (for example, filtering on the Customer Ledger Entry table to exclude paid invoices).

Here are the four steps you'll need to complete to set up bulk emailing:

  1. Setting up which documents you want to send by bulk email
  2. Setting up the document filters
  3. Setting up bulk email report
  4. Setting up bulk email details, including subject and email message

How to set up documents to send by bulk email

Search for 'bulk email report list'. 

Highlight the line in the list that you want to bulk email. 

Select Edit.

Now is when to add your filters (email addresses etc.)

When you want to get email addresses to bulk email, you'll see a filtering window. 

Complete the Dynamics Request Page Entity field. This sets up the layout of the filtering window and determines what tables you'll be able to filter on.

To bulk email sales invoices, for example, you should be able to filter on the Customer Table (to include invoices for a specific sales area for example) or the Customer Ledger Entry Table (to exclude paid invoices, for example). 

In this example, we've made two lines. This database structure is in Wiise. We recommend speaking to your partner about this. 

  • PSALESADOC - Posted Sales Document - Table 112 - Related Table 18 - Sequence No. 1
  • PSALESADOC - Posted Sales Document - Table 112 - Related Table 21 - Sequence No. 2

In this example, a bulk email can be created for all customers who aren't blocked or have outstanding payment amounts.

How to set up the document filters

These are filters you can use when creating bulk emails. When you email a document, you can specify which customers will receive it. There is an option to leave these blank, but this is a great option for when you want to reach a specific group of customers.

Based on the table selected above, select the fields available for filtering. For example, you can use the Blocked field on the Customer Table and the Remaining Amount field on the Customer Ledger Entry Table to set filters. These will be suggested according to the fields selected in your Dynamics Request Page Fields. If you need additional fields, you can select a table ID and then select field IDs as shown below.

These fields will match your available options when you select the bulk email recipients.

Table ID Table Caption Field ID Field Caption
18 Customer 1 No.
18 Customer 20 Credit Limit (LCY)
18 Customer 21 Customer Posting Group
18 Customer 39 Blocked
18 Customer 47 Payment Method Code
18 Customer 88 Gen. Bus. Posting Code

How to set up bulk email report

The Bulk Email Reports setting is where you set up the main table that bulk emails are based on, and its relationship with other tables. 

For example, the Sales Invoice Header Table is used to bulk email Sales Invoices. The Sell to Customer No. field links with the Customer Table. And the Document No. links with the Customer Ledger Entry Table

In this example, you'd include the following fields:

  • Code = SALES INVOICE
  • Description = Sales Invoice
  • Table No. = 112
  • Select the code for your “Dynamic Req. Page Entity Name” (PSALESADOC)
  • Selection Codeunit no. = 16034407

You can also specify the Dynamics Request Page Entity created in the steps above:

Field No Related Table No. Field Caption Related Table Caption Related Field no. Related Field Caption
2 Sell-to-Customer No. 18 Customer 1 No.
3 No.  21 Cust. Ledger Entry 6 Document no.

By linking tables, you can set up the table that will decide the recipients of a bulk email.

How to set up bulk email details

You can use the Bulk Email Definition to create the email you want to send. 

Start by searching for Bulk Email Definition.

Here, you'll be able to set up:

  • The From address (static address)
  • The Send To addresses (by linking an email field in the database)
  • The CC and BCC addresses (static addresses)
  • The Subject and Body of the email. You can include fields from the main table using the % sign and the number of the field in the table
  • The Wiise report to attach to the email. It should be based on the main table defined in the Bulk Email Report setting.

You can also specify the parameters to apply to the report when it's run (for example, Show Assembly Components option for the Sales Invoice). Select Report  Parameters to do this.

And you can set up standard filters when you get the list of email addresses (for example, include only invoices that aren't fully paid – in other words, where the Remaining Amount in the Customer Ledger Entry Table is more than 0). Select Send To Filters to do this.

How to create a bulk email

Once you've set up your bulk emails, creating the email is simple.

  1. First, search for and select Bulk Email.
  2. Then select New in the ribbon. 
  3. The Bulk Email records the user who creates the bulk email as well.
  4. Next, select the recipients who you're sending the bulk email to - select Select Recipients in the ribbon.
  5. Based on the fields set up in the Dynamics Request Page Fields, the Select Recipients box will auto-fill. You can filter the list, for example, by customers that aren't blocked and who have a Customer Ledger Entry where the remaining amount is more than zero. This will populate the Selected Recipients Table. The related record field will show the document details, such as the Sales Invoice Header included the document number and allow you to drill down in the document.
  6. Next, select Review Report Parameters in the ribbon.
  7. This will open the report request page (e.g. Sales Invoice report) where you can enter additional filters or select other options that you need. Such as select or deselect Log Interaction.
  8. When you're happy with the list of recipients and have checked the report parameters match your inclusions, select Send Emails in the ribbon. If the emails were successfully sent, a timestamp will show in the Send Date Time field. If the bulk email was unsuccessful, the reason for the error will show in the error field. When the bulk email has been successfully sent out, you can archive the email for reference.