Comment on page
Tokens (Merge Field)
Tokens helps you to generalize your template’s dynamic information and standardize the document creation process.
Tokens help you to generalize your template’s dynamic information and standardize the document creation process. These tokens can automatically populate a Recipient’s Name, email address, Company name, and more.The format for token is {{company_name}}, {{client.name}}. Think of the information that is always changing in your document, then replace that with a token.
- The token cannot contain any spaces in between.
- Special characters are not supported in tokens. Tokens only support underscores (_) and nested tokens are separated by a dot (.)
- Token names should not start with an underscore (_) except for predefined tokens.
- Token names cannot contain any special character except underscore(_).
To insert a token containing spaces and special characters, it should be enclosed with square brackets.
For example:
- 1.
{{[company name]}}
- 2.
{{[Discount %]}}
- 3.
{{[Invoice #]}}
Tokens with special characters can be used inside formatters.
Examples:
- 1.
{{upper [First Name]}}
- 2.
{{abbreviate [Full Name]}}
- 3.
{{multiply [Sub Total] [Discount %]}}
Note : The character "]" ( Right Bracket) cannot be used for naming a token.
These tokens are predefined by Docupilot. They will automatically populate certain information specific to your document. (Ex. Current Date and Date Time with timezone)
Here is a list of all available predefined tokens
Token | Description |
{{_date}} | Displays the current date. |
{{_datetime}} | Displays the current data and time with Timezone support. |
{{_auto_number}} | Displays unique number in the document. You will need to define a starting number and with each new document generation, we will automatically increment that number. |
Autonumber feature allows you to generate unique number in the document. This feature will be useful if you are generating invoices, tickets, or other documents that need unique number in the document. You will need to define a starting number and with each new document generation, we will automatically increment that number. You can always reset it back to the number of your choice.
To display the autonumber in your document, output file name, delivery you will need to use the token {{_auto_number}}. You can set the starting number in Preferences page -> Advance settings

You can set the starting number in Preferences page -> Advance settings
When a token is preceded by a
'\'
(backslash) then it is considered as plain text and is printed in the output document.
Examples: Input | Output |
\{{name}} | {{name}} |
\{{client.name}} | {{client.name}} |
\{{[Company name]}} | {{[Company name]}} |
Tokens can be generated dynamically inside a template by using the var helper in tandem with the concat helper.
Token | Value passed | Final token |
---|---|---|
{{var (concat Title "value")}} | Title: Final | {{var "Final_value"}} |
{{#each (group_by firms lookup=”firmname”)}}
{{var (concat key "_brand_value")}}
{{/each}} | firmname: Google | {{var "Google_brand_value"}} |
Last modified 2mo ago