Show/Hide Toolbars

Thereforeâ„¢ Help

Tutorials > Solution Designer > Design > Referenced Tables

Configuring a Referenced Web Service

Scroll

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...'.

SD_T_ReferencedTable_WebService_001

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.

 

SD_T_ReferencedTable_WebService_002

 

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

SD_T_ReferencedTable_WebService_003

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.

SD_T_ReferencedTable_WebService_004

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

SD_T_ReferencedTable_WebService_005

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

SD_T_ReferencedTable_WebService_006

 

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.

SD_T_ReferencedTable_WebService_007

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.

SD_T_ReferencedTable_WebService_008

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.

SD_T_ReferencedTable_WebService_009

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.

 

SD_T_ReferencedTable_WebService_010

 

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

SD_T_ReferencedTable_WebService_011