Help Center Template Editor Troubleshooting

Template Editor Troubleshooting Fixes in Dochly | 100% Secure

Updated June 2026 9 min read Template Editor
Template Editor Troubleshooting Fixes in Dochl help you quickly identify and resolve the most common issues encountered when building, testing, and generating documents. This guide covers blank merge fields, broken conditional logic, table formatting problems, document generation failures, and e-signature issues. For each error, you'll find the likely cause and the exact steps required to fix it. If you encounter an issue not covered here, contact Dochly Support and provide the template name along with the error message from the generation log.

Before you troubleshoot

Before diving into specific errors, follow this quick diagnostic sequence. Most template issues are resolved in one of these four steps:

Always use live preview first

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.

Check the Salesforce record first

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.

Check field-level security

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.

Check the field API name

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

Merge field outputs blank — nothing appears where data should be
Symptom: The generated document shows empty space where a merge field placeholder was.
Possible causes
  • 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
How to fix
  • 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
Merge field appears as raw text in the document
Symptom: The generated document literally shows "{{Account.Name}}" instead of replacing it with the value.
Possible causes
  • 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
How to fix
  • 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}}
"null" appears in the document instead of data
Symptom: The document shows the word "null" where a merge field should have placed a value.
Possible causes
  • 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
How to fix
  • Add a default value to suppress null output:
{{Contact.Title | default: ""}} — outputs blank instead of "null"
{{Contact.Title | default: "Representative"}} — outputs fallback text
  • Or wrap in a conditional to hide the entire line when null:
{IF Contact.Title != null}
Title: {{Contact.Title}}
{END IF}
Related object field not resolving
Symptom: A field from a related object (e.g. {{Opportunity.Account.BillingCity}}) outputs blank even though the Account has a Billing City.
Possible causes
  • 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
How to fix
  • 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

Conditional section always shows — even when condition is false
Symptom: A section wrapped in {IF...} appears in every generated document regardless of the field value.
Possible causes
  • 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
How to fix
  • 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")
❌ Wrong: {IF Opportunity.Type = "New Business"}
✓ Correct: {IF Opportunity.Type = "New_Business"}
Conditional section never shows — even when condition should be true
Symptom: A section wrapped in {IF...} never appears, even when the triggering condition is met on the record.
Possible causes
  • 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
How to fix
  • 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.Type = "Enterprise"}
{IF Opportunity.Amount > 100000}
[Premium enterprise terms]
{END IF} ← closes inner IF
{END IF} ← closes outer IF

Dynamic table errors

Table doesn't expand — only one row appears regardless of line item count
Symptom: The line items table always shows one row even when the Opportunity has multiple products.
Possible causes
  • 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
How to fix
  • Confirm the {REPEAT} tag wraps only the data row — the header row should be outside it:
Description | Qty | Price | Total ← header row — OUTSIDE repeat
{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
Table shows blank rows at the bottom
Symptom: The table generates with empty rows below the actual line items.
Possible causes
  • Extra empty rows were added manually inside the {REPEAT} block in the template editor
  • A {REPEAT} block was accidentally duplicated in the template
How to fix
  • 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

Unexpected page breaks — content splits awkwardly across pages
Symptom: A table, heading, or section begins at the bottom of a page with only 1–2 lines before the page break.
Possible causes
  • 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
How to fix
  • 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
Logo appears blurry or pixelated in the PDF
Symptom: The company logo looks sharp in the template editor but blurry or pixelated in the generated PDF.
Possible causes
  • 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
How to fix
  • 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
Fonts appear differently in the PDF than in the template editor
Symptom: A custom or brand font selected in the editor renders as a different font in the generated PDF.
Possible causes
  • 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
How to fix
  • 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

Document generation fails with no error message
Symptom: Clicking Generate produces no document and no clear error — the process appears to complete but no file is attached to the record.
Possible causes
  • 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
How to fix
  • 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
Generated document is not attached to the Salesforce record
Symptom: Generation appears to succeed but no file appears in the record's Files section.
Possible causes
  • 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
How to fix
  • 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

Signer did not receive the signature request email
Symptom: The document was sent for signature but the customer reports not receiving the email.
Possible causes
  • 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
How to fix
  • 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
Signed document not stored on the Salesforce record after completion
Symptom: All parties have signed but the completed document doesn't appear in the record's Files section.
Possible causes
  • 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
How to fix
  • 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:

  • 1
    Preview generated from at least 3 different real Salesforce records — not test records with dummy data
  • 2
    All merge fields output correct values — no blank spaces, no "null" text, no raw {{field}} syntax visible
  • 3
    Every conditional section tested — preview from a record that triggers each branch and one that doesn't
  • 4
    Dynamic table tested with a record that has multiple line items (5+) and one with zero line items
  • 5
    All pages of a multi-page document reviewed — page breaks, headers, footers render correctly throughout
  • 6
    Logo and images render sharply — no blurring or pixelation in the PDF output
  • 7
    Signature block appears correctly — fields are in the right position for both signatories
  • 8
    Date fields formatted correctly — no raw date strings, format applied (e.g. "June 15, 2026")
  • 9
    Currency fields formatted correctly — currency symbol and commas appear, not raw numbers
  • 10
    Generation 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

Generation errors are logged in the Dochly app's generation history panel, accessible from the Templates section or from the record's Dochly activity panel. For Flow-triggered generation failures, check the Salesforce Flow error log in Setup → Flow Error Emails or the Paused and Failed Flow Interviews section.
This is almost always a field-level security issue. The field is restricted for the sales rep's profile — admins bypass field-level security by default. Go to Salesforce Setup → Object Manager → [Object] → Fields and Relationships → [Field Name] → Set Field-Level Security, and grant Read access to the sales rep profile.
Check for recent Salesforce org changes — a field that was renamed or deleted will break merge fields referencing the old API name. Also check whether someone edited the template recently, whether a Salesforce deployment was pushed that changed field-level security, or whether the Dochly package was updated. The generation history log will show when the errors started.
Contact Dochly support via the Help Center or through your Salesforce org's Dochly app. Include the template name, the Salesforce record ID you were generating from, the exact error message if visible, and a screenshot of the generated output showing the issue. This information allows the support team to diagnose the issue significantly faster.

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

Dochly
Salesforce AppExchange — UTECH HUB Install Dochly on AppExchange

Rated 5 stars · Native Salesforce app · Free to install