ID Scan: Logic & Behavior Customization

Learn how to customize the default logic and behavior of FaceTec's ID Scans.

Default Logic & Behavior

Listed below is the default logic and behavior of a FaceTec ID Scan:

  1. After one or more Retries, a FaceTec ID Scan Session may be able to proceed, even if some checks are not passing or a Matching OCR Template has not been found. The number of Retries that are required depends on the specific checks that are not passing.
  2. A Retry is triggered the first time Face Tampering or Text Tampering is detected. By default, neither of these will trigger a Retry more than once.
  3. A Retry is triggered if the MRZ or Barcode Check does not succeed. By default, neither of these will trigger a Retry more than two times.
  4. A Retry is triggered if a Photo ID Face Image is not found (when one is expected) or the Photo ID Face Image does not match the 3D FaceMap (3D:2D Photo ID Matching only). By default, neither of these will trigger a Retry more than three times.
  5. A Retry is triggered if Unexpected Media (image from a monitor, image on plain paper, etc.) is detected. By default, this will not trigger a Retry more than three times.
  6. A Retry is triggered if an Expected Watermark or Hologram is not detected. By default, this will not trigger a Retry more than once.
  7. NFC Scans are performed based on the matching OCR Template's Settings. However, if multiple NFC Scans fail, then the FaceTec ID Scan Session will still proceed.
  8. The User Confirmation Screen is shown when a Barcode or NFC Chip is not specified by the OCR Template, there is a problem reading the Barcode or NFC chip, or the NFC Step is skipped by the User.
  9. The Additional Review Required Screen is shown if anything unusual is detected by the FaceTec Server.

Customizing Logic & Behavior

To customize the logic and behavior of FaceTec's ID Scans, the proper Retry & Rejection Modifier or Logic Flow Modifier needs to be used. There are two methods for applying these modifiers to FaceTec's ID Scans:

  1. Updating the FaceTec Server Webservice's config.yaml file
  2. Updating the FaceTec Server Webservice's Java Classes

For both of these cases, 3D:2D Photo ID Matching and Standalone ID Scanning are separate customizations. Therefore, different Retry and Behavior Logic can be defined for each of these FaceTec Features. To ensure the same Retry and Behavior Logic, both features will need to be updated to use the proper Retry & Rejection Modifier or Logic Flow Modifier.

Applying Your Logic & Behavior Customizations

Method 1 (with config.yaml):

To enable Global Advanced Behavior Customizations, uncomment the selected modifiers for the relevant APIs in the FaceTec Server Webservice's config.yaml, as listed below:

#  - IGNORE_TEXT_TAMPERING
#  - IGNORE_FACE_TAMPERING
#  - IGNORE_MATCHING
#  - IGNORE_FACE_NOT_FOUND
#  - IGNORE_MRZ_CHECK
#  - IGNORE_BARCODE_CHECK
#  - IGNORE_UNEXPECTED_MEDIA
#  - IGNORE_WATERMARK_DETECTION
#  - PREVENT_PROCEEDING_WHEN_ANY_CHECKS_FAIL
#  - PREVENT_UNIVERSAL_ID_MODE
#  - SKIP_ARR
#  - SKIP_NFC
#  - FORCE_USER_CONFIRMATION
#  - SKIP_USER_CONFIRMATION
#  - ENFORCE_NFC
#  - SKIP_BACK_SCAN

Use the match3D2DIDScanBehaviorOverrides field for 3D:2D Photo ID Matching (i.e. when the User performs a 3D FaceScan, followed by an ID Scan) and the idScanOnlyBehaviorOverridesfield for Standalone ID Scanning.

Important Note: Proper Indentation is necessary for the modifiers to take effect. Two whitespaces should be used before the dash (the "-") underneath the idScanOnlyBehaviorOverrides or match3D2DIDScanBehaviorOverrides field.
Method 2 (with Java Class Changes):

For finer control, the Behavior Modifiers can also be modified directly within the FaceTec Server Webservice's Java Classes. Once the New Behavior Modifiers are defined, they can be added to the API Response with the getMatch3D2IDScanResponseBlobWithFaceTecBehaviorOverrides() Method (for 3D:2D Photo ID Matching) and the  getIDScanOnlyResponseBlobWithFaceTecBehaviorOverrides() Method (for Standalone ID Scanning).

The two examples below show how to update SessionRequestResults.java so that the Barcode Check is ignored when "Smith" is detected in the Document Data Object.

Example (3D:2D ID Photo Matching):

