Troubleshooting for Token Replacement Issues When Using Context Service for Document
Generation
In some cases, documents are generated with missing or partially populated token values.
Use the checklist below to identify and resolve common issues related to Context Service token
mapping.
Required Editions
Available in: Lightning Experience
Available in: Professional, Enterprise, Unlimited, and
Developer Editions
Common Token Replacement Issues
Use this table to identify common issues with Context Service token mapping, what they mean, and how to fix them.
Issue
What It Means
How to Fix It
Invalid or mismatched entity ID
The input record ID is either missing, doesn’t exist, or belongs to a different object than the one defined in the context mapping. For example, the context is mapped to the Quote object but a Contract ID is passed.
Provide a valid record ID that matches the object defined in the context mapping. Verify the entity type aligns with the mapping configuration in the context definition.
Wrong data mapping method or invalid Data Mapper
The template is linked to Omni Data Transform and not to Context Service.
Make sure the document template uses Context Service for the token mapping
method.
Incorrect attribute type in context definition
Tokens linked to attributes that are set to OUTPUT type don’t hydrate data during
document generation.
Set attribute types to INPUT or INPUT OUTPUT in the context definition to ensure token values are populated.
No data for certain fields when using a standard context definition
Standard context definitions include attributes such as Status, IsAssociatedWithClm,
SourceOpportunityId, SourceOrderId, and SourceQuoteId set as OUTPUT type. These are intended
for APIs and don’t hydrate data for document generation.
Clone the standard context definition and change these attributes to INPUT OUTPUT if you plan to use them for token replacement in document templates.
Missing access to entity or related records
If the user generating the document doesn’t have access to the main record or related
objects in the mapping, token values aren't populated.
Ensure the user has read access to the entity and all related fields and objects referenced in the context definition.
Attribute name changed but mappings aren't updated
If a context attribute name is changed but the SObject Mapping and Input Mapping still
use the old name, that token isn't populated.
Manually update both the SObject Mapping and Input Mapping to use the updated
attribute name. Make sure the Input Mapping name exactly matches the context attribute
name.
Same token names in parent and child nodes
If a child node uses the same token names as its parent and the child fields are
empty, values from the parent maybe used instead.
Use distinct token names for parent and child nodes, or ensure child fields are populated.
Løste denne artikel dit problem?
Giv os besked, så vi kan forbedre os!
Indlæser
Salesforce Help | Article
Cookie Consent Manager
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
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.