Notification templates and variables

This topic describes email notification templates and variables.

Notification templates

The default email templates are located in <DM_ROOT>/email_templates/.

Email notification name Template name
CREATE_USER_NOTIFICATION CREATE_USER_NOTIFICATION.tplt
DELEGATED_ITEM_NOTIFICATION DELEGATED_ITEM_NOTIFICATION.tplt
DELEGATED_REQUEST_NOTIFICATION DELEGATED_REQUEST_NOTIFICATION.tplt
DELETE_USER_NOTIFICATION DELETE_USER_NOTIFICATION.tplt
DELIVERY_NOTIFICATION DELIVERY_NOTIFICATION.tplt
DEMOTE_BASELINE_NOTIFICATION PROMOTE_BASELINE_NOTIFICATION.tplt
DEMOTE_ITEM_NOTIFICATION PROMOTE_ITEM_NOTIFICATION.tplt
DEMOTE_REQUEST_NOTIFICATION PROMOTE_REQUEST_NOTIFICATION.tplt
DEPLOY_BASELINE_NOTIFICATION DEPLOY_BASELINE_NOTIFICATION.tplt
DEPLOY_ITEM_NOTIFICATION DEPLOY_ITEM_NOTIFICATION.tplt
DEPLOY_NOTIFICATION DEPLOY_NOTIFICATION.tplt
DEPLOY_REQUEST_NOTIFICATION DEPLOY_REQUEST_NOTIFICATION.tplt
DEPLOY_REQUEST_NOTIFICATION DEPLOY_REQUEST_NOTIFICATION.tplt
ITEM_LOCK_NOTIFICATION ITEM_LOCK_NOTIFICATION.tplt
ITEM_UNLOCK_NOTIFICATION ITEM_UNLOCK_NOTIFICATION.tplt
MERGE_ITEM_CONFLICT_NOTIFICATION MERGE_ITEM_CONFLICT_NOTIFICATION.tplt
PENDING_BASELINE_NOTIFICATION PENDING_BASELINE_NOTIFICATION.tplt
PENDING_ITEM_NOTIFICATION PENDING_ITEM_NOTIFICATION.tplt
PENDING_PROJECT_NOTIFICATION PENDING_PROJECT_NOTIFICATION.tplt
PENDING_REQUEST_NOTIFICATION PENDING_REQUEST_NOTIFICATION.tplt
PROJECT_CONTENT_CHANGED_NOTIFICATION PROJECT_CONTENT_CHANGED_NOTIFICATION.tplt
PROJECT_LOCK_NOTIFICATION PROJECT_LOCK_NOTIFICATION.tplt
PROJECT_UNLOCK_NOTIFICATION PROJECT_UNLOCK_NOTIFICATION.tplt
PROMOTE_BASELINE_NOTIFICATION PROMOTE_BASELINE_NOTIFICATION.tplt
PROMOTE_ITEM_NOTIFICATION PROMOTE_ITEM_NOTIFICATION.tplt
PROMOTE_REQUEST_NOTIFICATION PROMOTE_REQUEST_NOTIFICATION.tplt
REQUEST_CLOSURE_NOTIFICATION REQUEST_CLOSURE_NOTIFICATION.tplt
ROLLBACK_BASELINE _NOTIFICATION DEPLOY_BASELINE _NOTIFICATION.tplt
ROLLBACK_ITEM_NOTIFICATION DEPLOY_ITEM_NOTIFICATION.tplt
ROLLBACK_NOTIFICATION DEPLOY_NOTIFICATION.tplt
ROLLBACK_REQUEST_NOTIFICATION DEPLOY_REQUEST_NOTIFICATION.tplt
UPDATED_ACTION_DESCRIPTION_NOTIFICATION UPDATED_ACTION_DESCRIPTION_NOTIFICATION.tplt
UPDATED_BASELINE_ATTRIBUTE_NOTIFICATION UPDATED_BASELINE_ATTRIBUTE_NOTIFICATION.tplt
UPDATED_DETAILED_DESCRIPTION_NOTIFICATION UPDATED_DETAILED_DESCRIPTION_NOTIFICATION.tplt
UPDATED_FILENAME_NOTIFICATION UPDATED_FILENAME_NOTIFICATION.tplt
UPDATED_ITEM_ATTRIBUTE_NOTIFICATION UPDATED_ITEM_ATTRIBUTE_NOTIFICATION.tplt
UPDATED_PROJECT_ATTRIBUTE_NOTIFICATION UPDATED_PROJECT_ATTRIBUTE_NOTIFICATION.tplt
UPDATED_REQUEST_ATTRIBUTE_NOTIFICATION UPDATED_REQUEST_ATTRIBUTE_NOTIFICATION.tplt
UPDATED_REQUEST_RELATIONSHIPS_NOTIFICATION UPDATED_REQUEST_RELATIONSHIPS_NOTIFICATION.tplt
UPDATED_REQUIREMENT_NOTIFICATION UPDATED_REQUIREMENT_NOTIFICATION.tplt

