Document Drafter Learning

How to integrate questionnaires with external data sources
This lesson will show you how to retrieve information from an external database and use this information to fill out the questionnaire.

Introduction

Creating an integration between a questionnaire and an external data source enables the user to retrieve data from the external data source e.g. party name, registration no., address, company form etc., and insert such data in the questionnaire and answer questions. 

Prerequisites

To do a database integration, a connection between the database and the portal needs to be set up in advance. Certain connections are available by default, and additional connections can be developed.

Creating a database integration

Database integration is typically created on top of an existing questionnaire, but can be added when creating the questionnaire.

Create a "lookup" question

First a "lookup" question needs to be added to the questionnaire which instructs the user to insert the relevant search criteria in the questionnaire.

  1. Open an automated template.
  2. Select Add question.
  3. Insert question text in the box.
  4. Select advanced data field.
  5. Select Database integration.
  6. If database integration is available for your portal, a new tab API Configuration will appear. Select this tab.
  7. Select The answer to this question will be used to get data from the API.
  8. Select an API from the dropdown menu. 
  9. Select Save.

The question will be added to the questionnaire with a green dot indication that a database integration is active.

You can add several "lookup" questions to a questionnaire, e.g. if you need to retrieve information on several parties from the same database or if you need to retrieve information from several databases. 

    

Create database integrated datafield

When a "lookup" question has been added to the questionnaire, database integrated data fields can be created. 

  1. Select Add question.
  2. Insert question text in the box.
  3. Select advanced data field.
  4. Select Database integration.
  5. Select This question will be answered with data retrieved from the API.
  6. Verify that the correct lookup question is selected and change if needed (if the questionnaire contains several lookup questions).
  7. Select the API data that will answer this question from the drop down menu (select See all options if relevant).

If the external data source can only return one answer (e.g. company registration number) select Save and you are done. 

    

External data source may return several values

In some cases the external data source may return several values, e.g. names of board members, secondary names etc.

If the external data source could return several answers, you need to configure how the answers shall be assigned to the data field and you will automatically be presented to the available options.

Select as appropriate one of the available options and select Save

Autofill question with predefined answers via external data sources 

When a "lookup" question has been added to the questionnaire, an API autofill can be added to questions with predefined answers.

  1. Open a question with predefined answers.
  2. Select the tab API Autofill.
  3. Select the answer which you want to autofill.
  4. Verify that the correct lookup question is selected and change if needed (if the questionnaire contains several lookup questions).
  5. Select API data that the API autofill rule will be based on (select See all options) if relevant to see additional options.
  6. Define autofill rule for selected answer via the dropdown menu.
  7. As standard the question will remain shown in the questionnaire if it is answered via the external data source. If relevant, select Hide question if any answer is auto filled.
  8. Repeat steps 3-7 for additional answers (if relevant). 
  9. Select Back to question.
  10. Select Save.

A green dot will appear next to the answers which could be auto filled via the external data source to indicate that a database integration is active.

External data source may return several answers

In some cases the external data source may return several answers, e.g. names of board members, secondary names etc.

Questions with predefined answers can be answered based on the number of answers returned from the external database, e.g. number of names of board members. 

You will need to define an autofill rule which determines when the particular answer will be selected.

Select as appropriate one of the available options, insert a number and select Save