Mail Message Templates 
Mail templates are used to define the form and content of the e-mail messages sent in SAP Sourcing. The product ships with one mail template for each mail type defined in the system. A mail type is key, or name, used by the software to determine what mail template to use for any given business task. You map mail message templates to mail types in Mail Configurations.
The standard mail templates that ship with the product cannot be edited. These are upgraded automatically when new patches are applied. Mail templates can, however, be duplicated and customized to suite specific needs.
Any custom mail templates you create are not changed during the upgrade process. Although this does not typically pose a problem, it is something to consider, however, when making changes to mail content.
Mail templates make significant use of mail tokens when describing the message content. Tokens are placeholders or variables that are filled in when the application generates the e-mail messages.
A complete list of tokens is available in the on-line Reference Guide (RG).
Note
Global tokens are for internal use and may produce unexpected results if used. Tokens not labeled Global are mail-type specific and available for use by all users.
To use a mail template token, enter the name of the token surrounded by % symbols.
Example
The following text will substitute the document owner's name into the message:The document owner, %OWNER_FIRST_LAST_NAME%, should be notified of any changes.
The following macros are available for use in mail templates. These macros provide for a degree of logic when describing e-mail messages.
You can use the EXISTS macro to conditionally include content in your message. The syntax is:
EXISTS(token,value_if_present,value_if_not_present)
You can use this feature in two ways. First, you can use it to leave out text based on the presence of a specific token. If the URL token is not always there, for example, the following will take that into account: EXISTS(URL,"The URL is: %URL%")
Another common use of this feature is to model the if-then-else concept:
EXISTS(URL,"The URL is: %URL%","You have no URL")
Use the RES_ID macro to pull in a string from the resource database.
RES_ID(cterms$cterm.publish_date)
This token can also be used in the subject of the mail.
This macro wraps the string in the given html tag if the user prefers html e-mail.
FORMAT("htmlTag", "string") If the user prefers plain text, only the string is used (no html).
Example
FORMAT("b", "Posted By:") -- Display bold text
This macro embeds a URL into the message. linkString is the visible display name and linkUrl is the target URL.
LINK(linkString, linkUrl)
If the user prefers plain text, only the linkUrl is used.
Example
LINK("Unsubscribe", "%UNSUBSCRIBE_URL%")
You can enable return receipts to be sent for system-generated e-mails. Return receipts are only applicable when a buy-side user is listed in the e-mail Reply-to field. Suppliers will never receive return receipts.
To enable return receipts, do the following:
On the Account Properties tab of the User Account document, check the Return Receipt box. For more information, see Buy-side User Accounts.
Set the messaging.mail_reply_policy to DEFER_TO_MAILTYPE. For more information, see System Properties.
Ensure that the Mail Type originates from the Owner. For more information, see Field help for Mail Message Template Summary page.