Computer Vision Settings
The Computer Vision settings are defined in JSON format as key-value pairs. The following settings are available:
| Setting | JSON Key | Description |
|---|---|---|
| Workflow entity | SourceEntityName | The entity associated with the business workflow (digital journey) that calls the OCR process. Needed only if the OCR process is used on an edit form (to alter an existing record) to update the workflow entity's business status after the scan (see BusinessStatusSuccess and BusinessStatusFail). If the OCR process is used on an insert form (to create a new record), this key is not needed. |
| Populated entities | Entities | Indicates the entities that will be populated with the scanned values.
|
| Logging context | ContextForm | Logging context field included in the log events sent to the DCI logging. Useful for tracking the relevant digital journey when debugging. |
| User confirmation | WaitUserConfirmation | The default value is true.
|
| Show Upload Photo button | ShowUploadPhotoButton |
|
| Show Take Picture button | ShowTakePictureButton |
|
| Register face from OCR | RegisterFaceFromOCR |
|
| Expiration time | SessionExpiredMins | The time in minutes after which, if no navigation to another screen is done, the session expires. In this case, it redirects the user to a session expired page. NOTE Make sure your main entity's business status is updated to the business status you have set in your flow settings for businessStatusSessionExpired. |
| Rotate image | RotateImage |
Rotates the image to an angle that is multiple of 90° (180, 270 etc.), based on the orientation of the text from the OCR. |
| Crop image | CropImage | If true, it extracts the person's face in an image and returns the data in the following structure:Copy |
| Maximum number of scan attempts | MaxRetry | The maximum number of scan attempts. If this number of failed scans is reached, the user will be redirected according to the specifications in the maskNextStepUrlFail. |
| Expiration Redirect | businessStatusSessionExpired | Enables or disables redirection to the expiration page after SessionExpiredMins. |
| Option set based validation and replacement | OptionSets | Replaces values returned by the OCR process with entries from an option set.
|
| Entity based validation | LookupEntities |
Validates values returned by the OCR processor based on records in an entity.
Parent – Defines hierarchical relationships between lookup entities. For instance, you can check if a city name belongs to a valid county name.
If the value returned by the OCR processor is not found in the lookup entity, the entry will not be populated. The user will be able to manually select only values from the lookup entity. |
| Scanned Document | DocumentSettings | Defines settings specific to the scanned document:
|
| Redirect in case of success | maskNextStepUrlSuccess | Location in the user interface where the user is redirected after a successful scan.
|
| Redirect in case of failure | maskNextStepUrlFail | Location in the user interface where the user is redirected after the maximum number of failed scan attempts (see MaxRetry).
|
| Redirect in case of session expired | maskNextStepURLFailSessionExpired | Location in the user interface where the user is redirected if the scan is not finalized before the expiration time (see SessionExpiredMins).
|
| Business status update in case of success | BusinessStatusSuccess | Business workflow status update of the Workflow entity if the scan is successful. Needed only if the OCR process is used on an edit form (to alter an existing record). If the OCR process is used on an insert form (to create a new record), this key is not needed. |
| Business status update in case of failure | BusinessStatusFail | Business workflow status update of the Workflow entity if the scan fails. Needed only if the OCR process is used on an edit form (to alter an existing record). If the OCR process is used on an insert form (to create a new record), this key is not needed. |
| Retain SDK logs | DisableLogSDKMessages (Ecosystem SysPack 2.5.0 or later) |
Set this property to true if you do not wish to retain SDK logs. |
| Log severity level | LogLevel (Ecosystem SysPack 2.5.0 or later) |
Controls the minimum severity level for the logged messages. Set it to error to capture only SDK errors or to debug to include all SDK log messages. |
| Log browser details | DisableSaveBrowserDetails (Ecosystem SysPack 2.5.0 or later) |
Set this property to true to prevent storage of user platform details in the FTOS_DFP_Logging entity. |
| 2-sided document | DocumentSides (Ecosystem SysPack 2.7.0 or later) |
The number of scans per session.
|
| Process both sides together | CaptureBothSides (Ecosystem SysPack 2.7.0 or later) |
Set this property to true to process and validate both sides of a document together and return a single result. |
| Debug mode | Debug (Ecosystem SysPack 2.7.0 or later) |
Set this property to true to log debugging information in the browser console. |
Examples
{
"SourceEntityName":"FTOS_Test_OCR",
"Entities":[
{
"DestinationEntityName":"FTOS_Test_OCR_Applicant",
"SourceEntityName":"FTOS_Test_OCR",
"SourceLookupDestinationName":"applicantId"
}
],
"ContextForm" : "FTOS_Test_Processors_UserJourney",
"WaitUserConfirmation" : false,
"ShowUploadPhotoButton" : true,
"ShowTakePictureButton" : true,
"RegisterFaceFromOCR" : false,
"SessionExpiredMins" : 15,
"RotateImage" : true,
"CropImage" : false,
"MaxRetry":5,
"businessStatusSessionExpired": true,
"OptionSets":[
{
"OptionSetName":"Gender Type",
"MappingName":"Sex",
"OptionSetItems":{
"M":"Male",
"F":"Female"
}
}
],
"LookupEntities":[
{
"MappingName":"Country",
"EntityName":"FTOS_CMB_Country",
"AttributeKey":"code"
}
],
"DocumentSettings": {
"DocumentType":"Passport",
"Provider":"Azure",
"Validations":"V01,V05,V06,V07,V10",
"RequiredFields": ["PersonalNumberBody", "DocumentNumberBody", "LastNameBody", "GivenNameBody", "NationalityBody", "PlaceOfBirthBody", "BirthDateBody", "SexBody"]
},
"maskNextStepURLSuccess":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Success"
},
"maskNextStepURLFail":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Fail"
},
"maskNextStepURLFailSessionExpired":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Expired"
},
"businessStatusSuccess":"OCR Valid",
"businessStatusFail":"OCR Failed"
}
{
"SourceEntityName":"FTOS_Test_OCR",
"Entities":[
{
"DestinationEntityName":"FTOS_Test_OCR_Applicant",
"SourceEntityName":"FTOS_Test_OCR",
"SourceLookupDestinationName":"applicantId"
}
],
"ContextForm" : "FTOS_Test_Processors_UserJourney",
"WaitUserConfirmation" : false,
"ShowUploadPhotoButton" : true,
"ShowTakePictureButton" : true,
"RegisterFaceFromOCR" : false,
"SessionExpiredMins" : 15,
"RotateImage" : true,
"CropImage" : false,
"MaxRetry":5,
"businessStatusSessionExpired": true,
"OptionSets":[],
"LookupEntities":[],
"DocumentSettings": {
"DocumentType":"DrivingLicence",
"Country":"RO",
"Provider":"Azure",
"Validations":"",
"RequiredFields": ["IssuedAt", "IssuedUntil", "IssuedBy", "PIN", "DrivingLicenceNo", "DrivingCategory"]
},
"maskNextStepURLSuccess":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Success"
},
"maskNextStepURLFail":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Fail"
},
"maskNextStepURLFailSessionExpired":{
"entity":"FTOS_Test_OCR",
"form":"FTOS_Test_OcrFDF",
"section":"Expired"
},
"businessStatusSuccess":"OCR Valid",
"businessStatusFail":"OCR Failed"
}