- 28 Aug 2024
- 10 Minutes to read
- Print
- DarkLight
- PDF
Create Dynamic Documents
- Updated on 28 Aug 2024
- 10 Minutes to read
- Print
- DarkLight
- PDF
Introduction
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:
Automatically insert customer information (such as name, address, and date of birth) directly into the document text.
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).
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.
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:
In the Lightico Administration page, in the left navigation pane, click HTML Designer.
The HTML Designer page opens.In the top right corner of the page, click Create.
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.
Use the HTML Designer tools to do any of the following:
Add and edit text (E).
Insert Attributes, objects and functions (D).
Insert images, videos, hyperlinks, and tables (F).
Set conditions that define the content of the document (C).
Define the document for signing, approval, review, or download (B).
For details, see the relevant sections below.
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.
Warning
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:
In the Lightico Administration pages, go to the HTML designer page.
Click the menu next to the Dynamic Document that you’d like to export and click Export.
A file browser appears.
Save the file on your computer.
In the profile to which you’d like to import, go to the HTML designer page and click Import.
A file browser appears.
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:
Click the add section (+) icon below the existing sections.
A new section appears below the existing ones.Add more sections as needed.
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.Note:
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.
Note:
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:
Click the Add tab button in the top left corner.
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:
Place your cursor in the document canvas in the position you'd like to insert the Attribute link.
Click the Attribute icon in the toolbar (or type @).
The Attribute context menu appears.Search for and select the relevant Attribute.
The Attribute link appears in the document.
Add list Attributes
When you include a list Attribute in a Dynamic Document, it is presented as a table in the builder and in the final PDF. This section explains how to add and edit the list Attribute table.
To include a list Attribute in a Dynamic Document:
Click the Attribute icon on the toolbar and select a list Attribute.
The associated Attribute appears in the context menu.
If the associated Attributed is complex, select the Attributes that you would like to show in the Dynamic Document and click Done.
The list appears in the Dynamic Document as a table.
Place the cursor into the table to edit it in the context menu.
Click the list icon in the context menu.
The list menu appears.
Add or remove Attributes (when the associated Attribute is complex).
Select a column header to edit the header title.
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 x 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:
Click the add new condition icon.
In the dialog box, define the condition (for a full explanation, see Setting conditions in Workflows).
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 | Function can include:
| Function can include:
|
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:
In the toolbar of the relevant section, click the Add Function button.
In the dialog box that opens, click Create New.
The Create Function window appears.Enter the name of your function, for example item_price.
In the function box, enter the function itself.
In bound sections, you can use the add function button or the add attribute button to include attributes and functions that are used in this section.
In unbound sections, you can use the add function button or the add aggregate function button to include functions and aggregate functions from anywhere in the document.
For example, you can write the following function to calculate the price after a discount, that includes 2 attributes.
@document.price - @document.discount
Click Save to save the new function.
Click Save to save the new function .
To add the new function into the section, click the Add Function button again and select the function you just created.
To edit or delete the function, click the relevant buttons next to the selected function.
Add an aggregate function
Click the Add Aggregate Function button.
In the dialog box that opens, click Create New.
In the Create Aggregate Function dialog box, in the title box, enter the name of your aggregate function.
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
Click Save.
To add the new aggregate function into the section, click the Add Aggregate Function button again and select the function you just created.
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:
Place your cursor in the location of the Dynamic Document in which you'd like to place the signature or initial field.
Click the signature or initials icon.
The field appears in the selected location.Select the field, click and drag to resize.
Set the following from the context menu:
Alignment - When the field is in Break Text mode (see next point), you can position it left, right, or center.
Display mode - Select Inline (same line as the text) or Break Text (on it's own line).
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.
Delete - Remove the field from the document.