Template Editor Troubleshooting Fixes in Dochly | 100% Secure
Before you troubleshoot
Before diving into specific errors, follow this quick diagnostic sequence. Most template issues are resolved in one of these four steps:
Generate a preview from a real Salesforce record — not a test record with dummy data. Many merge field issues only appear with records that have incomplete or unusual data. Test from at least 3 different records.
Before assuming the template is broken, open the Salesforce record and confirm the field value is actually there. A blank output from a merge field is often simply a blank field on the record — not a template error.
If a field shows data for an admin but not for a sales rep, the issue is field-level security — not the template. The generating user must have read access to every field referenced in the template.
The most common cause of broken merge fields is a typo in the field API name. Open Salesforce Object Manager → Fields & Relationships and verify the exact API name — it is case-sensitive.
Merge field errors
- The field is genuinely empty on the Salesforce record being used for generation
- The field API name is incorrect — a typo causes silent failure
- The field is restricted by field-level security for the generating user
- The related object (e.g. Contact) doesn't exist on the record
- Open the Salesforce record and confirm the field has a value
- In Salesforce Setup → Object Manager, verify the exact field API name
- Check the generating user's field-level security in their profile
- Add a fallback:
{{Field.Name | default: "N/A"}} - See the full guide: Add Salesforce merge fields
- Missing or mismatched curly braces — typed as {Account.Name} instead of {{Account.Name}}
- A space inside the field name — {{Account. Name}} instead of {{Account.Name}}
- The field was typed as plain text instead of inserted via the merge field picker
- The template was pasted from an external editor that changed curly brace characters
- Delete the raw text merge field entirely
- Re-insert using the merge field picker in the editor toolbar — never type from memory
- If content was pasted from Word or Google Docs, check for smart quotes replacing standard curly braces
- Verify the syntax: double opening curly braces, no spaces, correct separator:
{{Object.FieldName}}
- The Salesforce field exists but is explicitly set to null on the record
- A related object field path where the parent record exists but the field itself is null
- Add a default value to suppress null output:
{{Contact.Title | default: "Representative"}} — outputs fallback text
- Or wrap in a conditional to hide the entire line when null:
Title: {{Contact.Title}}
{END IF}
- Incorrect relationship API name — using the wrong traversal path to reach the related object
- The relationship field is empty — the Opportunity isn't linked to an Account
- Using the wrong relationship name — Account vs. Account__r for custom relationships
- For standard relationships, the direct path is usually shorter: use
{{Account.BillingCity}}rather than{{Opportunity.Account.BillingCity}} - For custom object relationships, use the relationship name ending in __r
- In Salesforce Object Manager, check the relationship field's "Child Relationship Name" value
- Confirm the lookup field on the record is populated — open the record and verify the related object is linked
Conditional logic errors
- The field value in the condition doesn't match the actual Salesforce value exactly — case sensitivity or trailing spaces
- Comparing against a picklist label instead of the API value
- Logical operator issue — using = when the field is a number requiring a different comparison
- Open the Salesforce record and copy the exact field value — paste it directly into your condition to avoid case or spacing mismatches
- For picklist fields, use the API value (e.g. "new_business") not the display label ("New Business")
✓ Correct: {IF Opportunity.Type = "New_Business"}
- The {IF} and {END IF} tags are mismatched or missing
- The field being tested is null or empty on all test records used
- A nested conditional is incorrectly structured — inner {END IF} closes the outer block
- Count your {IF} and {END IF} tags — every {IF} must have exactly one matching {END IF}
- Test with a record where the field definitely has the triggering value — confirm in the record first
- For nested conditionals, ensure inner blocks close before outer blocks:
{IF Opportunity.Amount > 100000}
[Premium enterprise terms]
{END IF} ← closes inner IF
{END IF} ← closes outer IF
Dynamic table errors
- The {REPEAT} tag is missing or incorrectly placed — it must wrap the repeating row, not the entire table
- Wrong related list name used in the {REPEAT} tag
- The related list (Opportunity Products) has no records on the test Opportunity
- Confirm the {REPEAT} tag wraps only the data row — the header row should be outside it:
{REPEAT OpportunityLineItems}
{{OpportunityLineItem.Name}} | {{OpportunityLineItem.Quantity}} | {{OpportunityLineItem.UnitPrice}} | {{OpportunityLineItem.TotalPrice}}
{END REPEAT}
- Test with an Opportunity that has at least 3 products added to verify expansion
- Extra empty rows were added manually inside the {REPEAT} block in the template editor
- A {REPEAT} block was accidentally duplicated in the template
- Open the template editor and check for extra table rows inside the {REPEAT}...{END REPEAT} block
- Delete any empty rows — only one row should exist between {REPEAT} and {END REPEAT}
- Check that you don't have two {REPEAT} blocks for the same related list
Formatting and layout errors
- No "keep with next" or "keep together" setting on the affected section
- A large table that can't fit on a single page is splitting mid-row
- Font size changes between sections causing unexpected line height differences
- Apply "keep with next" paragraph setting to section headings so they don't orphan at the bottom of a page
- For tables, enable "allow row to break across pages" for long data rows, and disable it for header rows
- Add an explicit page break before major sections (e.g. the signature block) if you want them to consistently start on a new page
- The source logo file is too low resolution — small PNG scaled up in the template
- A JPEG logo was used instead of PNG — JPEG compression degrades image quality in PDFs
- Replace the logo with a PNG file at least 300px wide — ideally 600px or wider
- Never scale a small logo up in the editor — use the correctly sized source file
- Use PNG with transparent background for the cleanest result on any background color
- See: Build a branded document template
- The selected font is not available in Dochly's PDF rendering engine — only system-safe fonts render reliably
- Custom web fonts aren't embedded in the PDF output
- Switch to a system-safe font — Arial, Calibri, Georgia, Helvetica, or Times New Roman
- Contact Dochly support to discuss custom font embedding options if your brand requires a specific non-system font
Document generation failures
- The template is in Draft status — Draft templates cannot generate documents
- The generating user doesn't have the required Dochly permission set assigned
- A Flow or automation trigger is referencing an Inactive or deleted template
- Confirm the template status is Active in the Dochly Templates list
- Check the generating user's assigned permission sets — they need the Dochly User permission set
- If triggered by a Flow, open the Flow and verify the template reference is pointing to an Active template
- Check Salesforce debug logs for any error thrown during the generation action
- The storage destination in the generation settings is not configured to attach to the record
- The generating user doesn't have permission to create Files on that object
- The file was generated but attached to a different related record
- Open the Dochly generation settings for this template and confirm the storage destination is set to "Attach to record"
- Check the generating user's object-level permissions — they need Create access on ContentDocument (Salesforce Files)
- Check the related list on the record — the file may be attached to a parent Account or Contact rather than the Opportunity
E-signature errors
- The Contact email field is empty or contains an incorrect email address
- The email was delivered to the signer's spam or junk folder
- The signer's email server blocked the message
- Confirm the Contact record has a valid email address before sending
- Ask the signer to check their spam folder and whitelist your sending domain
- Use the Dochly signature tracking panel to resend the request from the Salesforce record
- Completed document storage is not configured in the e-signature settings
- The generating user's permission set doesn't include post-signature file storage rights
- Open Dochly e-signature settings and confirm "Store completed document on record" is enabled
- Verify the user permission set includes ContentDocument create access
- The document can also be manually downloaded from the Dochly signature tracking panel and uploaded to the record if needed as a temporary fix
For all e-signature issues, the Dochly signature tracking panel on the Salesforce record shows the current status of each signature request — including when the email was sent, when the document was opened, and the current signing status of each party.
Pre-publish diagnostic checklist
Run through this checklist on every template before setting it to Active. It covers the most common issues that slip through to production:
- 1Preview generated from at least 3 different real Salesforce records — not test records with dummy data
- 2All merge fields output correct values — no blank spaces, no "null" text, no raw {{field}} syntax visible
- 3Every conditional section tested — preview from a record that triggers each branch and one that doesn't
- 4Dynamic table tested with a record that has multiple line items (5+) and one with zero line items
- 5All pages of a multi-page document reviewed — page breaks, headers, footers render correctly throughout
- 6Logo and images render sharply — no blurring or pixelation in the PDF output
- 7Signature block appears correctly — fields are in the right position for both signatories
- 8Date fields formatted correctly — no raw date strings, format applied (e.g. "June 15, 2026")
- 9Currency fields formatted correctly — currency symbol and commas appear, not raw numbers
- 10Generation tested by a non-admin user with the same profile as the intended generating users — field-level security issues only appear for restricted profiles
Frequently asked questions
Most template errors are caught and fixed in the pre-publish testing phase — which is why thorough preview testing before going live is the single most effective troubleshooting practice. Completed the full guide series? Return to the starting point: Create a document template in Salesforce with Dochly · Template Editor Help Center
Rated 5 stars · Native Salesforce app · Free to install