Customizing email templates

The TCM application uses templates to generate the email notifications for teamspace invitations, task assignments, meeting notices, and other events. The templates can be modified as needed.

An email template is a Content Engine document with text content, which consists of text and template instructions. The text is copied into the final email message, and the template engine uses the instructions to determine what to add to the composed message. Instructions generally add variable information (such as the date or the name of a document) and can control the generation of the email message, such as setting up the subject of the email message. The template engine merges the regular text and the result of the instructions into an email message with headers and different message parts and attachments.

You can customize the default email templates. For information on the syntax of the template instructions, see Email template syntax.

IMPORTANT: Always save customized email templates in Unicode format.

The TCM application uses different email templates for the various notifications generated by the application. The table below lists the default templates and where they are used.

Email Template

Used for this Notification

Notification constant
forum_added Forum invitation FORUM_INVITATION_NOTIFTYPE
topic_added

Topic added to forum

TOPIC_ADDED_TO_FORUM_SUBTYPE
reply_added Reply posted to topic REPLY_POSTED_TO_TOPIC_SUBTYPE
document_changed Change to document CHANGE_TO_DOCUMENT_SUBTYPE
Content changed in document CONTENT_CHANGE_IN_DOCUMENT_SUBTYPE
document_added Document added to folder DOCUMENT_ADDED_TO_FOLDER_SUBTYPE
folder_added Folder added to folder FOLDER_ADDED_TO_FOLDER_SUBTYPE
notification_for_any Change in folder CHANGE_TO_FOLDER_SUBTYPE
TCM_send_message Alert (email sent from teamspace) ALERT_NOTIFTYPE
teamspace_invitation Teamspace invitation TEAMSPACE_INVITATION_NOTIFTYPE
teamspace_vcard Used in Teamspace invitation (n/a)
task_assigned

Task assigned

TASK_ASSIGNED_NOTIFTYPE
task_reminder

Task reminder

TASK_REMINDER_NOTIFTYPE
task_expired

Task expired

TASK_EXPIRED_NOTIFTYPE
task_completed

Task completed

TASK_COMPLETED_NOTIFTYPE
task_reopened

Task reopened

TASK_REOPENED_NOTIFTYPE
poll_invitation

Poll invitation

POLL_INVITATION_NOTIFTYPE
poll_closed

Poll closed

POLL_CLOSED_NOTIFTYPE
meeting_vcalendar Used in all meeting notifications below n/a
meeting_invitation

Meeting invitation

MEETING_INVITATION_NOTIFTYPE
meeting_canceled

Meeting canceled

MEETING_CANCELED_NOTIFTYPE
meeting_updated

Meeting time changed

MEETING_TIMECHANGED_NOTIFTYPE

Meeting property changed

MEETING_PROPERTYCHANGED_NOTIFTYPE
meeting_reminder

Meeting reminder

MEETING_REMINDER_NOTIFTYPE

See Example email template file for a typical email template. You can use any of the default templates provided with the software as a basis for your own templates.

Using custom email templates

You can either replace the default templates individually, or you can create an entire set of alternate templates and use these in another instance of the application.

Replacing a single template

To modify one of the existing templates, use FileNet Enterprise Manager to locate the file you want and check it out. By default, email templates are installed in the Collaboration object store in this folder:

Root Folder\Collaboration Store\Email Templates\TCM

For information on the format and syntax used by the template files, see Email template syntax. After you have modified the file, check it back into the object store using the Collaboration Configuration document class.

Adding a new template

You can create your own templates and map them to events. Refer to Email template syntax for details on the syntax used for email templates. after creating the new template, you must map it to an action. See Customizing the Collaboration Email Template Maps.xml file for more information.

Mapping a complete set of new templates

In addition to editing the existing templates, you can create an entire set of templates and use these with the application, or with another instance of the application defined in Collaboration Applications.xml (see Example Collaboration Applications.xml file). For example, you could define an alternate instance of the application in support of another language or other purpose. Use the following steps to create a new set of templates and map them to an instance of the application:

  1. Create a new folder under the Email Templates folder in the Collaboration Store. Consider giving the folder a name that indicates the application instance that will map to the templates. This folder (named myTCM, for example) should be at the same level as the TCM folder under the Email Templates folder.
  2. Make a new set of templates by modifying each of the default templates.
  3. Before your new instance of the application can address the new templates, you must define the new application in Collaboration Applications.xml (see Example Collaboration Applications.xml file). Check out the Collaboration Applications file (Collaboration Applications.xml) using FileNet Enterprise Manager. By default, the file is located in the Root Folder\Collaboration Store folder. Open the file using any XML editing tool.
  4. Make a copy of the application module of the file, adding it to the end of the current file. (This is the section enclosed within the <application> and </application> tags.) This duplicates the default TCM application settings.
  5. In the copy of the application module, make the following changes:
  6. Save the file and check it back into the Collaboration Store folder using the Collaboration Configuration document class.
  7. Recycle the application server after you check in the edited version to clear the old version from the cache.