Help Center Template Editor Edit and Update an Existing Template

Edit and Update an Existing Document Template in Dochly

Updated June 2026 8 min read Template Editor
Templates need to change. Pricing updates, new legal clauses, rebranded logos, additional merge fields, restructured sections — your document templates will need editing throughout their lifecycle. The key is making those changes safely without breaking live generation workflows, losing version history, or producing incorrect documents during a transition. This guide covers the right way to edit a published template — how to approach minor vs major changes, how to version safely, and how to test before going live.

Before you edit a live template

A live template is actively generating documents. Any change you make — even a small one — affects every document generated from that point forward. Before touching a published template, ask these three questions:

What exactly needs to change?

Write down the specific change before opening the editor. "Update the contract" is not specific enough. "Replace the liability clause in Section 7 with the new legal-approved version" is. Vague edits lead to unintended changes.

Who is affected by this change?

Which teams generate documents from this template? Who needs to know the template is changing? Legal, finance, and sales ops teams should be notified before any template update that affects the content of their documents.

Does the old version need to be preserved?

For contracts and invoices especially — historical documents were generated from a specific template version. If you overwrite the template, you lose the ability to trace exactly what language or pricing was in effect at a given point in time.

When should the change go live?

Some updates should go live immediately (fixing a broken merge field). Others should be timed carefully — a pricing change in a proposal template should go live only when the new pricing is officially effective, not mid-quarter.

Never edit a published template directly if it generates legal or financial documents. Always duplicate first, make changes to the copy, test thoroughly, then swap. This protects your audit trail and gives you a fallback if something goes wrong.


Types of changes and risk levels

Not all template changes carry the same risk. Understanding what kind of change you're making helps you choose the right approach — quick in-place edit vs. full duplicate-and-replace workflow.

Minor

Low risk — can edit in place

  • Fixing a typo in static text
  • Updating company phone or email
  • Adjusting font size or spacing
  • Adding a missing merge field
  • Updating the logo file
Moderate

Medium risk — duplicate recommended

  • Adding or removing a section
  • Changing header or footer layout
  • Adding a new conditional block
  • Updating payment terms language
  • Restructuring the line items table
Major

High risk — always duplicate first

  • Changing legal clause language
  • Updating pricing or commercial terms
  • Adding or removing signature blocks
  • Changing the primary Salesforce object
  • Restructuring the entire document

The safe editing approach

The safest way to update any published template — regardless of change type — is the duplicate, edit, test, swap approach. This ensures:

  • The live template continues generating correctly while you build the update
  • You can test the new version thoroughly before anyone generates a real document from it
  • The previous version is preserved as an Inactive template for audit and reference
  • You can instantly roll back by reactivating the old template if something is wrong with the new version

For minor edits on non-legal templates (formatting fixes, typo corrections), editing in place is acceptable. For anything that changes document content, the duplicate-first approach takes 5 extra minutes and prevents hours of cleanup if something goes wrong.


Step-by-step: editing a template safely

1

Identify exactly what needs to change

Before opening the template editor, document the specific change you need to make. If it's a legal clause update, get the approved new language in writing from legal before you start. If it's a pricing change, confirm the exact new values. This prevents mid-edit decisions that introduce additional unplanned changes.

2

Duplicate the existing template

In the Dochly Templates list, find the template you want to update. Click Duplicate (or Clone). This creates an exact copy with Draft status — the original remains Active and continues generating documents while you work on the copy.

Name the duplicate clearly to indicate it's the new version — for example: "Sales Contract — Enterprise v2" or "Invoice — Standard (June 2026 Update)". See managing multiple templates for naming conventions.

3

Make your changes to the duplicate

Open the duplicated template (in Draft status) and make your changes. Because this is a Draft, no one can accidentally generate a document from it during your edit session. Take your time — there's no rush since the live template is still active.

Common changes and where to find guidance:

4

Test thoroughly before publishing

Use the Preview function to generate test documents from real Salesforce records. Test more scenarios than you think you need — especially for the sections you didn't change, which can sometimes be affected by adjacent edits.

Test checklist before publishing any update:

  • All merge fields populate correctly — no blank or "null" outputs
  • The changed section looks and reads correctly
  • Unchanged sections are unaffected
  • Conditional sections still trigger correctly
  • Dynamic tables still expand as expected
  • Page breaks and formatting look correct throughout
  • The document generates successfully on at least 3 different records

If you find issues during testing: Template editor troubleshooting guide

5

Swap the active template

Once the new version is fully tested and ready, perform the swap:

  • Set the old template status from Active → Inactive
  • Set the new template status from Draft → Active

