Automatically Generate Customer Contracts

In this example, we set up a button on a customer edit form that generates a services agreement automatically populated with the customer's name.

1 Prepare the contract template.

Create a contract template in Microsoft Word. Enclose between curly brackets any entity attribute names that must be populated automatically. For more details, see Creating Document Templates.

2 Set up a digital document based on the contract template.

IMPORTANT!  
For the entity you wish to attach the document, create a file-type attribute where to store the document itself.

Create a new entity-based digital document using the template created earlier.

3 Attach a report to the entity based on the digital document.

  1. Make sure that the target entity (in this case Investor) has a file attribute defined in which to store the contract (in this case contract).
  2. In FintechOS Studio, go to Reporting & Analytics > Reports and create a new report attached to the contract file storage attribute defined in the target entity.
    • Name – Unique name used to identify the report in the system.
    • Display Name – How the report name will be displayed in the user interface.
    • Scope – Entity.
    • Type – Document.
    • Entity – Name of the entity to which you wish to attach the report (in this case Investor).
    • Output Method – Attach to entity.
    • Destination Field – Name of the entity attribute that will store the report (in this case contract). The attribute must be of file type.
    • Destination File Name – File name under which the report will be saved.
    • Report Document Type – File type under which the report will be saved.
  3. Click the Save and Reload button at the top right corner of the page.
  4. In the Report Items section, insert a new entry for the digital document you created at Step 2.
    • Name – Enter a custom name for the report item, or leave the default name in place.
    • Start Date and End Date – Upon the report generation, it will gather data within the specified time interval (between the start date and the end date).
    • Report Document – Select the digital document created at Step 2.
    • IsDefault – Select the checkbox so that the report item is used when generating the report.
  5. Click the Save and Close button at the top right corner of the page.

4 Create a button to generate the customer contract.

  1. In FintechOS Studio, open the customer's entity form or form driven flow where you want to generate the contract.
  2. In the UI designer, add a button to generate the contract.
  3. In the Advanced tab, in the After events section, edit the button click event to trigger the report generation.
    /* Click event for the generateCotract button */
    $('#generateCotract').on('click', function (event) {
    	ebs.callReportByName('wealthManagementContract', formData.id);
    });
  4. Click the Save and Close button at the top right corner of the page.

5 How to generate a customer contract from the user interface

  1. Open FintechOS Portal.
  2. Open the entity form or form driven flow where the button to generate the customer contract is located.
  3. Make sure the data required to generate the contract is populated and saved (in this case the name field).
  4. Click the button to generate the customer contract.
  5. The customer contract will be generated and saved in the designated file attribute.
  6. You can click the file name to download the file locally.