Template token syntax
Platform provides a set of built-in tokens, and you can create string tokens for your own use. The Template Helper allows you to find and copy available tokens. Using the Template Helper helps you avoid issues from typos. However, you may find it beneficial to learn token syntax for troubleshooting other issues. Generally, a token has a form similar to:
{![Prefix].TokenName#[Suffix]}
Prefix
(optional) is the integration name for the relationship, if any. For example: R123456. For hierarchical relationships, it additionally includes #C for the child side of the relationship and #P for parent side of the relationship.TokenName
(mandatory) represents the integration name of the field.Suffix
(optional) includes additional instructions on how to render a given token.If you do not specify a suffix, the field is rendered as HTML for HTML templates and plain text for text templates. For example, in HTML templates, a checkbox will be rendered as an image (a checked or unchecked box) and an object's name field will be represented by a link to a record view page.
If you create custom string tokens, the syntax is {!#token_name#}
. See Creating and using string tokens for more
information.
Several unique tokens can be used to build links within template components (use actual object integration name instead of objName). For example, a URL generated by #REPORT token can accept filtering parameters:
filterName
: name of field to filterfilterValue
: value of field (only records with this value will be shown in the report)
Example: {!#REPORT.123456}&filterName=R45678&filterValue={!id}
All fields from the currently logged-in user and current customer are available for use in templates:
{!#CURR_USER.name}
: name of current user{!#CURR_CUSTM.name}
: name of current customer
You can also use tokens for:
- Company-wide settings (see Using company-wide settings)
- Current portal user (for portal Pages)
- Shared images (from any Object)
- Helpers
The remaining topics in this section list built-in tokens and describe how to create and use string tokens.