If your Flows or buttons reference the template by ID rather than by name, update the template reference in those automations to point to the new template's ID. If they reference by name, ensure the new template uses the same name as the old one — or update the Flow reference accordingly.

6

Archive the old version — don't delete it

Set the old template status to Inactive — this preserves it for audit, reference, and rollback. Do not delete old templates. Historical documents were generated from a specific template version, and deleting it removes your ability to verify what content was in the template at a given date.

Rename the archived template to make its status clear — for example: "Sales Contract — Enterprise [ARCHIVED June 2026]". See the full archiving and naming guide: Manage multiple document templates


Version control best practices

As your template library grows and templates go through multiple update cycles, clear version naming becomes critical. Here's what a well-managed template version history looks like:

Active

Sales Contract — Enterprise v3

Current live version. Updated June 2026 — new liability cap language approved by legal. Used for all Enterprise deals from June 2026 onwards.

Inactive

Sales Contract — Enterprise v2 [ARCHIVED Mar 2026]

Previous version. Used January–May 2026. Updated payment terms and added EU jurisdiction clause. Preserved for audit of Q1/Q2 2026 contracts.

Inactive

Sales Contract — Enterprise v1 [ARCHIVED Jan 2026]

Original template. Used at launch through December 2025. Preserved for audit of all 2025 contract generation. Do not delete.

Include the archive date in the template name when retiring a version — for example [ARCHIVED June 2026]. This makes it immediately clear which template was active during which time period without having to open each one.


Common template updates and how to handle them

Logo update

Risk: Minor. Can edit in place. Open the template, delete the existing logo image, upload the new logo file, resize to the same dimensions as before, and republish. Test with a preview to confirm the new logo renders correctly.

Pricing or commercial terms change

Risk: Major. Always duplicate first. New pricing must only apply to documents generated after the effective date — not retroactively. Archive the old version with the effective date in the name.

Legal clause update

Risk: Major. Always duplicate first. Get written approval of the new language from legal before building it into the template. Never edit legal language in a live contract template directly.

Adding a new merge field

Risk: Minor–Moderate. Confirm the Salesforce field exists and is populated on the records the template will be generated from. Test with records where the field is empty to ensure no "null" outputs.

Adding a new conditional section

Risk: Moderate. Duplicate recommended. Test the new condition with records that trigger it and records that don't — both paths must produce correct output before publishing.

Rebranding (fonts, colors)

Risk: Minor. Can edit in place but test all pages carefully — font changes can affect page breaks and layout in multi-page documents. Preview a long document specifically to check pagination.


Do's and don'ts when editing templates

Do
  • Duplicate the template before making major changes
  • Document the change and who approved it before starting
  • Test from at least 3 real Salesforce records before publishing
  • Archive old versions with the date in the template name
  • Notify affected teams before swapping the active template
  • Check all conditional branches — not just the one you changed
  • Update Flow references if the template ID changes
Don't
  • Edit legal or financial templates directly without duplicating
  • Delete old template versions — set to Inactive instead
  • Publish without testing from real records
  • Make changes during active deal cycles without notifying sales
  • Assume unchanged sections are unaffected — test everything
  • Edit a template while someone is actively generating from it
  • Use the same name for the new version as the old one without archiving the old one first

Frequently asked questions

No. Generated documents are static files stored as Salesforce Files — they are not dynamically linked to the template. Updating a template only affects documents generated after the update is published. All previously generated documents remain exactly as they were when created.
Yes — if you followed the duplicate-and-archive approach. Set the new (broken) template to Inactive and set the archived previous version back to Active. Generation immediately resumes using the previous version. This is why archiving rather than deleting old templates is critical.
If your Flow references the template by name and you keep the same name for the new version, the Flow will automatically use the new Active template. If the Flow references by template ID, you'll need to update the Flow to point to the new template's ID after the swap. Always verify your Flows after a template update.
Concurrent editing is not supported and can cause conflicts. If multiple people need to contribute to a template update, coordinate so only one person edits at a time. The recommended approach is for one admin to own each template update end to end — including the duplicate, edit, test, and swap steps.
Retain archived contract and invoice template versions for at least as long as your document retention policy requires — typically 5–7 years for financial documents, longer for regulated industries. For proposal templates with no legal standing, 1–2 years is generally sufficient.

Following the duplicate-edit-test-swap approach keeps your template library clean, your audit trail intact, and your live document generation uninterrupted during updates. Next steps: Manage multiple document templates · Troubleshooting guide

Dochly
Salesforce AppExchange — UTECH HUB Install Dochly on AppExchange

Rated 5 stars · Native Salesforce app · Free to install