else if (requestResult.getMatch3D2DIDScanResult() != null) {
    ArrayList<FaceTecBehaviorOverrides> newBehaviorOverrides = new ArrayList<>();

    if (requestResult.getMatch3D2DIDScanResult().documentData.contains("Smith")) {
        newBehaviorOverrides.add(FaceTecBehaviorOverrides.IGNORE_BARCODE_CHECK);
    }

    FaceTecBehaviorOverrides[] newBehaviorOverridesArray = newBehaviorOverrides.toArray(new FaceTecBehaviorOverrides[0]);

    var updatedResult = getMatch3D2DIDScanResponseBlobWithFaceTecBehaviorOverrides(requestResult, newBehaviorOverridesArray);

    return new Match3D2DIDScanResponseV10(metadata, externalDatabaseRefID, updatedResult.getMatch3D2DIDScanResult(), updatedResult.getResponseBlob(), updatedResult.getLaunchId());
}

Example (Standalone ID Scanning):

else if (requestResult.getIdScanOnlyResult() != null) {
    ArrayList<FaceTecBehaviorOverrides> newBehaviorOverrides = new ArrayList<>();

    if (requestResult.getIDScanOnlyResult().documentData.contains("Smith")) {
        newBehaviorOverrides.add(FaceTecBehaviorOverrides.IGNORE_BARCODE_CHECK);
    }

    FaceTecBehaviorOverrides[] newBehaviorOverridesArray = newBehaviorOverrides.toArray(new FaceTecBehaviorOverrides[0]);

    var updatedResult = getIDScanOnlyResponseBlobWithFaceTecBehaviorOverrides(requestResult, newBehaviorOverridesArray);

    return new IDScanOnlyResponseV10(metadata, updatedResult.getIdScanOnlyResult(), updatedResult.getResponseBlob(), updatedResult.getLaunchId());
}
Important Note: Your Team is responsible for managing and updating the Behavior Modifiers in a manner that is best for Your Team's Business Requirements. 

Retry & Rejection Modifiers

Rejection/Rejection ModifierDescription
IGNORE_TEXT_TAMPERINGBy default, a retry is triggered when Text Tampering is detected on the ID when it occurs the first time. If this modifier is used, then Text Tampering will no longer trigger a Retry, even if it is detected.
IGNORE_FACE_TAMPERINGBy default, a Retry is triggered when Face Tampering is detected on the ID when it occurs the first time. If this modifier is used, then Face Tampering will no longer trigger a Retry, even if it is detected.
IGNORE_MATCHINGBy default, a Retry is triggered when the enrolled FaceMap from the Liveness Session does not match the face on the ID. If this modifier is used, then mismatches will no longer trigger a Retry.
IGNORE_FACE_NOT_FOUNDBy default, a Retry is triggered when a Facial Image with sufficient quality is not detected on the ID (assuming the OCR Template has stated there is a facial image). If this modifier is used, then insufficient Facial Images will no longer trigger a Retry.
IGNORE_MRZ_CHECKBy default, a Retry is triggered when the MRZ is incorrectly read and the checksum calculation fails. If this modifier is used, then this check will be ignored and the session will succeed, even if the MRZ Checksum fails.

Important Note:
If the MRZ Checksum fails, then the NFC Step may be skipped as a result.
IGNORE_BARCODE_CHECKFor iOS and Android Devices, a Retry is triggered when a barcode is not detected or read correctly. If this modifier is used, then missing or misread Barcodes will no longer trigger a Retry.

Important Note:
Missing or misread Barcodes will never trigger a Retry in a Browser Desktop Platform, even if IGNORE_BARCODE_CHECK is not specified.
IGNORE_UNEXPECTED_MEDIABy default, a Retry is triggered when it has been determined that the ID was scanned from an unexpected media platform (i.e. an image on a monitor or a printed photocopy). This only includes media platforms that were not specified in the OCR Template’s Expected Media settings. If this modifier is used, then scanning from an unexpected media platform will no longer trigger a Retry.
IGNORE_WATERMARK_DETECTIONBy default, a retry is triggered when a Document contains a Watermark or Hologram that is marked to be detected, and detection did not succeed. Unsuccessful detection of a Watermark or Hologram will cause a Retry the first time this occurs. If this modifier is used, Retry is not triggered if a Watermark or Hologram is not detected.
PREVENT_PROCEEDING_WHEN_ANY_CHECKS_FAILBy default, a Session may proceed when some of its checks have failed. This can occur when an ID Scan fails multiple times, but its basic checks pass. If this modifier is used, then a Session will only proceed if all checks have passed.
FORCE_RETRYIf this modifier is used, then a Retry will be triggered, regardless of the results of the ID Scan. You can enable this modifier via Java Class Changes (Method 2) in the FaceTec Server.

