Verification Configuration Guide
This guide explains how to configure verification processes using the endFlowOnFailure
and useUnverifiedDependencies
flags.
Verification Configuration Guide
This guide explains how to configure verification processes using the endFlowOnFailure
and useUnverifiedDependencies
flags.
Table of Contents
Configuration Flags
Each process configuration (e.g., frontIdCardConfig
, livenessConfig
) supports the following flags:
endFlowOnFailure
endFlowOnFailure
Controls whether a failed process blocks the entire verification flow.
Type: boolean
Default: true
When true
(default):
- If the process runs out of attempts without being verified
- The entire verification flow is stopped
- No further processes will execute
- The verification is marked as failed
When false
:
- The verification flow continues even if this process fails
- Other processes can still execute
- Useful when you want to collect as much data as possible
Example:
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": true,
"attempts": 3
}
}
If frontIdCard fails after 3 attempts, the verification stops.
{
"livenessConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 2
}
}
If liveness fails, the verification continues with other processes.
useUnverifiedDependencies
useUnverifiedDependencies
Controls whether a process can proceed when its dependencies have failed.
Type: boolean
Default: false
When false
(default):
- The process waits for its dependencies to be verified (passed all validations)
- Stricter check ensuring data quality
- The process will not execute if dependencies failed
When true
:
- The process can execute even if its dependencies failed (as long as they completed)
- Looser check allowing the process to proceed regardless of dependency results
- Useful when you want to attempt all processes
Example:
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 3
},
"faceRecognitionConfig": {
"required": true,
"useUnverifiedDependencies": false,
"attempts": 3
}
}
If frontIdCard fails, faceRecognition will not execute (strict mode).
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 3
},
"faceRecognitionConfig": {
"required": true,
"useUnverifiedDependencies": true,
"attempts": 3
}
}
If frontIdCard fails, faceRecognition will still execute (lenient mode).
Process Dependencies
The following processes have dependencies that must be considered when configuring verification:
Face Recognition
Requires at least one of: frontIdCard, passport, liveness, drivingLicense, insuranceAgentLicense, or nonThaiIdCard
DOPA
Requires:
- backIdCard (always required)
- Either frontIdCard or passport
DipChip
Requires:
- frontIdCard
- liveness
Chip DOPA
Requires either: dipChip or deviceDipChip
FrontIdCard (when ThaiD is enabled)
Optional dependency: thaiD
- If
thaiDConfig.required = true
, frontIdCard will wait for thaiD to complete - If
thaiDConfig.required = false
, frontIdCard proceeds independently
Common Scenarios
Scenario 1: Stop on First Failure (Strict Mode)
Goal: Ensure all processes pass, stop immediately on any failure
Configuration:
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": true,
"attempts": 3
},
"backIdCardConfig": {
"required": true,
"endFlowOnFailure": true,
"attempts": 3
},
"livenessConfig": {
"required": true,
"endFlowOnFailure": true,
"attempts": 2
}
}
Behavior:
- frontIdCard executes
- If frontIdCard fails → verification stops
- If frontIdCard passes → backIdCard executes
- If backIdCard fails → verification stops
- If backIdCard passes → liveness executes
- If liveness fails → verification stops
Scenario 2: Continue on Failure, Maintain Data Quality
Goal: Execute as many processes as possible, but only with verified dependencies
Configuration:
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 3
},
"backIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 3
},
"dopaConfig": {
"required": true,
"endFlowOnFailure": false,
"useUnverifiedDependencies": false
}
}
Behavior:
- frontIdCard executes
- If frontIdCard fails → continues to backIdCard
- backIdCard executes
- If both fail → DOPA will not execute (dependencies not verified)
- If at least frontIdCard or passport passes → DOPA executes
Scenario 3: Execute All Processes Regardless of Failures
Goal: Attempt all processes to collect maximum data
Configuration:
{
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 3
},
"livenessConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 2
},
"faceRecognitionConfig": {
"required": true,
"endFlowOnFailure": false,
"useUnverifiedDependencies": true
}
}
Behavior:
- frontIdCard executes
- liveness executes (regardless of frontIdCard result)
- faceRecognition executes (even if frontIdCard and liveness both failed)
- All processes attempt to collect data
Scenario 4: ThaiD with FrontIdCard Comparison
Goal: Use ThaiD data to verify frontIdCard when both are required
Configuration:
{
"thaiDConfig": {
"required": true,
"endFlowOnFailure": false,
"attempts": 2
},
"frontIdCardConfig": {
"required": true,
"endFlowOnFailure": false,
"useUnverifiedDependencies": false,
"attempts": 3
}
}
Behavior:
- thaiD executes first
- If thaiD fails:
- frontIdCard is blocked (thaiD is an optional dependency that's required)
- Set
useUnverifiedDependencies: true
on frontIdCardConfig to allow it to proceed
- If thaiD passes:
- frontIdCard executes
- Data from both can be compared for additional validation
Alternative (allow frontIdCard to proceed even if thaiD fails):
{
"frontIdCardConfig": {
"useUnverifiedDependencies": true
}
}
Summary Table
Flag | Default | When to Use |
---|---|---|
endFlowOnFailure: true | Yes | Critical processes that should stop verification on failure |
endFlowOnFailure: false | No | Optional processes or when you want to collect maximum data |
useUnverifiedDependencies: false | Yes | Ensure data quality - only proceed with verified dependencies |
useUnverifiedDependencies: true | No | Attempt process even if dependencies failed |
Best Practices:
- Use
endFlowOnFailure: true
for critical identity verification steps - Use
endFlowOnFailure: false
for supplementary checks - Use
useUnverifiedDependencies: false
(default) to maintain data quality - Use
useUnverifiedDependencies: true
only when you need to attempt all processes regardless of results
Updated about 7 hours ago