Substitution variables in communication templates
A substitution variable is code that represents a column in the database related to the object specified in the Applies To field on the communication templates. When you use a substitution variable in the Subject or Message field and generate a notification, the variable is replaced with the database value for that column.
You can use the Communication Templates application to modify communication templates without inactivating them. However, you cannot modify a communication template if it is in use on an escalation record or in an enabled or active workflow process. If you try to modify a communication template that cannot be modified, an error message is displayed.
You can click the Detail Menu button next to the Subject and Message fields to select a field from the tables and related tables for the object specified in the Applies To field on the communication template.
When you type a substitution variable manually, you type a colon (:), followed by the database column name (for example, :WONUM).
- If the column is from the main database table for the object, the format is a colon (:) and the column name (for example, :WONUM).
- If the column is from a database table related to the main object, the format is a colon (:), one or more relationship names separated by periods (.), and then the column name (for example, :ASSET.STATUS).
Be sure to include a space before and after each substitution variable to ensure that the generated text is formatted properly.
For example, if you were creating a communication template to notify the system administrator to create a new user record, your message might be similar to the following message:
Subject — New employee
Message — :FIRSTNAME :LASTNAME was hired on :HIREDATE . Please create a user
record for this individual and e-mail them their user name and password at
:EMAIL.EMAILADDRESS.
When a communication template is used to generate a notification, it replaces the substitution variables with the corresponding values from the record that is generating the notification. A notification generated from the previous example might resemble the following notification:
Subject — New employee
Message — Julie Stickler was hired on 6/01/01. Please create a user record
for this individual and e-mail them their user name and password at
Julie.Stickler@us.ibm.com.
If you are including a substitution variable for a nonrequired field, phrase the message so that it still makes sense to the reader if the field is null.