Docusign CLM Document Generation: Templates and Merge Tags

You are building contract generation in Docusign CLM, and every generated draft is only as good as its template logic. How forms, templates, and merge tags fit together, and what to test before launch.

Docusign CLM document generation has three parts: a form collects deal data from the requester, a Word template holds the contract language, and merge tags tell CLM where each value goes and which clauses appear. Designed together, they let a business user produce a first draft legal would have written anyway, often straight from a sales intake workflow.

What is Docusign CLM document generation?

Docusign CLM document generation produces a contract from structured data through three components. Generation attacks a large cost, since 2024 estimates put time lost developing agreements at 25,000 hours a year per business function. The form captures answers, the template supplies the approved wording, and merge tags connect each answer to a place or condition in the document.

The payoff is capacity. One 2025 industry survey found that 83 percent of legal departments expect demand for legal services to keep growing. Document generation is one of the most direct ways to meet that demand, because routine agreements no longer need a lawyer to draft them.

How does a Docusign CLM document generation form collect data?

A Docusign CLM document generation form collects data through standard field types that the requester completes before the contract is generated. Each field’s answer is stored as XML data that the template’s merge tags read.

Docusign CLM offers standard fields including Text, Text Box, Number, Currency, Date, Dropdown, Checkbox, Radio Buttons, Table, Term, Attachment, and Library, plus a Users and Groups field. Heading and Section fields organize the form itself. Each field type can be set up for required user input and for conditional inclusion. Group the fields by purpose:

  • Deal data. Text, number, currency, date, and term fields capture the values that appear in the contract, such as counterparty name, fee, and effective date.
  • Choice fields. Dropdowns, radio buttons, and checkboxes capture the decisions that switch clauses on or off, such as governing law or payment model.
  • Structured data. Table fields capture repeating rows, such as a pricing schedule, and Library fields pull in saved content.

Keep choice fields to controlled values, because conditional merge tags match on exact values. A dropdown gives you “New York” every time. A free-text field gives you “NY,” “New York,” and “N.Y.”

How are document generation templates built in Docusign CLM?

Document generation templates in Docusign CLM are built in a two-step process: a finalized contract is marked up with comments identifying each field and its type, then those markups are cataloged in a template map spreadsheet. The mapped document and spreadsheet become the basis for the template and its form.

This puts the legal decisions first. Work through three stages:

  • Markup. Start from a clean, approved version of the contract and add a Word comment at every variable value and optional clause, naming the field and its type.
  • Template map. List every marked field in the spreadsheet with its type, form label, and the templates it appears in, so shared fields keep one name across agreements.
  • Build. Replace each markup with the matching merge tag, then build the form fields in the same order the requester will think about the deal.

Treat the template map as living documentation, because configuration nobody documents becomes technical debt the next team inherits.

How do merge tags pull form data into a Docusign CLM template?

Merge tags pull form data into a Docusign CLM template by using XPath to select a value from the form’s XML data and place it in the document. Each form field has a corresponding merge tag, and content merge tags can be copied from CLM and pasted into the Word template.

XPath accepts relative paths, such as ./Info/Submitter/Id or //Id, and absolute paths, such as /Info/Submitter/Id. Three habits prevent most merge errors:

  • Copy, then paste. Copy content merge tags straight from CLM, so the XPath matches the form exactly.
  • Stable field names. Rename form fields rarely after templates are built, since every tag that references a renamed field breaks.
  • Preview as you go. Generate a test document after each template section, so a broken path surfaces while the template is still small.

How do conditional merge tags work in Docusign CLM?

Conditional merge tags in Docusign CLM show or hide a block of text based on form data, using a Conditional tag at the start of the block and an EndConditional tag at the end. Everything between the two tags appears or disappears depending on the condition.

Conditional merge tags must be built from scratch, since they cannot be copied and pasted from CLM the way content tags can. Conditions use a Select attribute with an XPath, plus one of three tests:

  • Match. Shows the block when the selected value equals the specified value, such as including a data processing clause when the answer is Yes.
  • NotMatch. Shows the block when the selected value differs from the specified value, such as a standard clause for every region except one.
  • Test. Evaluates an XPath expression that returns true or false, which handles comparisons such as contract value above a threshold.

Document generation fields can also sit inside conditional sections, so an optional clause can carry its own merged values. Complex branching needs a decision table before any tag is written, the approach behind Docusign CLM conditional clauses.

How do suppress tags prevent blank space in Docusign CLM documents?

Suppress tags prevent blank space in Docusign CLM documents by removing a whole paragraph, table row, or table column when a condition is met. They clean up the formatting that conditional text leaves behind.

