Email Notification for Workflow Processes
You can use email notification in CDM to inform the next users in a workflow that the workflow state has changed. The email can automatically include required information and a user can customize the default content of the email message before it is sent.
Configure the Email Notification Template for a Workflow
If you want users to send an email notification when they move a section or report object to the next step in the approval process in CDM, you can create an email template to include a default message and update the notifications configuration file.
The configuration file is Notifications.config. You can configure the location of the template files for each notification event in the notifications section of the configuration file.
Important: Make sure that the recipient of the email registers the CDM protocol in the Options window, as described in the CDM User Guide. Also, if the recipient of the email uses web mail, links might not appear or function correctly.
Use the following example to configure the email notification configuration file:
The following list provides the detail for this configuration:
- The notifications system can be enabled or disabled using the
Notifications enabledattribute. - Set the format for the event to either
PlaintextorHtml. - The file path to the template is relative to the application path.
Create an email template file that includes an email subject line, body, and tags.
Email Template Parameters
If you want users to send an email notification when they move a section or report object to the next step in the approval process in CDM, you can complete the email template with parameters for two types of email events. The custom format allowed depends on the type of event.
Create an email template file that includes an email subject line, body, and tags. The first line of the template file contains the template for the subject line of the notification and the rest of the file contains the template for the body of the notification. Include tags that are dynamically replaced with values when the notification is sent. The format of a tag is $(TagName[:customFormat]), where TagName is the name of the value which you want to place at the tag location and customFormat is a custom string formatting parameter. If a tag is null, then an empty string is used in the notification.
The ReportObjectWorkflowStateChanged Event
For the ReportObjectWorkflowStateChanged event, use the following supported tags:
-
ReportName
The tag format is "string". The name of the report that contains the section or report object with the workflow state changes. -
ReportObjectName
The tag format is "string". The name of the section or report object with the workflow state changes. -
SenderFirstName
The tag format is "string". The first name of the user who changed the workflow state. -
SenderLastName
The tag format is "string". The last name of the user who changed the workflow state. -
SenderEmail
The tag format is "string". The email address of the user who changed the workflow state. -
InitialStateName
The tag format is "string". The name of the initial workflow state. -
FinalStateName
The tag format is "string". The name of the final workflow state. -
ReportObjectLink
The tag format is "string". The link from CDM to the section or report object. -
ReportObjectDueDate
The tag format is "datetime". The due date and time (UTC) of the section or report object. -
WorkflowStateDueDate
The tag format is "datetime". The due date and time (UTC) of the final workflow state.
Tip: If you are not located in the UTC time zone, conversion is required to determine the due date and time as it corresponds to your time zone.
-
ToRecipients
The tag format is "string". The list of recipients associated with the final workflow state. These are the users in the To field of the notification. -
CcRecipients
The tag format is "string". The list of recipients associated with the initial workflow state. These are the users in the Cc field of the notification. -
NotificationMessage
This is the custom notification message. If the user does not supply a custom message, the message from the transition is used. If the workflow state transition email body field is empty, an empty string is used.
The ReportGenerated Event
For the ReportGenerated event, use the following supported tags:
-
ReportName
The tag format is "string". The name of the generated report. -
ReportLink
The tag format is "string". The link to the report that was generated. -
NotificationMessage
The tag format is "string". The custom notification message.
Enable and Configure Email Notification for a Workflow
You can set up the email notification feature to send an automated email to the assigned user of a workflow process.
- Click the Home tab, then in the Navigation Pane, click Administration.
- Under Notifications, double-click Email Settings. The Email Settings tab opens in the work area.
- Select the Enable Email Notifications checkbox.
- In the SMTP Server Settings area, complete these settings:
- A valid sender email address.
- A valid mail server name.
- A valid port number for the mail server.
- In the Security and Authentication area, you can perform one of these steps to set the user credentials:
- Select the Use Default Credentials checkbox to use the default credentials. This will use the credentials on the application server to authenticate to the SMTP server. The credentials on the application server are defined in the Credentials.config file, under
EmailNotifications. - Clear the Use Default Credentials checkbox to override the default credentials. Type a user name and password.
- Select the Use Default Credentials checkbox to use the default credentials. This will use the credentials on the application server to authenticate to the SMTP server. The credentials on the application server are defined in the Credentials.config file, under
- To enable Secure Sockets Layer (SSL), select the Enable SSL checkbox.
- Click Save.
Enable Custom Email Messages in a Workflow
You can enable and disable the feature that allows users to add custom messages to email notifications in the workflow.
- Click File > Options.
- In the Options window, select the Allow custom email notification message checkbox.
- Click OK.