Validation
Monitor and manage data exceptions
Last updated
Monitor and manage data exceptions
Last updated
Validation processes help check data and perform tasks which if failed will create an “Invalid” message on the transaction page. You can also use Validation to “Halt” the workflow process and stop documents moving through the system. With custom message abilities, this can be a powerful automated data management function. You can validate data on any Data In or Data Transform process, simply click on the collection to bring up the menu and select “Validators”. This will take you to the Validator designer page, where you can manage multiple validation processes which will be trigger before the document gets saved into that collection. Once in the designer if a document is in that collection it will be brought up as an example to use (this needs to happen before you build your validation to allow Utopia to pull in available field names).
Click the green button to create a new Validation stage.
On the Validation designer page, you can setup the parameters you need to ensure data validation is setup correctly. The inputs required are described as follows:
Give the Validation stage a unique Name
Yes/No toggle – This will mark the validator on or off from the system. If off Utopia will not run the validation stage and will not create any Transaction messages.
Yes/No toggle – This will tell Utopia whether the validation stage must effect the document flow. If Critical is marked as Yes, the system will run the validation stage and if the validation fails it will create the invalid transaction message but also stop the document from being created in the collection. If Critical is marked as No, the validation stage will run and if the validation fails it will create the invalid transaction message, however it will still allow the document to continue through the workflow and get saved in the respective collection.
here you can upload a custom JSON code to run for validation, please see an example to understand the inputs here. Simply complete your code (Utopia will not validate this code for you) and one you are happy upload it into the JSON stage but pressing “UPLOAD TARGET FILE” and selecting your json file through the file browser.
This is our most popular data validation tool which essentially allows you to check data based on a lookup function and a reference field.
Lookup From -> Select the collection you would like to validate your data against from this dropdown menu.
From Field -> Select the lookup match field you would like to use which is within the Lookup from collection you have just selected.
Local Field -> Select the matching field you would like to match with from your Document. Utopia will take this field and use it to find lookup matches in your Lookup From collection.
Compare Field -> This will be the field in your Document that you would like to compare against the data found from the Lookup. Note this can be the same field that you did the lookup against, or a field that contains associated data.
Operator -> This will bring up a drop-down menu of all the available operators you can use to Validate the fields with. Commonly if the lookup result is an array of values, “In or Contains” is usually used to see if the field contents exist in the lookup, however if you the results are single fields you can use the other operators.
Compare Against Field -> this is the field from the lookup from collection which you would like to compare against the field from your document which you specified in the Compare Field above.
Validation Message -> Input your custom message that you would like displayed in the Invalid transaction message which is displayed on the transaction page. This can be useful to help direct users to connect with the correct people to fix issues, eg: “There is a product code mapping issue, please contact Dave to resolve” Save by pressing the save icon on the bottom right of the screen. When running this validation stage if failed will create a transaction entry on the transaction page. It will contain the Compare Field data from the incoming document, show the array position if available, the key paths used as well as the lookup collection ID and the Validation Message provided.
Click the red button to delete a validation stage.
Click the green button to edit a validation stage.
By clicking the blue toggle button you can switch the stage on and off . Blue is Active.