feat: email templates
All checks were successful
Publish to docs.datacontroller.io / Deploy docs (push) Successful in 2m20s

This commit is contained in:
allan
2026-04-04 00:49:32 +01:00
parent 535937b586
commit ffdbdb869c
5 changed files with 77 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ Currently used scopes include:
* DC * DC
* DC_CATALOG * DC_CATALOG
* DC_EMAIL
## DC Scope ## DC Scope
@@ -66,4 +67,36 @@ When running the [Refresh Data Catalog](/admin-services/#refresh-data-catalog) s
Number of rows to return for each HISTORY page. Default - 100. Increasing this will increase for all users. Using very large numbers here can result in a sluggish page load time. If you need large amounts of HISTORY data, it is generally better to extract it directly from the [MPE_REVIEW](/tables/mpe_review/) table. Number of rows to return for each HISTORY page. Default - 100. Increasing this will increase for all users. Using very large numbers here can result in a sluggish page load time. If you need large amounts of HISTORY data, it is generally better to extract it directly from the [MPE_REVIEW](/tables/mpe_review/) table.
## DC_EMAIL Scope
This section allows more fine grained control over the email configuration. Be sure that `DC_EMAIL_ALERTS` is set to `YES` (above) for these to activate.
![](img/mpe_config_dc_email.png)
Embedded macro variables are resolved at runtime.
### APPROVED_TEMPLATE
Sent when a change is approved. Available variables:
- ALERT_LIB: Library of table being edited
- ALERT_DS: table being edited
- FROM_USER: the user who made the approval
### REJECTED_TEMPLATE
Sent when a change is rejected. Available variables:
- ALERT_LIB: Library of table being edited
- ALERT_DS: table being edited
- FROM_USER: the user who made the rejection
- REVIEW_REASON_TXT: The text provided by the user who made the rejection
### SUBMITTED_TEMPLATE
Sent when a change is submitted. Available variables:
- ALERT_LIB: Library of table being edited
- ALERT_DS: table being edited
- FROM_USER: the user who made the submission
- SUBMITTED_TXT: The text provided by the user who made the submission.

View File

@@ -1,5 +1,13 @@
Data Controller for SAS® - Emails ---
==================== layout: article
title: Data Controller Emails
description: Set up email alerts in Data Controller
og_title: Data Controller for SAS® emails
og_image: /img/mpe_config_dc_email.png
---
# Data Controller for SAS® - Emails
## Overview ## Overview
Data Controller enables email alerts for users when tables are: Data Controller enables email alerts for users when tables are:
@@ -21,7 +29,7 @@ To switch it on, navigate to `DCXXXXXX.MPE_CONFIG` and set the value for `DC_EMA
![alerttable](img/mpe_alertconfig.png) ![alerttable](img/mpe_alertconfig.png)
!!! tip !!! tip
If your Stored Process session does not have the email options configured, then the appropriate options statement must be invoked. These options may need to be done at startup, or in the configuration file. See [documentation](https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=lrcon&docsetTarget=n05iwqtqxzvtvun1eyw11nrd9i9r.htm&locale=en) If your SAS 9 Stored Process or Viya Compute session does not have the email options configured, then the appropriate options statement must be invoked. These options may need to be done at startup, or in the configuration file. See [documentation](https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=lrcon&docsetTarget=n05iwqtqxzvtvun1eyw11nrd9i9r.htm&locale=en)
## Configuration ## Configuration
The `DCXXXXXX.MPE_ALERTS` table must be updated with the following attributes: The `DCXXXXXX.MPE_ALERTS` table must be updated with the following attributes:
@@ -31,4 +39,10 @@ The `DCXXXXXX.MPE_ALERTS` table must be updated with the following attributes:
* ALERT_DS - either `*ALL*` or the dataset name to be alerted on * ALERT_DS - either `*ALL*` or the dataset name to be alerted on
* ALERT_USER - the metadata name (not displayname) of the user to be alerted * ALERT_USER - the metadata name (not displayname) of the user to be alerted
If your site does not put emails in metadata, then the user emails must instead be entered in `DCXXXXXX.MPE_EMAILS`. If your site does not put emails in metadata (or have them available in the Viya identities service), then the user emails must instead be entered in `DCXXXXXX.MPE_EMAILS`.
## Templates
The wording of the emails can be easily modified by updating the template in the [MPE_CONFIG](/tables/mpe_config) table.
More information can be found in the [options configuration](https://docs.datacontroller.io/dcc-options/#dc_email-scope) page.

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
docs/img/mpe_emails.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

23
docs/tables/mpe_emails.md Normal file
View File

@@ -0,0 +1,23 @@
---
layout: article
title: MPE_EMAILS
description: The MPE_EMAILS table is used to map email addresses to individual users
og_title: MPE_EMAILS Table Documentation
og_image: /img/mpe_emails.png
---
# MPE_EMAILS
The MPE_EMAILS table maps emails to user ids. This is helpful in situations where the email address is not automatically available (eg in SAS metadata or the Viya identities service)
![submits](../img/mpe_emails.png)
The table is SCD2 controlled for ease of rollback and version management.
## Columns
- 🔑 `TX_FROM num`: SCD2 open datetime
- 🔑 `USER_NAME char(50)`: The system name of the user
- `USER_DISPLAYNAME char(100)`: The name by which the user should be addressed
- `USER_EMAIL char(100)`: The email address of the user
- `TX_TO num`: SCD2 close datetime