Create Dynamic Documents
  • 11 Jul 2024
  • 9 Minutes to read
  • Dark
  • PDF

Create Dynamic Documents

  • Dark
  • PDF

Article summary


Dynamic Documents are built exclusively within the Lightico UI, providing the capability to deliver fully customized documents tailored to each customer. The document is presented to your customer as dynamic HTML text and then rendered into a PDF document after signing or approval.

Some of the features offered by Dynamic Documents include: 

  1. Automatically insert customer information (such as name, address, and date of birth) directly into the document text.

  2. Dynamically adjust content based on specific terms and conditions, such as customer age, location, and financial status. For instance, if a customer is located in California, where a disclaimer is required for a loan agreement, you can show or hide the disclaimer paragraph based on their stated location (B).

  3. Obtain a customer signature which will be inserted into the completed document.

Using Forms

To gather the necessary information for customizing a Dynamic Document, you'll need to create a Lightico digital Form. Forms enable the collection of customer information while associating the data with Attributes, which can be thought of as tags or labels. When constructing the Dynamic Document, you'll use these same Attributes to define conditions for what text appears and for inserting the collected information into the document, as mentioned above.

Form as Shown in the Customer UI

Create a Dynamic Document

The HTML Designer is a user-friendly tool that enables you to create dynamic HTML-based documents like a Dynamic Document without requiring any knowledge of HTML coding.

🎦 Watch related video:

To create a Dynamic Document:

  1. In the Lightico Administration page, in the left navigation pane, click HTML Designer.
    The HTML Designer page opens.

  2. In the top right corner of the page, click Create.

  3. In the Create New HTML dialog box, select Dynamic Document, enter a unique name for your document, and click Create.

    The new Dynamic Document opens.

  4. Use the HTML Designer tools to do any of the following:

    For details, see the relevant sections below.

  5. Click Save.

Import a Dynamic Document from a different profile

If you have created a Dynamic Document and want to use it in a different profile, you can save it as a template and then import it to the new profile.


If there are Attributes or linked Forms used in the Dynamic Document, you'll need to create them (if they do not exist) and relink the Forms in the new profile.

To import a Dynamic Document from a different profile:

  1. In the Lightico Administration pages, go to the HTML designer page.

  2. Click the menu next to the Dynamic Document that you’d like to export and click Export.

    A file browser appears.

  3. Save the file on your computer.

  4. In the profile to which you’d like to import, go to the HTML designer page and click Import.

    A file browser appears.

  5. Select the file.
    The file is imported to the new profile.

Add and edit text

Create the body of your Dynamic Document by typing into the window and using the editing tools in the tool bar.

Add sections

Use sections to organize the information in your Dynamic Document. The customer does not see the division into sections. Although you can add a page break before a section in some cases (see below).

You can also set conditions to determine if and how a section is displayed. For more information, see Add conditions.

To add a new section: 

  1. Click the add section (+)  icon below the existing sections.
    A new section appears below the existing ones.

  2. Add more sections as needed.

  3. Click and drag the section to change the order of the section.
    The section changes order and the section name changes to reflect the new order.


    Section names are not editable.

To delete a section: 

Click the menu in the top right corner of the section and select Delete Section.

To create a page break before this section:

Click the page break icon and turn in the toggle.


Page break can only be used on a sheet that contains only one section.

Add sheets

Adding sheets is another way to organize the information in your Dynamic Document. There will be no page break for a new sheet in the final PDF.

You can also set conditions to determine if and how a sheet is displayed (see Add conditions below).

To add a new sheet:

  1. Click the Add tab button in the top left corner.

  2. Enter a name for the sheet, and click Done.

    The new sheet appears.

Add Attributes

Using Attributes, you can configure a Dynamic Document to insert unique customer information right into the document text. To achieve this, you will place an Attribute link in the document that populates the link location with customer information from the session. For example, the customer's name can be associated with an Attribute called full_name. When the customer provides their name in the session, the name is inserted into the document in the designated Attribute location.

For more information about creating Attributes, see  Create basic Attributes .

To collect customer information and associate the data to Attributes, you'll create a Form in the same Workflow as the Dynamic Document. The Form collects customer data and associates each piece of data with an Attribute. 

For more information about creating a Form in a Workflow, see Create Forms.

To add an Attribute to a Dynamic Document: 

  1. Place your cursor in the document canvas in the position you'd like to insert the Attribute link.

  2. Click the Attribute icon in the toolbar (or type @).
    The Attribute context menu appears.

  3. Search for and select the relevant Attribute.
    The Attribute link appears in the document.

