Harmoney Dossier Data
- Version 1
Business goal​
This generic class can be used to perform data checks on a set of dossier related data points (properties of the dossier, validations on dossier documents, etc).
Mechanism​
The validation will only be executed if the dossier matches certain conditions (optional).
These conditions can be defined in the (global) dossierFilter or in the dossierFilterCondition defined in the settings.
When the dossier is applicable, the configured validation(s) will be executed.
Depending on which card the data validation needs to be performed, a validation can be configured. We currently support validations on data from the following cards:
- Dossier Details
- External Dossier Details
- Dossier Documents
- RBA
For some cards there is a list of data points available (e.g. documents). The validation will be performed on all entries in the list, unless there is an additional filter defined in the settings.
This filter can be different depending on the card the validation is performed on.
Configuration​
Settings​
This validation class is highly configurable and depending on the use case, a different set of properties need to be set. Therefore, please consult the examples below to find a configuration that is most equivalent to your use case.
- Make sure there is always an error code provided for the validation.
- Optionally, you can define which fields are required. Therefore, define the exact field path from the field definitions for the corresponding object/card.
See also the Generic Validation settings for more information.
Example(s)​
Require a dossier metadata field to be filled (for a certain dossier type)
{
"dossierFilterCondition": {
"equals": {
"fieldPath": "type",
"value": "KNOW_YOUR_CUSTOMER"
}
},
"validations": {
"details": {
"error": {
"errorCode": "METADATA_FIELD_REQUIRED",
"requiredFields": ["metadata.METADATA_DOSSIER_1"]
},
"validation": {
"isNotNull": {
"fieldPath": "metadata.METADATA_DOSSIER_1"
}
}
}
}
}
Require a document of a certain type to be available
{
"validations": {
"documents": {
"error": {
"errorCode": "DRIP_SWITCH_DOC_REQUIRED"
},
"filter": {
"in": {
"fieldPath": "type",
"values": [
"DRIP_SWITCH"
]
}
},
"notEmpty": true
}
}
}
Require a manual assessment on RBA when the system assessment is TO_INVESTIGATE (or empty)
{
"validations": {
"rba": {
"error": {
"errorCode": "MANUAL_ASSESSMENT_REQUIRED",
"requiredFields": ["manualAssessment"]
},
"filter": {
"or": [
{
"isNull": {
"fieldPath": "systemAssessment"
}
},
{
"equals": {
"fieldPath": "systemAssessment",
"value": "TO_INVESTIGATE"
}
}
]
},
"validation": {
"isNotNull": {
"fieldPath": "manualAssessment"
}
}
}
}
}
Block a transition when an external dossier metadata field has a certain value
{
"validations": {
"externalDetails": {
"error": {
"errorCode": "UNABLE_TO_PROCEED"
},
"validation": {
"equals": {
"fieldPath": "metadata.EXTERNAL_METADATA_FIELD_AUTOCOMPLETE",
"value": "KEY_ITEM_1"
}
}
}
}
}
Require one of 2 documents based on a question answer
{
"dossierFilterCondition": {
"and": [
{
"equals": {
"fieldPath": "client.partyType",
"value": "COMPANY"
}
},
{
"equals": {
"fieldPath": "formQuestions.QUESTION_ID",
"value": "ANSWER_YES"
}
}
]
},
"validations": {
"documents": {
"error": {
"errorCode": "DOC_TYPE_X_OR_Y_REQUIRED"
},
"filter": {
"in": {
"fieldPath": "type",
"values": [
"DOC_TYPE_X",
"DOC_TYPE_Y"
]
}
},
"notEmpty": true
}
}
}