Use naming conventions to correctly insert image, hyperlink, rich text, and data
true-up tokens in your document templates. Each token follows a specific format so that Context
Service can identify the type of content and process it correctly during document
generation.
Required Editions
Available in: Lightning Experience
Available in: Professional, Enterprise, Unlimited, and
Developer Editions
Token Formats and Examples
In the document templates, the tokens reference the attributes that are defined in your
context structure.
Token Type
Required Token Format
Required Fields
Optional Fields
Example Token Names
Notes
Image
IMG_<token>_src
src
height, width
IMG_ProductImage_src, IMG_ProductImage_height
The source field must contain a valid Salesforce Content Document ID or a file
name. If multiple files match the name, the first one is used.
Hyperlink
HYP_<token>_url
url
text
HYP_ProductLink_url, HYP_ProductLink_text
The URL field is required. The text field is optional and defines the label shown
in the link.
Rich Text
RTB_<token>
—
—
RTB_ProductDescription
The rich text content should be in HTML format. No additional fields are
required.
Data True-Up (Live updates)
DT_<token>
—
—
DT_OpportunityAmount
Used to update record field values with updated values from the document. Context
Service automatically identifies the object, field, and value during processing. DT
tokens are supported only for parent objects and work with DOCX templates. They don’t
support child objects or PPTX templates.
How Token Parts Are Grouped
When multiple fields use the same base token name such as
IMG_logo_src, IMG_logo_height, IMG_logo_width, Context Service groups them automatically
under a single token key in the JSON. For example:
Don’t use reserved names such as Id and BusinessObjectType as tokens or attribute names in
context definitions. Context Service replaces any reserved name with a system-generated
value.
Key Terms
Token is a placeholder in your template that gets replaced with data during document
generation.
Attribute is a defined data field in your context structure.
Field is the actual Salesforce data field being mapped.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.