Bundled Documents & Forms (beta)
Learn how to share information across several documents and automate them simultaneously
25 min | 6 Tasks
Task 6: Service Fee Calculation
Open the Loan Agreement template in the Template Editor. Find Paragraph 1.1 and apply the system name, “loan-amount” to the Money Element:
Now create a new Article 2 (Service Fee) and insert the following:
“The Debtor shall pay to the Creditor a service fee in the amount of” followed by three Calculation Elements and one Link Element.
Let’s start with the Link Element. Relate the Link Element to the Currency in the Money named loan-amount. Revise the Conditions Phrase as follows:
Dropdown No. 01: Choose “Currency In Money”
Dropdown No. 02: Choose “Loan Agreement”
Dropdown No. 03: Choose “loan-amount”
Relating the Link Element to Currency in Money, will ensure that the services fee will always be in the same currency as the loan itself.
Now let’s create formulas for the Calculations. In our example, the impetus for calculating services fee amount is the understanding that the service fees would be either 5 %, 3 % or 1 % of the loan amount, depending on the Responses in the Fee Calculation Form created in the previous lesson.
First, click the first Calculation Element, and in the formula field that appears at the top of the page, insert the following text: “@loan-amount *0.05”.
(This value equals the loan amount multiplied (*) by .05)
Repeat this step for the next two Calculation Elements with 1 % and 3 %, i.e.:
“@loan-amount *0.01”
“@loan-amount *0.03”
Now it’s time to relate Conditions to Question Element Responses created in the Fee Calculation Form.
The logic behind our Service Fee Calculations is as follows:
If the Response to both Questions is “No”, then the Service Fee will be 5 %
If the Response to both Questions is “Yes”, then the Service Fee will be 1 %
If the Response to one Question is “Yes”, and the other, “No”, then the Service Fee will be 3 %
The Conditions Phrase for the for the first calculation (5 %) will be revised as follows
(insert the second Conditions Phrase by clicking the Add Condition button):
Calculation One (5 %):
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “can we use the debtor as a reference”
Dropdown No. 04: Choose “Is set to”
Dropdown No. 05: Choose “No”
AND
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “Is the debtor a customer of ours”
Dropdown No. 04: Choose “Is set to”
Dropdown No. 05: Choose “No”
Calculation Two (1 %):
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “can we use the debtor as a reference”
Dropdown No. 04: Choose “Is set to”
Dropdown No. 05: Choose “Yes”
AND
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “Is the debtor a customer of ours”
Dropdown No. 04: Choose “Is set to”
Dropdown No. 05: Choose “Yes”
Set the formula for the second calculation to 1 % (*0.01) and change the logic – both answers should be Yes.
The Conditions Phrases for the third calculation (3 %) will be slightly different, as we must anticipate either combination of Yes or No.
To achieve this, you will use Conditions Groups.
Click the arrow next to the Add condition button to see the dropdown options and click the Add Group Conditions button.
After clicking Add Group Conditions, a blank Conditions Phrase will appear. Make sure you delete this first Conditions Phrase. Now, add two Conditions in the newly created Condition Group, and then add another condition group with two conditions inside it.
Be careful, that the second Condition Group is created on the same level as the first, and not within it. The logical dependency will not operate correctly if the Conditions are not created correctly.
Now, instead of “AND”, set OR as the divider between those two groups, and set the Conditions inside those two groups.
The Conditions Phrases should be revised as follows:
Condition Group 1:
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “can we use the debtor as a reference”
Dropdown No. 04: Choose “is set to”
Dropdown No. 05: Choose “No”
AND
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “Is the debtor a customer of ours”
Dropdown No. 04: Choose “Is set to”
Dropdown No. 05: Choose “Yes”
OR
Condition Group 2:
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “can we use the debtor as a reference”
Dropdown No. 04: Choose “is set to”
Dropdown No. 05: Choose “No”
AND
Dropdown No. 01: Choose “Question”
Dropdown No. 02: Choose “Fee Calculation”
Dropdown No. 03: Choose “can we use the debtor as a reference”
Dropdown No. 04: Choose “is set to”
Dropdown No. 05: Choose “No”
Save and Publish the template and test the template to confirm that the fees are calculated properly, and that only a single fee populates.
Test: If so, now you can test to see if you correctly set the Fee Calculation Form as Internal Document works.
Go to Dashboard and click the Create button in the Loan Agreement template placeholder.
You, as a user with permission to see internal documents, will see the Fee Calculation Form above the Loan Agreement template.
Enter an amount for the loan, scroll down to the bottom of the page to save the Document, then click the Share button. In the following pop-up window, activate External Sharing.
Copy the URL link.
Now, pretend to be an external party with whom you are sharing, click the “Copy Link” button, and paste it into another browser in which you are not signed into Legito (an Incognito Window is a good option).
In the new browser, the Loan Agreement document will show without the internal Fee Calculation Form, but the services fee should correctly reflect the calculations and formulas set on the Form.
If this is the case, then congratulations, you have successfully created an internal form in this not so simple task.