Referenced Web Service

A Referenced Web Service allows users to continuously retrieve data from a web service via REST, and to save it in a database table that can be used the same way as any other referenced table. Database access is not needed in order for this feature to work.

  1. In the Therefore™ Solution Designer, go to the Design object and right-click on Referenced Tables. Select the option 'New Referenced Web Service'.

    Image showing the Referenced Web Service option

  2. The first step is to configure the table the data from the web service should be saved in. Take a look at the JSON response sample from the documentation of the REST API you will be using to find out what the table should look like. Choose a unique identifier for the referenced table by checking the box in the left column.

    Image showing the table configuration

  3. Go to the 'Synchronization' tab and click 'Create a new REST request' to configure the REST call.

    Image showing the location of the New Request button

  4. Give the REST call an intuitive name, and specify the method, and the API endpoint. Depending on the REST API you are using other configuration steps, such as authorization might be necessary.

    Image showing the API endpoint configuration

  5. Go back to the 'Synchronization' dialog to and click 'Test' to test the configuration.

    Image showing the location of the Test button

  6. Click 'Start' to run the REST call. Make sure everything is in order.

    Image showing a test call

  7. Go back to the Synchronization tab and map the data from the JSON response to the matching table columns. Click 'OK' to save the configuration.

    Image showing index data matching

  8. You can check if the table was populated correctly by right-clicking on the Referenced Table and selecting the 'Delete Rows' option. This dialog also allows you to search the referenced table.

    Image showing retrieved data

  9. Now, the table can be directly referenced in a category. In this example, 'ID' is the unique identifier for the table so it is added as an invisible primary field. The other fields including data from the referenced table are dependent on ID.

    Image showing the user experience

  10. When sending new documents to Therefore™, we can now select public holidays from a list. This data is being kept up to date by the referenced web service running in the background.

    Image showing filtering in an end user application

  11.  In accordance with our configuration, more information about the holiday is automatically added from the referenced table.

    Image showing additional filters being applied