Important Note:
This modifier cannot be used to force a retry during the NFC Scanning Step. The Retry Logic during the NFC Scanning Step can only be modified via the ENFORCE_NFC Modifier. The ENFORCE_NFC Modifier will force a retry until NFC Scanning Succeeds.

Logic Flow Modifiers

Logic Flow ModifierDescription
PREVENT_UNIVERSAL_ID_MODEBy default, a Session will enter Universal ID Mode after 3 non-recognized ID Scans, given the ID was scanned correctly and the only problem was that the proper OCR Template was not installed. If this modifier is used, then the above logic will not be applied and sessions will only be allowed to operate in Normal Mode (i.e. they will never enter Universal ID Mode).
SKIP_ARRBy default, the Additional Review Required Screen is shown at the end of an IDScan when FaceTec detects anything unusual that may require further analysis. If this modifier is used, then the Additional Review Required Screen will not be shown, even if something unusual is detected.
SKIP_NFCBy default, an NFC Scan is performed based on the OCR Template Settings. If this modifier is used, then the NFC Scan will be skipped, regardless of the OCR Template Settings.
FORCE_USER_CONFIRMATIONBy default, the User Confirmation Screen is skipped after a successful Barcode or NFC Scan. If this modifier is used, then the User Confirmation Screen will always be shown, even if there is a successful Barcode or NFC Scan.
SKIP_USER_CONFIRMATIONBy default, the User Confirmation Screen is shown when a Barcode or NFC Chip is not specified by the OCR Template, when there is a problem reading the Barcode or NFC Chip, or when the NFC Step is skipped by the User. If this modifier is used, then the User Confirmation Screen will not be shown, even in the above cases.
ENFORCE_NFCBy default, a Session using an NFC Enabled Template can still proceed if the NFC Scan has failed multiple times. If this modifier is used, then this Session will only proceed if the NFC Scan is successful or if the NFC Scan cannot be performed for hardware-related reasons (i.e. the Device does not support NFC Scan or the Document's NFC Chip is Broken). The Skip Button on the NFC Screen will also be hidden and disabled.

Important Note:
 This modifier is ignored for Templates that do not support NFC Scan. Sessions with these Templates will still proceed without performing an NFC Scan.
ENFORCE_BACK_SCANBy default, a Session using a One-Sided (Non-Passport) Template will only request a Front-Side Scan (i.e. it will not request a Back-Side Scan). If this modifier is used, then the Session will require a Back-Side Scan, even if the Document matches a One-Sided (Non-Passport) Template. The Back-Side Scan for a One-Sided (Non-Passport) Template will be treated as an ID Scan with zero fields on the Back Side to OCR.

Important Note: This modifier only affects the behavior of One-Sided (Non-Passport) Templates. It does not affect the behavior of One-Sided (Passport) Templates and Two-Sided Templates. When this modifier is used with a One-Sided (Passport) Template, the behavior remains the same and only a Front-Side Scan is performed. If this modifier is used with a Two-Sided Template, then the Back-Side Scan will still OCR all fields specified on the Back-Side Portion of the Two-Sided Template.
SKIP_BACK_SCANBy default, a Session using a Two-Sided Template will perform the Back-Side Scan of the Document after the Front-Side has been scanned. If this modifier is used, then the Session will skip the Back-Side Portion and will no longer perform the Back-Side Scan. The Session will instead proceed to the User Confirmation Screen or complete the ID Scan.

Important Note: This modifier only affects the behavior of Sessions using a Two-Sided Template. It does not affect the behavior of Sessions using a One-Sided Template. When this modifier is used with a Session using a Two-Sided Template, the NFC Scanning Portion is also skipped.
Important Note: Developers are responsible for understanding all modifiers listed above, examining the API flags returned, and determining if the ID Scan was successful according to their Business Logic.
Important Note: FaceTec does not recommend Skipping the OCR Confirmation Screen, as it provides an interface where Users can perform small corrections, such as in cases where they change their legal name or address. This data is also useful to help catch potential fraudsters who subvert or abuse this feature by intentionally altering names, dates, and other fields, allowing Customers and Partners to add more layers of security to their process.