Dynamic email recipients with CC User Mapping

Created by: Kristinn Magnusson

In this article, you will read about dynamic email recipients with CC User Mapping in exMon. This is best explained with a worked example and the relevant solution to this hypothetical problem.

Worked example


You have created a test in exMon that fetches all sales orders that fail some predefined rule. In this example, your test will check if the sales discount given to your customer by your sales agent is too high - above 35%. For this alert to be effective, the right people in your organisation need to receive an alert when a discount above 35% is given.


In this scenario, users responsible for the discounts given to customers are the heads of all departments. As a result, you want the heads of departments to be sent an email immediately when the exception is caught. However, in addition to this immediate notification being sent to department heads, you have been asked to add the responsible salesperson as a CC to the email notification. This is likely to change depending on the salesperson giving the discount to their customer. Therefore, you need to map the email CC dynamically.

Here is our query:

FROM [AdventureWorks].[Sales].[SalesOrderDetail]
WHERE [UnitPriceDiscount] > 0.35

To map the responsible department head, you need to navigate to the Exception Manager Properties User Mapping. Then, select the column containing the relevant user information.

Note that you can map to custom user information by using External User mapping, for example, if you want to map to user data in your CRM system.


To add the salesperson to the email:

  1. Open the Email tab in exMon DG Exception Manager Properties
  2. Select the correct Email Template
  3. Add in any CC email address (e.g. anotheremployee@exmon.com)
  4. Select the correct Mapping Type
  5. Select the correct Mapped CC Column


Note: Here you can read more about Configuring Exception Management (Tutorial)

Kristinn is the author of this solution article.