Skip to main content
Variables
M
Written by Marya Maksimchuk
Updated over a week ago

Availability: Essentials, Business, and Enterprise plans

Skip to:

A variable is a merge field designed to save you time by auto-filling any information that frequently occurs in your documents. It's a piece of text surrounded by square brackets, like this:

Example_variable.png

The variable will not have the yellow background when a recipient is viewing the document, it only appears this way in the editor so you can easily distinguish between text and a variable.

Important Information about Variables:

  • You can add variables in both templates and documents

  • Variables will work in three pricing table fields: Name, Description, Plain text column

  • Variables will only work in the document body. They will not work in the document name, saved messages, or email subject/body

How to add variables to your template/document

    1. Select a text block where you'd like to place your variable

    2. Type a square opening bracket and either choose the name of a variable from the dropdown or type your own and press Enter

mceclip14.png
mceclip15.png
mceclip16.png
mceclip17.png

Alternatively, click Variables on the right, click the plus sign and enter a variable name, next press Enter. The variable will show up in the Variables section.

mceclip11.png
mceclip12.png
mceclip13.png

Next, click the Copy icon to copy the variable name, paste it where you need it in your template/document.

mceclip18.png
mceclip19.png

To fill out a variable with actual info, click on a variable in a template/document or open the variables list under Variables on the right, and enter a value. The information is populated throughout the template/document through the variable used.

mceclip0.png

To delete a variable, first, delete it on the document body. Next, click on Variables on the right panel, click on the Not used dropdown and find the variable in the list. Hover over it and click the bin icon to delete the variable from your variable list.

mceclip1.png
mceclip2.png

How to use variables in titles

Warning:

You won't be able to use variables in titles when working with forms, document bundles, or bulk send.

Note:

We suggest adding variables to template titles so that they are auto-filled each time you create a document from the template.

Adding variables in a template title is easy:

  1. Open a template you want to edit

  2. Start typing square brackets (“[“)

  3. Choose one of the variables from the dropdown and it will be inserted into the title.
    Alternatively, you can copy a variable from the variables tab and paste it into the template title, or create a new custom variable directly within the title

Note:

Please note that adding custom variables when creating a document from a template will not work. Variables will be passed to the document title as a simple text value instead of a variable.

Using CRM variables in titles

By default, when you create a document, the template title is replaced with the name of the Deal or Opportunity. However, if you include CRM variables in the template's title that you use for creating documents from your deals/opportunities, the document's name will be based on the template name, and the variables in the titles will be auto-filled with the corresponding field values.

  1. Copy a CRM variable you’d like to insert in the template title

  2. Open a template you use to create documents from your CRM and paste the copied variable into the template title

  3. Create a document from this template via your CRM and the variable will be auto-filled with the field value

Types of variables

There are 4 types of variables:

Role variables

Note:

Role variables can be set up on the template level only.

These variables automatically populate information about your recipient when they're assigned to a Role. They can populate your recipient's first and last name, email address, phone number and company, as long as the information exists in PandaDoc Contacts. If your recipient doesn’t exist in your PandaDoc Contacts, you can add them when you create the document.

  1. Create a Template Role (you'd have to be in a template to do that)

  2. PandaDoc will automatically generate the default role variables: first name, last name, email, company, phone, title and address

  3. Click Variables in the right panel, next find the default role variables by the Role name at the beginning, e.g. Client.FirstName

  4. Copy a variable and paste it where you need it in the template

mceclip20.png
mceclip21.png
mceclip22.png
mceclip23.png

Next, click on Use this template and create a document out of this template, assign recipients to Roles, and click Continue. Role variables will have been populated upon document creation.

mceclip24.png
mceclip26.png
mceclip27.png

System variables

These variables have been predefined by PandaDoc. They will automatically populate information about your document, specific to that individual document and its content (such as document created date, document sent date, reference number, document value, etc.).

Note:

[Document.ExpirationDate] and [Document.SentDate] variables are filled once you send your document. Variables' date format depends on the defualt date format and recipient view localisation settings set up in you workspace settings.

Pricing table variables

Pricing table variables help you easily reuse data from the pricing table footer in your template, document, or form. Each row you add to the footer of your pricing table will appear as a variable, as long as it has a value.

To access the list of variables, first click on a pricing table in your template, document, or form. Then, click Properties on the floating panel and select Variables on the right. Finally, click the copy icon next to the variable name and paste the variable into your document’s content.

mceclip5.png
mceclip6.png

You can also find pricing table variables in the Variables tab on the right.

mceclip7.png

Note:

If you rename a pricing table, variables will automatically reflect this change.

Custom variables

These variables act as placeholders for any information you need to populate manually when creating a document. You can name them whatever you want, and they’re useful if the information doesn’t exist in your Contacts.

To add a custom variable open the square opening bracket, type the name of your variable, and click Enter.

mceclip8.png
mceclip9.png
mceclip10.png

To edit the name of a custom variable:

  1. Go to the Variables tab

  2. Find your custom variable

  3. Select the three ellipses menu next to the variable name > Rename

  4. Type the name you need and select Save

Did this answer your question?