On a Dataverse table, you can use web service rules for these purposes:

  • Validate data
  • Validate and set data

Before you can set up a web service rule, set up the web service to be used.

This topic explains how to set up a web service rule.

You can find the required web service settings, to be used for the web service rule, in the technical documentation as provided by the web service provider.

Validate data

Using a web service, you can validate if a new or changed field value in a Dataverse table matches a value in another internal or external source.

Example:

Use a web service rule to validate a ZIP code and house number combination.

For request type 'POST', the request JSON is, for example:

  {

      "code":3905 NR,

      "housenumber":2

  }

 

Validate and set data

Using a web service, you can:

  1. Validate if a new or changed field value in a Dataverse table matches a value in another internal or external source.
  2. Get a field value from another internal or external source and set this value in a Dataverse table.

Example:

Use a web service rule to first validate if a ZIP code and house number combination is valid. If valid, based on the ZIP code, set address data like street name, city name, and province name.

For request type 'POST', the response JSON is, for example, when successful:

  {

      "response":true,

      "street":Kazemat,

      "city":Veenendaal,

      "province":Utrecht

  }

Note: With a web service rule, you can only set field values in Dataverse if first a validation is successfully done.


Standard procedure

1. If you have set the Bound field to 'Yes', define the column which value is set by the response parameter value.
  Sign in to Data quality studio on Dataverse.
2. In the Site map, click Configurations.
3. Click New.
4. In the Table field, enter or select the table to which the validation rule is applied.
5. Define the column to which the web service validation rule is applied. If you enter or change a value in this column, on Save, the web service request is sent.
  In the Column field, enter or select the desired column.
6. In the Validation Type field, select 'Web API'.
7. In the Web API field, enter or select the web service to be used.
8. When you create a validation rule, by default, your user account is assigned as the owner.

You can assign another user account as owner.

  In the Owner field, if desired, you can make changes.
9. Click Save.
10. Subtask: Set request parameters
  10.1 Set the required request parameters for the web service validation rule, as provided by the web service provider.
  In the Request Parameters section, click New Web API parameter.
  10.2 In the Name field, enter the parameter name as used in the request body.
  10.3 In the Parameter Type field, select 'Request'.
  10.4

For a web service request, parameters with values are required. You can set parameter values in two ways:

  • Bound: You can link the request parameter to a specific column of the base table. In this case, the column value is used as parameter value in the request.
  • Not bound: You can define a fixed value for the request parameter.
  In the Bound field, select the desired option.
  10.5

If you have set the Bound field to:

  • 'Yes', define the column to which the parameter is linked. You can only select a column of the base table for the web service rule.
  • 'No', enter a fixed value that is used as parameter value in the request.
  In the Value field, select the desired column or enter the desired fixed values.
  10.6 Click Save & Close.
11. Subtask: Set response parameters.
  11.1 Set the required response parameters for the web service validation rule, as provided by the web service provider.
  In the Response Parameters section, click New Web API parameter.
  11.2 In the Name field, enter the parameter name as used in the response.
  11.3 In the Parameter Type field, select 'Response'.
  11.4

For a web service response, parameters are required. You can set two types of response parameters:

  • Not bound (mandatory): Define the possible response success values. These success values indicate that the request parameter values are valid. The possible success values are provided by the web service provider.
  • Bound (optional): You can use response parameters to set a value in a Dataverse table column. To do so, link the response parameter to a specific column of the base table. The web service provider provides the possible response parameters to set a value in Dataverse.
  In the Bound field, select the desired option.
  11.5 If you have set the Bound field to 'No', enter the possible success values, as provided by the web service provider.
  In the Success Values field, enter the possible values.
  11.6 If you have set the Bound field to 'Yes', define the column which value is set by the response parameter value. You can only select a column of the base table for the web service rule.
  In the Value field, select the desired column.
  11.7 Click Save & Close.
12. Subtask: Set conditions.
  12.1 It can be that the web service validation applies only to specific records in the table. Use conditions to indicate to which records the validation applies.
  Click the Conditions tab.
  12.2 Click New condition.
  12.3 In the Column field, enter or select the field on which the condition is based.
  12.4

Indicate if the condition includes or excludes records:

  • Equal: The validation rule applies only to records with the defined condition value.
  • Not Equal: The validation rule applies to all records except the ones with the defined condition value.
  In the Equality field, select the desired option.
  12.5 In the Value field, enter the field value on which the condition is based.
  12.6 Click Save & Close.
Related to Notes

Set up web service rule

 

Provide feedback