A common problem appears in master agreements with optional statements of work. When a user selects only some SOWs, page and section breaks around the excluded ones can leave blank pages. Suppress tags fix this. Note that the SuppressTableColumn tag must sit inside a table, and removing every column removes the table entirely. Use each for its job:

  • SuppressParagraph. Removes the paragraph containing the tag, which clears empty lines and stray breaks around excluded clauses.
  • SuppressTableRow. Removes a table row, and a hidden single-cell table wrapped around a conditional block lets you remove the block and its spacing together.
  • SuppressTableColumn. Removes a column and its contents, which suits pricing tables where some columns apply only to certain deals.

Which other merge tags does Docusign CLM support for document generation?

Docusign CLM supports additional merge tags for specialized content in generated documents, including Image, RichText, HTML, Barcode, Signature, and TrackedContent. These cover logos, formatted text, signature placement, and other content that plain text tags cannot handle.

Form data can also flow beyond the document. A common pattern saves Table field rows to repeatable document attributes, using a workflow loop that iterates over each row and updates the document’s metadata. That keeps structured deal data, such as volume schedules, searchable after generation. If your forms serve several countries, contract intake designed for multiple regions and languages needs its field design settled before build.

How do you test document generation templates before go-live?

You test document generation templates before go-live by generating documents from every meaningful combination of form answers and comparing each output against the approved contract language. Merge tag defects only show in generated output, so testing has to generate real documents.

Build a scenario matrix from the template map. A template with five yes/no clause choices already has 32 combinations, so prioritize the combinations the business actually uses. Cover three areas:

  • Clause logic. Confirm each conditional block appears exactly when it should, for Match, NotMatch, and Test conditions alike.
  • Formatting. Check page breaks, numbering, and table layout in every scenario that excludes content, since suppress tags fail quietly.
  • Data accuracy. Confirm every merged value, including currency, dates, and table rows, matches what the form captured.

How should Docusign CLM templates be maintained after go-live?

Docusign CLM templates should be maintained through a controlled change process where legal approves wording, an administrator updates tags, and every change is regression tested before release.

Ongoing ownership matters as much as the initial build, since departments that struggle with CLM adoption usually need operational support as much as configuration. Three routines keep templates reliable:

  • Change log. Record each template change, the approving lawyer, and the test scenarios rerun, so any generated contract can be traced to a template version.
  • Release discipline. Update templates in a test environment first, and promote them with the same care as workflows, since configured legal platforms need release management with the same rigor as code.
  • Template owner. Name one administrator per template family who approves tag changes and keeps the template map current.

Conclusion

Docusign CLM document generation turns legal-approved language into contracts the business can generate on demand. Start with a marked-up contract and a template map, keep form choices to controlled values, build conditional tags by hand, and use suppress tags to clean up excluded content. Test every meaningful combination before launch, and manage template changes as releases afterward.

How Basla can help

Basla provides delivery teams for Docusign implementation, covering contract markup, template maps, generation form and merge tag configuration, and end-to-end testing of generated output. Business analysts work with legal to decide which language varies and why, and QA specialists build scenario matrices that prove every clause, value, and layout.

Basla works through staff augmentation or Basla-managed delivery. It has created and executed more than 1,000 test records for one CLM implementation, and doubled delivery team capacity on another engagement to meet a compressed implementation timeline.

Frequently asked questions

What is Docusign CLM document generation?

Docusign CLM document generation produces contracts from three components. The form collects deal data, the Word template holds approved contract language, and merge tags place values and control which clauses appear.

How is a document generation template created in Docusign CLM?

A document generation template in Docusign CLM is created in two steps. A finalized contract is marked up with comments for each field and type, then the markups are cataloged in a template map spreadsheet used to build the template and form.

Can conditional merge tags be copied from Docusign CLM?

Conditional merge tags cannot be copied from Docusign CLM the way content merge tags can. They need to be built from scratch in the Word template.

What attributes do Docusign CLM conditional merge tags use?

Docusign CLM conditional merge tags use a Select attribute with an XPath, combined with Match, NotMatch, or Test. Content between the Conditional and EndConditional tags appears only when the condition is met.

How do you remove blank pages from Docusign CLM generated documents?

You remove blank pages from Docusign CLM generated documents with suppress tags such as SuppressParagraph and SuppressTableRow. They remove the paragraph or row, including stray breaks, when the condition is met.

What field types can a Docusign CLM generation form use?

Docusign CLM generation forms offer standard fields including Text, Text Box, Number, Currency, Date, Dropdown, Checkbox, Radio Buttons, Table, Term, Attachment, and Library. Heading and Section fields organize the form, and a Users and Groups field is also available.


*This article is provided for general information only and does not constitute legal advice. Basla Solutions provides legal technology implementation and support services and does not practice law.*