Back to top

Notification variables

The following table lists the variables that are valid for each email notification.

Note: System-defined and user-defined attributes are associated with a particular object type. You can only use attributes in a notification template that belong to the object type for which that notification is generated.

Email notification Variable name Variable description
CREATE_USER_NOTIFICATION MAIL_REASON The reason for the email.
DELEGATED_ITEM_NOTIFICATION CLASS_TYPE The class of the object, for example, item.
DELEGATED_REQUEST_NOTIFICATION NOTIFICATION_ID The name of the notification.
DELETE_USER_NOTIFICATION OBJECT_SPEC The specification of the object.
DELIVERY_NOTIFICATION FILE_OPERATIONS List of file operations.

DEPLOY_BASELINE_NOTIFICATION

DEPLOY_ITEM_NOTIFICATION

DEPLOY_NOTIFICATION

DEPLOY_REQUEST_NOTIFICATION

ROLLBACK_BASELINE_NOTIFICATION

ROLLBACK_ITEM_NOTIFICATION

ROLLBACK_NOTIFICATION

ROLLBACK_REQUEST_NOTIFICATION

NOTIFICATION_ID The name of the notification.
MAIL_REASON The reason for the email.
CLASS_TYPE The class of the object, for example, item.
OBJECT_SPEC The specification of the object.
OBJECT_DESCRIPTION The description of the object.
USER_COMMENT The user comment supplied.
PROJECT_SPEC The specification of the project or stream.
AREA_ID The name of the area deployed to.
AREA_JOB_STATUS The status of the job.
AREA_JOB_MESSAGE The message from the job.

ITEM_LOCK_NOTIFICATION

ITEM_UNLOCK_NOTIFICATION  

ATTR_* User defined attributes for the target item.
ATTRS_* System defined attributes for the target item.
MERGE_ITEM_CONFLICT_NOTIFICATION  OBJECT_DESCRIPTION The description of the object.
PENDING_BASELINE_NOTIFICATION ATTR_*

User-defined attributes.

Note: Attributes like this have user-defined names, descriptions, and values. This information is delivered to the template in an array, where the first element is the description. For example, ATTR_SOMETHING(0). The second element of the array is the actual value of the attribute for this instance, which is coded as ATTR_SOMETHING(1). There is not ATTR_SOMETHING(2).

PENDING_ITEM_NOTIFICATION ATTRS_*

System-defined attributes.

For details about the templating language, see the API reference.

PENDING_PROJECT_NOTIFICATION MAILING_USERS The users who are being emailed.
IMPACTED_PARTS Contains the design parts affected by the request (optionally scoped by a product if MAIL_OPTION is 4).
IMPACTED_ITEMS Contains the items related to the request (optionally scoped by a product if MAIL_OPTION is 4).
PENDING_REQUEST_NOTIFICATION MAIL_SUBJECT The email subject.
PROJECT_CONTENT_CHANGED_NOTIFICATION FILE_OPERATIONS List of file operations.

PROJECT_LOCK_NOTIFICATION

PROJECT_UNLOCK_NOTIFICATION

ATTR_* User defined attributes for the target project.
ATTRS_* System defined attributes for the target project.
REQUEST_CLOSURE_NOTIFICATION ATTR_* User defined attributes for the target request.
ATTRS_* System defined attributes for the target request.
ROLLBACK_ITEM_NOTIFICATION IMPACTED_PARTS Contains the design parts affected by the request (optionally scoped by a product if MAIL_OPTION is 4).
IMPACTED_ITEMS Contains the items related to the request (optionally scoped by a product if MAIL_OPTION is 4).

PROMOTE_BASELINE_NOTIFICATION

PROMOTE_ITEM_NOTIFICATION

PROMOTE_REQUEST_NOTIFICATION

DEMOTE_BASELINE_NOTIFICATION

DEMOTE_ITEM_NOTIFICATION

DEMOTE_REQUEST_NOTIFICATION

