This document provides steps to setup a Dynamic Contract using Templates, which includes preparing your template document, managing conditions and mapping, and ability to quickly auto generate contract drafts.
Note that, we have integrated Templates Module into Pre-Signature. As an Admin user, you can store your Templates in one primary location, and from there, you can connect them to your Pre-Signature workflows.
Prerequisites (Creating a Template for Pre-Signature)
- Setup your contract request form using our primary Contract Request form. Frame all questions in your form to help gather all the right information from the Requestor. Learn more here.
- Prepare your document in a correct format to ensure that it functions seamlessly with dynamic contracts. Make sure that you follow the template standard rules and clean up your template as mentioned in the Template Creation Guidelines section.
Manage Conditions and Mapping
Watch the video below and follow the detailed steps to understand how to generate contracts dynamically using Document Tags.
Step 1: Update and Add the Template
Update the document template with Document Tags and Conditional Variables as mentioned here. Use the Template module to Add a new Template and upload the document template.
Step 2: Decide When to Auto-Generate the Template
To configure when the template should be auto-generated, you can set up rules and add multiple conditions where, they all follow the AND logic. The template will be selected only if all the conditions match.
In the Templates Module, navigate to the uploaded template.
Against the template, click the three vertical dots menu and select Manage conditions and mapping.
-
In the General tab:
The Active toggle is on and indicates that the template is active. If the template is no longer needed in auto generation, it can be made inactive.
The Auto-generated and email the contract to requestor on request submission toggle is on to automatically email the auto-populated template to the Requestor upon form submission. The contract status will be auto set as "Waiting for Signature”.
When turned off, the draft is not automatically generated and the Requestor will not receive an email with the draft attached. However, the Assignee can still manually generate the draft at any time by clicking the Download Auto-Populated Draft button. This option is useful when you want to keep the automation framework in place while preventing immediate access to the draft by the Requestor.- In Select File Format for Auto-generated Contract choose the output format of the auto-generated contract that best suits your needs:
- PDF (non-Editable) - Generate a read-only PDF version of the contract, ideal for sharing finalized documents that cannot be modified.
-
DOCX (Editable) - Generate a Microsoft Word document (.docx) version of the contract, allowing you or your recipients to make edits as needed.
Note: To help prevent duplicate configurations across different templates, the system checks for duplicate condition settings when you create or modify a template. If a duplicate is found, you’ll receive a warning message.
-
In the General Tab, map the form questions to the variables present in the document:
In the Form Question drop-down list, select the form value.
In the Operator drop-down list, select the operator value. The operator value is updated based on the Form Question selected.
In the Value field, select the value for the form question. The field can be a drop-down list or a free text box based on the Form Question.
To add multiple form questions, click the + icon. Add a new Form Question, Operator and Value.
Click Next.
Step 3: Map Form Fields to Templates
To ensure a seamless integration between your form and the template, map template fields present in the document to the form questions.
In the Field Mapping Tab, the Document Tags are displayed from the tags that were added to the document template.
Map the Template fields to the Form Question.
Click Next.
Note: If fields are mapped then the value from form response is replaced in the document. Any Document Tags that are not mapped to a question will be displayed as is in the document with brackets.
Step 4: Dynamically Render Text Based on Form Inputs
Here, you can configure rules to map form questions to specific values. This allows you to set up conditional business rules that automatically include or exclude text based on form inputs. Multiple conditions can be added, and they follow the AND logic. The text will only display when all the conditions are met.
In the Conditional Logic tab, the Tag names with the text is displayed from the Conditional Variables that were added to the document template.
Map the Form Question and Values.
Optionally, to add multiple form questions, click the + icon. Add a new Form Question, Operator and Value.
Click Save to save your configurations and apply them effectively.
Note: If the content is not mapped to a question, the Conditional Variable will be displayed as is in the document with brackets.
Template Creation Guidelines
Before you upload a template, you'll add variables to your document — placeholders that the platform fills in or shows/hides based on what the Requestor enters in the form. There are two kinds, and they cover almost everything you'll do:
Document Tags — insert a form answer into the document (a name, a date, an address).
Conditional Variables — show or hide a block of text depending on a form answer (include a clause only for certain customers, regions, or deal types).
Start here. These two concepts are what you'll use on nearly every template. The naming rules, formatting tips, limitations, and special-character cleanup that follow only matter once your tags and conditions are in place.
Document Tags
Use a Document Tag wherever you want a form answer to drop into the contract. Write the variable name inside double curly braces:
{{ variable }}When the contract is generated, the platform replaces the tag with the value the Requestor entered for the form question you mapped it to (see Step 3: Map Form Fields to Templates).
Example — a single tag in a sentence:
This Agreement is effective as of {{ effectivedate }}.Example — several tags in one block:
This Master Services Agreement is entered into by and between
Pramata and {{ customername }}, with offices located at
{{ address }}, effective {{ effectivedate }}.If the Requestor enters Acme Corp, 123 Main St, and Jan 1, 2026, the generated contract reads:
"This Master Services Agreement is entered into by and between Pramata and Acme Corp, with offices located at 123 Main St, effective Jan 1, 2026."
What to expect:
- A tag only fills in if you map it to a form question. An unmapped tag, or one mapped to a question the Requestor left blank, generates as empty.
- A tag you never map at all stays in the document as-is, with its brackets showing. That's a quick way to spot a tag you forgot to map.
Conditional Variables
Use a Conditional Variable when a block of text should appear only under certain conditions. Wrap the text in an 'if' / 'endif' pair:
{% if variable %}
Text to show or hide
{% endif %}The wrapped text is included in the generated contract only when the condition you set for that variable is met (configured in Step 4: Dynamically Render Text Based on Form Inputs). When multiple conditions are attached, they all use AND logic — every condition must be true for the text to appear.
Example — include a clause only for customers:
{% if account_type %}
12. Force Majeure: The seller shall not be liable for any delay or
failure to perform its obligations under this contract if such delay
or failure is caused by a force majeure event.
{% endif %}Here the Force Majeure clause is included only when the form indicates the account type is Customer. For other account types, the clause — and its numbering — is left out entirely.
Conditional content can span multiple lines, so you can wrap whole paragraphs or multi-clause sections. The one exception is inside a table: keep conditional text confined to a single cell.
Combining the two: tags inside a condition
You can place Document Tags inside a Conditional Variable. When the condition is true, the block appears and its tags fill in with form values:
{% if expedited_shipping %}
Expedited orders for {{ customername }} will ship within 2 business
days to {{ address }}.
{% endif %}If expedited shipping applies, the sentence appears with the customer's name and address filled in. If not, the whole block is omitted. (Note: this is the one supported form of nesting — see Variable Rules below.)
Variable Rules
A variable name keeps your tags and conditions working only if it follows a few simple rules. Use this table as a quick check — the ✓ Allowed column shows a valid version of each, and the ✗ Not allowed column shows a common mistake.
| Rule | ✓ Allowed | ✗ Not allowed | Why |
| Use lowercase only | {{ customer_name }} |
{{ Customer_Name }} |
Uppercase letters aren't recognized |
| Use only letters, numbers, and underscores | {{ address_line2 }} |
{{ address-line2 }} |
The hyphen is a special character |
| No spaces | {{ customer_name }} |
{{ customer name }} |
The space breaks the name |
| No special characters | {{ net_total }} |
{{ net$total }} |
$ (and &, #, %, etc.) aren't allowed |
| Don't start with a number | {{ line2_address }} |
{{ 2nd_address }} |
A name can contain numbers, just not lead with one |
| Keep tag and condition names distinct | tag '{{ region }}' + condition '{% if region_eu %}' | 'region' used for both a tag and a condition | Reusing a name makes mapping ambiguous |
| Put only the variable inside the braces | {{ customer_name }} |
{{ customer_name (required) }} |
Extra text inside the braces causes unexpected output |
One note on nesting: you can't put a variable inside another variable — for example {{ {{ customer_name }} }} is not allowed. The only supported nesting is placing Document Tags inside a Conditional Variable, like {% if x %} {{ customer_name }} {% endif %} (shown in the Conditional Variables section above).
Formatting Variables
You can apply normal styling (bold, font, size, etc.) to the text around and within your variables. A few guidelines keep formatting from breaking generation:
- Keep styling consistent across every character of a variable. If part of {{ customer_name }} is bold and part isn't, the generated document may come out wrong.
-
Use the Format Painter. The most reliable approach is to copy the formatting of nearby finished text and paint it across the entire variable — including the opening and closing tags of a conditional:
…apply Format Painter across the whole of {{ basic_variable }}
…apply Format Painter across both {% if conditional_variable %} and {% endif %} - Where variables work: Only paragraphs, tables, headers, and footers support variables. Tokens placed anywhere else may break generation.
- Bullet items: A token placed inside a bullet item is not picked up during generation — the space goes blank — unless the same variable is also used elsewhere (a paragraph, table, or section) in the document.
Limitations
- Editors handle styling differently. If special styling, formatting, or wizards are added in one editor (e.g., Google Docs) and aren't supported in another (e.g., Word, LibreOffice), the styles revert to base styles when the file is opened there.
- Images may not be preserved in the generated .docx.
- Make sure variable/token names are distinct from Form Field variables and Conditional Variables.
Edge Cases
Cleaning Special Characters
NOTE: Read this only if your source document already contains stray curly-brace sequences. This step is not about your Document Tags or Conditional Variables — those must keep their {{ }} and {% %} exactly as shown earlier. Do not apply the replacements below to the tags and conditions you've added, or you'll break them.
Occasionally a source document contains {{, }}, {%, or %} for reasons unrelated to templating — leftover characters, code samples, or copied content. Because the platform reads those sequences as template syntax, any pre-existing instance that you do not intend as a tag or condition must be neutralized before you add your real variables.
Replace each stray sequence as follows:
| If the document contains | Replace it with |
{{ |
{_{ |
}} |
}_} |
{% |
{_% |
%} |
%_} |
Again: this applies only to unintended brace sequences. Your actual Document Tags ( {{ customername }} ) and Conditional Variables ( {% if account_type %} ) stay exactly as written.
Frequently Asked Questions
Q: The page fails to open and displays "Oops! Something went wrong. Please refresh this page & try again." What actions should I take?
A: This issue typically arises when the uploaded template is not a valid Word document. Please download the template from the platform, open it in Google Docs or Microsoft Word, then export/re-save it again as a .docx file (via File → Download → Microsoft Word) before re-uploading.
Q: All templates within a folder fail identically, appearing as a "global" issue. What is the cause?
A: This generally indicates that the folder contains files that appear as .docx but are in fact different formats, such as Word theme files, PDFs, or legacy .doc files renamed with a .docx extension. Please re-save each template using Microsoft Word or Google Docs as authentic Word .docx files prior to re-uploading.
Q: The template fails to open in Microsoft Word as well. Why does the platform fail?
A: This indicates the file is corrupted or damaged. Acquire an uncorrupted copy, save it again as a Word .docx, and re-upload.
Q: My template is password-protected or encrypted. Is it compatible?
A: No. The platform does not support password-protected Word documents. Please remove the password protection, save the file, and re-upload.
Q: My template contains merge fields such as {% if ... %} or {{ token }}. Could these cause errors?
A: Yes. If a merge field has a missing closing tag (e.g., {% if %} without a corresponding {% endif %}) or contains typographical errors (e.g., {{ token } instead of {{ token }}), the platform cannot parse the template, resulting in a failure to load the page. Please open the template, correct any unclosed or mistyped placeholders, and re-upload.
Q: Two users open the same template simultaneously; one encounters an error. Why?
A: When two users access Manage Conditions and Mapping on the same template concurrently, the platform temporarily locks the template for one user until the other completes their session. Please wait 10 to 20 seconds and attempt to reload; the page should then open.
Q: The page functioned correctly yesterday but today displays "Oops!" with the message No Template Changes. What is the cause?
A: This typically reflects a transient platform issue, such as temporary loss of access to file storage or elevated server load. Please refresh the page and retry after a brief interval. Should the problem persist after multiple attempts, submit a support ticket for further investigation.
Q: The page opens, but the mapping list is empty or tokens appear incorrect. Is this related?
A: This is a related but distinct issue, not a crash. It indicates that the template was previously processed in an invalid state, resulting in stale or incomplete saved data. Please re-upload the template as a new .docx file to force the platform to re-parse it; the mappings should then load correctly.
Q: After re-uploading the corrected template, some merge-field tokens are missing from the mapping list. Why?
A: Token names containing spaces, special characters, or non-English letters are not recognized by the mapping engine and are therefore omitted. Please rename tokens to include only letters, numbers, and underscores (e.g., customer_name instead of customer name), save the template, and re-upload.
Q: I uploaded a very large template and now the page fails. What is the reason?
A: The platform accepts Word .docx files up to a maximum size of 20 MB. Larger files are rejected. Additionally, files approaching this size limit that contain numerous images or large media elements may exceed processing memory limits, causing the Manage Conditions and Mapping module to fail. To resolve this, compress or remove extraneous images, save the file again as a .docx, and re-upload.
Q: How can I prevent these issues from occurring?
A: Prior to uploading, always open the template in Microsoft Word or Google Docs and utilize the "Save As" or "Download as" function to export the file explicitly as a Word Document (.docx)—even if the file already has a .docx extension. Renaming a file's extension (e.g., changing .thmx, .doc, or .pdf to .docx) does not alter its format and is the most frequent cause of errors. Additionally, maintain simple merge-field syntax and restrict token names to letters, numbers, and underscores.
Q: None of the above scenarios corresponds to my issue. What should I do?
A: Please submit a support ticket including the template name, customer account details, timestamp of the error, and a screenshot. Also, provide a summary of attempted resolutions to facilitate efficient investigation by our support team.