Configuring notification templates

Configure the content of the email messages that are sent to users when notifications are triggered.

To send email notifications, you must configure an SMTP server.

Notification templates define the email messages that users receive when notifications are sent to them. Templates are HTML documents that combine static and dynamic elements to create messages. You use templates by attaching them to the notification schemes or notification tasks that you create. As triggering events occur, variables in the attached templates are resolved based on the event and context. Default templates are provided for each of the user-configurable events. You can use and modify the default templates or create your own.

When you create a template, you configure a subject element and a body element. Both the subject and body can include static and dynamic elements. Dynamic elements are defined with the Apache Velocity Template Language (VTL). VTL statements reference IBM® UrbanCode™ Release properties. For information about the VTL statements and properties that you can use in your templates, see Notification template variables.

The body element can also include images. Before an image can be used in a template, it must first be uploaded to the IBM UrbanCode Release server. Images are stored in the folder specified by the notification.images.folder.path property in the server.properties file. By default, the location is [server_installation]/UCRelease/ucrelease/notification-images folder. Several default images are available for you to use in your own templates.

Note: If you use a high availability configuration, the folder that is specified by the notification.images.folder.path property must be shared by all nodes.

As you work on a template, you can check your work by displaying a preview of the notification email.

  1. From the IBM UrbanCode Release dashboard, click Settings, and then click Notification Templates.
  2. On the Notification Templates page, click Add New.
  3. In the Name field, enter a name for the template.
    Because templates are assigned to specific events, it's important to provide a descriptive name.
    For example, a template that is named "Task is skipped" is probably suited to attach to a Task is skipped rule.
  4. Optional: Click Upload Image, select an image to upload to the server, and then click Save.
    A Success message is displayed that provides the URL that you can copy and paste into the image template.
    Note: The image must be in the PNG format.
  5. In the Subject field, enter the email subject line.
    You can use VTL statements in the subject line.
  6. In the Body field, enter the main body of the email message.
    You can use the editing features to format the message and insert hyperlinks and images. You can also use VTL statements in the message. For examples of typical VTL statements, see Notification template variables.

    To insert an image in the message body, complete one of the following steps:

    • Place your cursor where you want to locate the image, and then enter or paste the image URL. A typical image URL that you might enter is shown in this code fragment:
      
      <img src="../notificationTemplates/image/segment-avatar.png"/>
    • Click Insert Image, enter the image URL, and click Set. For example, to use the image in the previous example, you enter:
      
      ../notificationTemplates/image/segment-avatar.png
  7. Optional: To display a preview of the email message, complete the following steps:
    1. Click Show Preview. The Show Preview window is displayed.
    2. Select the event and other parameters. Your selections determine the context used for the preview. For example, the release that is selected determines the release displayed in the preview.
    3. Click Show Preview.
      A preview of the message is displayed.
    4. Optional: To send an email preview, click Send Email Preview.
      An email message that uses the selected parameters is sent to the email address of the current user.
  8. Click Save.
    The template is added to the Notification Templates page.
Add the template to a notification scheme or notification task.