Add objects

In the HTML Designer, an object refers to any part of the document content that you designate as such. These objects can then be referenced in conditional statements to determine their appearance within the document. Objects a way to tailor the document content to each customer.

Within a section, you have the option to add objects and define specific conditions for them. For instance, consider a paragraph in the document that is only relevant to customers residing in the state of California. By defining that sentence as an object and setting a condition, you can ensure that the object appears in the document only when the customer states that they are residents of California during the session.

To add a condition, see Add conditions below.

To add an object:

In the section where you want to create the object, select the relevant part and click the Add object button.

The selected part of the document is designated as an object and a name is assigned to the object in the Object list.

To edit the object name:
Select the name in the Objects list and type your changes.

To remove the object:
Click the next to the object.

Add conditions

You can control how sections, sheets, and objects appear in your document by using conditions. To fine-tune customization, combine multiple conditions using "And" / "Or" logical operators and use parentheses to create complex conditions.

To add conditions:

  1. Click the add new condition icon. 

  2. In the dialog box, define the condition (for a full explanation, see Setting conditions in Workflows).

  3. Click Save.
    The condition is added to the Dynamic Document and appears in the Conditions panel.

Add functions

You can add arithmetic functions into a section. For example, you may want to include a function that calculates the price after a discount for a certain item.

In some cases, you can insert aggregate functions that calculate the sum total when there are multiple instances of the same function. For example, if you have a function called  item_price that is used in more than one instance, you can insert an aggregate function that will calculate the total of all the item_price functions.

Limitations to using functions

The type of functions you can add to a section depends on what type of section you are adding them to. Sections that are bound to a Form behave differently to unbound sections. Binding a section of a Dynamic Document to a Form is used when building a visual cart. The following table summarizes the type of functions you can add to a section and what those functions can include:

Bound Section

Unbound Section


Function can include:

  • Attributes used in the Form that is bound to this section

  • other functions that are defined in the current section

Function can include:

  • other functions from anywhere in the document

  • aggregate functions from anywhere in the document

Aggregate Function

Not available

Aggregate function can include other functions from anywhere in the document.

Add a regular function

To add a regular function to a Dynamic Document:

  1. In the toolbar of the relevant section, click the Add Function button.

  2. In the dialog box that opens, click Create New.
    The Create Function window appears.

  3. Enter the name of your function, for example  item_price.

  4. Click Save to save the new function .

  5. To add the new function into the section, click the Add Function button again and select the function you just created.

  6. To edit or delete the function, click the relevant buttons next to the selected function.

Add an aggregate function

  1. Click the Add Aggregate Function button.

  2. In the dialog box that opens, click Create New.

  3. In the Create Aggregate Function dialog box, in the title box, enter the name of your aggregate function.

  4. In the function box, enter the function itself.
    You can use the add function button to insert a function from anywhere in the document.

    For example, you can write the following aggregate function to calculate the total of all the item_price functions:

    item_price + 0
  5. Click Save.

  6. To add the new aggregate function into the section, click the Add Aggregate Function button again and select the function you just created.

  7. To edit or delete the aggregate function, click the relevant buttons next to the selected aggregate function.

Define the customer action

You can define what the customer can do with the document. 

To define the customer action for a Dynamic Document : 

Select one of the following options from the Customer can dropdown in the upper right corner:

  • Sign- Customer digitally signs or initials the document. When you define the action as Sign, you'll be required to add a signature or intials field to the doc (see below). 

  • Approve - Customer reviews the document on-screen and clicks an Approve button to approve the document

  • Review - Customer reviews the document on-screen

  • Download - Customer can download the document only 

Add a signature element

When you define the customer action as Sign, the signature and initial icons on the tool bar are enabled. You are required to add at least one of these before saving the Dynamic Document.

To add a signature or initials element to the Dynamic Document: 

  1. Place your cursor in the location of the Dynamic Document in which you'd like to place the signature or initial field.

  2. Click the signature or initials icon.
    The field appears in the selected location.

  3. Select the field, click and drag to resize.

  4. Set the following from the context menu:

    1. Alignment - When the field is in Break Text mode (see next point), you can position it left, right, or center.

    2. Display mode - Select Inline (same line as the text) or Break Text (on it's own line).

    3. Signature properties - Check the Line box and choose the desired line style to display beneath the signature. Toggle to Required to ensure the Dynamic Document cannot be completed without a signature.

    4. Delete - Remove the field from the document.

Was this article helpful?