In this article, you will read about dynamic email recipients with CC User Mapping in TimeXtender Data Quality. This is best explained with a worked example and the relevant solution to this hypothetical problem.
Worked example
Scenario
You have created a test in TimeXtender Data Quality 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 organization need to receive an alert when a discount above 35% is given.
Solution
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:
SELECT *
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:
- Open the Notifications tab in Exception Manager Properties
- Create email notification Add notification -> Email
- Give the notification a name, default name is Email
- Select the correct Email Template
- Add in any CC email address (e.g. anotheremployee@timextender.com)
- Select the correct Mapping Type
- Select the correct Mapped CC Column
Note: Here you can read more about Configuring Exception Management (Tutorial)