NOTIFICATION_ID The name of the notification.
MAIL_REASON The reason for the email.
CLASS_TYPE The class of the object, for example, item.
OBJECT_SPEC The specification of the object.
OBJECT_DESCRIPTION The description of the object.
CURRENT_USER The user doing the operation.
PREVIOUS_STAGE The stage the object was promoted from.
NEW_STAGE The stage the object was promoted to.
USER_COMMENT The user comment supplied.
NEXT_STAGE The next possible stage(s) the object can be promoted to.
PENDING_USERS The user(s) who have the object in their inbox.
UPDATED_ACTION_DESCRIPTION_NOTIFICATION MAIL_REASON The reason for the email.
UPDATED_BASELINE_ATTRIBUTE_NOTIFICATION PRODUCT The product ID.
UPDATED_DETAILED_DESCRIPTION_NOTIFICATION CLASS_TYPE The class of the object, for example, item.
UPDATED_FILENAME_NOTIFICATION OBJECT_ID The object ID.
UPDATED_ITEM_ATTRIBUTE_NOTIFICATION USER_COMMENT A user comment, if specified.
UPDATED_PROJECT_ATTRIBUTE_NOTIFICATION CURRENT_OWNER The current owner.
CURRENT_USER The user doing the operation.
VARIANT The object variant.
REVISION The object's revision.
PREVIOUS_STATUS The object's previous status.
CURRENT_STATUS The object's current status.
ROLE The delegated role.
NEW_STATUS The object's new status.
NEXT_STATUS The object's next status.
ORIGINATOR The object's originator.
ACTION_DATE The object's action date.
CREATE_DATE The object's creation date.
UPDATE_DATE The object's update date.
OBJECT_TYPE The object's type name.
ACTION_USER The user actioning the object.
PENDING_USERS The user(s) who have the object in their inbox.
STAGE_ID The object's stage ID.
OWNER_SITE The object's owning site.
WEB_URL A HTTP URL for accessing the object.
MAIL_SUBJECT The mail subject.
UPDATED_REQUEST_ATTRIBUTE_NOTIFICATION OBJECT_SPEC The specification of the object.
UPDATED_REQUEST_RELATIONSHIPS_NOTIFICATION OBJECT_DESCRIPTION The description of the object.
UPDATED_REQUIREMENT_NOTIFICATION ATTR_* User-defined attributes.
ATTRS_*

System-defined attributes.

For details about the templating language, see the API reference.

MAILING_USERS The users who are being emailed.
MAILING_DIGEST If these are digested notifications.
PRODUCT The product ID.
OBJECT_ID The object ID.
PREVIOUS_STATUS The object's previous status, if applicable.
CURRENT_STATUS The object's current status.
CURRENT_OWNER The current owner.
CURRENT_USER The user doing the operation.
ROLE The delegated role.
NEW_STATUS The object's new status.
NEXT_STATUS The object's next status.
ORIGINATOR The object's originator.
ACTION_DATE The object's action date.
CREATE_DATE The object's creation date.
UPDATE_DATE The object's update date.
OBJECT_TYPE The object's type name.
ACTION_USER The user actioning the object.
PENDING_USERS The user(s) who have the object in their inbox.
OWNER_SITE The site owning the object.
DELEGATED_SITE The site delegated the object.
WEB_URL A HTTP URL for accessing the object.
MAIL_OPTION Mail option being performed.
RELATED_OBJECTSPEC The related object specification.
ITEM_ID The item ID if applicable.
RELATED_CLASS The related object class.
RELATE_OPERATION The relate operation being performed.
VARIANT The variant of the object.
REVISION The revision of the object.
n/a RTM_DATABASE These are applicable only to users of RM, and cover RM object details.
RTM_PROJECT
RTM_CLASS  
RTM_OBJECT_ID
RTM_MAIL_REASON
RTM_MAIL_MESSAGE

Note: Not all the above variables are populated under all circumstances. Trying to use variables that are not populated under all circumstances results in the variable having an empty value or a template error during template processing. For details on how to resolve such issues, see Administration and error handling.

Back to top

Multivalue attributes

Use the following variables for multivalue attributes:

  • ATTR_<name>_VALS> for user-defined attribute values.

  • ATTRS_<name>_VALS> for system-defined attribute values.

where <name> is the attribute name.

These can be used for single-value or multivalue attributes.

For example:

Copy code
)IFDEF ATTR_<name>
   <P>List of ~(ATTR_<name>(0)). values:<BR>
   <UL>
      )REP ATTR_<name>_VALS
      <LI>~ATTR_<name>_VALS.</LI>
      )ENDR
   </UL></P>
)ENDIF

To display a multifield multivalued attribute, you need to display the grouped multivalue attributes it consists of.

Back to top

See also: