Class FlowConfig.Builder
-
- All Implemented Interfaces:
public final class FlowConfig.Builder
-
-
Constructor Summary
Constructors Constructor Description FlowConfig.Builder()
-
Method Summary
Modifier and Type Method Description final FlowConfig.Builder
setFlowTag(String flowTag)
Sets the flowTag for a flow. final FlowConfig.Builder
addPhone()
Adds phone module with default config to the flow. final FlowConfig.Builder
addPhone(Phone phone)
Adds phone module to the flow. final FlowConfig.Builder
addEmail()
Adds email module with default config to the flow. final FlowConfig.Builder
addEmail(Email email)
Adds email module to the flow. final FlowConfig.Builder
addName()
Adds name module to the flow. final FlowConfig.Builder
addIntro(Intro intro)
Adds an instance of Intro module to the flow. final FlowConfig.Builder
addIDScan()
Adds ID scan module with default config to the flow. final FlowConfig.Builder
addID()
Adds an instance of ID scan module with custom config to the flow. final FlowConfig.Builder
addID(IdScan idScan)
Adds an instance of ID scan module with custom config to the flow. final FlowConfig.Builder
addProcessId(ProcessId processId)
Adds an instance of Process ID module with custom config to the flow. final FlowConfig.Builder
addIdInfo()
final FlowConfig.Builder
addIdInfo(IdInfo idInfo)
final FlowConfig.Builder
addNfcScan(NfcScan nfcScan)
Adds an instance of NFC scan module with custom config to the flow. final FlowConfig.Builder
addQRScan()
Adds QR scan module to the flow. final FlowConfig.Builder
addQRScan(Boolean showTutorials)
Adds QR scan module to the flow. final FlowConfig.Builder
addDocumentScan(DocumentScan documentScan)
Adds document scan module with custom config to the flow. final FlowConfig.Builder
addSelfieScan()
Adds Selfie scan module with default config to the flow. final FlowConfig.Builder
addSelfieScan(SelfieScan selfieScan)
Adds an instance of Selfie scan module with custom config to the flow. final FlowConfig.Builder
addFaceMatch()
Adds face match module to the flow. final FlowConfig.Builder
addFaceMatch(FaceMatch faceMatch)
Adds face match module to the flow. final FlowConfig.Builder
addGovernmentValidation()
Module in BETAAdds government validation module with default config to the flow. final FlowConfig.Builder
addGovernmentValidation(GovernmentValidation governmentValidation)
Module in BETAAdds government validation module to the flow. final FlowConfig.Builder
addSignature()
Adds a digital signature module with default config to the flow. final FlowConfig.Builder
addSignature(Signature signature)
Adds a digital signature module with custom config to the flow. final FlowConfig.Builder
addUserConsent(UserConsent userConsent)
Adds user consent module with custom config to the flow. final FlowConfig.Builder
addCombinedConsent(CombinedConsent combinedConsent)
Adds combined consent module to the flow. final FlowConfig.Builder
addConference()
Adds a video conference module to the flow. final FlowConfig.Builder
addConference(Boolean disableMicOnCallStart)
Adds a video conference module to the flow. final FlowConfig.Builder
addResults()
Adds result module to the flow. final FlowConfig.Builder
addResults(IncodeWelcome.IDResultsFetchMode idResultsFetchMode)
Adds result module to the flow. final FlowConfig.Builder
addApproval()
Adds user approval module to the flow. final FlowConfig.Builder
addApproval(Boolean showUi, Boolean silentFaceMatch)
Adds user approval module to the flow. final FlowConfig.Builder
addApproval(Boolean showUi, Boolean silentFaceMatch, Boolean forceApproval)
Adds user approval module to the flow. final FlowConfig.Builder
addAcceptVideoSelfie()
Module in BETA final FlowConfig.Builder
addVideoSelfie()
Adds recording of video of the user session to the flow, with default config. final FlowConfig.Builder
addVideoSelfie(VideoSelfie videoSelfie)
Adds recording of video of the user session to the flow, with custom config. final FlowConfig.Builder
addCaptcha()
Adds captcha module to the flow. final FlowConfig.Builder
addGeolocation()
Adds geolocation module to the flow. final FlowConfig.Builder
addCurpValidation()
Adds CURP validation module with default config to the flow. final FlowConfig.Builder
addCurpValidation(CurpValidation curpValidation)
Adds CURP validation module to the flow. final FlowConfig.Builder
addTaxIdValidation()
final FlowConfig.Builder
addCustomWatchlist()
Adds custom watchlist module to the flow. final FlowConfig.Builder
addGlobalWatchlist()
final FlowConfig.Builder
addMachineLearningConsent(MachineLearningConsent machineLearningConsent)
final FlowConfig.Builder
addAES()
Adds the AES (Advanced Electronic Signature) module to the flow. final FlowConfig.Builder
addAES(AES aes)
Adds the AES (Advanced Electronic Signature) module with a custom config to the flow. final FlowConfig.Builder
addEKYB(EKYB ekybModule)
Adds eKYB (electronic Know-Your-Business) module to the flow. final FlowConfig.Builder
addEKYC(EKYC ekycModule)
Adds eKYC (electronic Know-Your-Customer) module to the flow. final FlowConfig.Builder
addAntifraud()
Adds antifraud module to the flow. final FlowConfig.Builder
setRecordSession(Boolean recordSessionMandatory)
Enables screen recording for Front ID Scan, Back Id Scan & Selfie Scan final FlowConfig.Builder
configureScreenRecording(Boolean isEnabled, Boolean isMandatory)
Enables screen recording for Front & Back ID Scan, as well as Selfie Scan final Boolean
contains(Modules module)
Checks if a modules is already a part of this Builder(). final FlowConfig
build()
-
-
Method Detail
-
setFlowTag
final FlowConfig.Builder setFlowTag(String flowTag)
Sets the flowTag for a flow. Should be used only for sections API.
- Returns:
-
addPhone
final FlowConfig.Builder addPhone()
Adds phone module with default config to the flow. Phone module captures user's phone number and sends it to the server.
- Returns:
-
addPhone
final FlowConfig.Builder addPhone(Phone phone)
Adds phone module to the flow. Phone module captures user's phone number and sends it to the server.
- Returns:
-
addEmail
final FlowConfig.Builder addEmail()
Adds email module with default config to the flow. Email module captures user's email address and sends it to the server. If called after addConference or addApproval throws InvalidModuleOrderException
- Returns:
-
addEmail
final FlowConfig.Builder addEmail(Email email)
Adds email module to the flow. Email module captures user's email address and sends it to the server. If called after addConference or addApproval throws InvalidModuleOrderException
- Returns:
-
addName
final FlowConfig.Builder addName()
Adds name module to the flow. Name module captures user's name and sends it to the server.
- Returns:
-
addIntro
final FlowConfig.Builder addIntro(Intro intro)
Adds an instance of Intro module to the flow. To create Intro instance, use Intro.Builder. Intro module displays the list of checkboxes with all of the modules that will be used during the process.
- Parameters:
intro
- Config for Intro module.- Returns:
-
addIDScan
@Deprecated(message = "This method was replaced by addID()", replaceWith = @ReplaceWith(imports = {}, expression = "addID()")) final FlowConfig.Builder addIDScan()
Adds ID scan module with default config to the flow. Scan ID module captures front and back of the ID, sends it to the server and automatically calls validation of the ID. Do not call addProcessId after this
- Returns:
-
addID
final FlowConfig.Builder addID()
Adds an instance of ID scan module with custom config to the flow. To create IdScan instance, use IdScan.Builder. Scan ID module captures front and back of the ID, sends it to the server and automatically calls validation of the ID. Make sure to call addProcessId after calling this method.
- Returns:
-
addID
final FlowConfig.Builder addID(IdScan idScan)
Adds an instance of ID scan module with custom config to the flow. To create IdScan instance, use IdScan.Builder. Scan ID module captures front and back of the ID, sends it to the server and automatically calls validation of the ID.
- Parameters:
idScan
- Config for IdScan module.- Returns:
-
addProcessId
final FlowConfig.Builder addProcessId(ProcessId processId)
Adds an instance of Process ID module with custom config to the flow. To create ProcessId instance, use ProcessId.Builder. Calls validation of the ID. Make sure to call addID first, before calling this method.
- Parameters:
processId
- Config for ProcessId module.- Returns:
-
addIdInfo
final FlowConfig.Builder addIdInfo()
-
addIdInfo
final FlowConfig.Builder addIdInfo(IdInfo idInfo)
-
addNfcScan
final FlowConfig.Builder addNfcScan(NfcScan nfcScan)
Adds an instance of NFC scan module with custom config to the flow. To create NfcScan instance, use NfcScan.Builder. NFC Scan module reads the data from the NFC chip on a supported document and sends it to the server for validation.
- Parameters:
nfcScan
- Config for NfcScan module.- Returns:
-
addQRScan
final FlowConfig.Builder addQRScan()
Adds QR scan module to the flow. Scan QR module captures the QR code on the back of the ID, extracts the valuable data out of it and sends it to the server.
- Returns:
-
addQRScan
final FlowConfig.Builder addQRScan(Boolean showTutorials)
Adds QR scan module to the flow. Scan QR module captures the QR code on the back of the ID, extracts the valuable data out of it and sends it to the server.
- Parameters:
showTutorials
- If true tutorials explaining the scan QR process are shown to the user, false otherwise.- Returns:
-
addDocumentScan
final FlowConfig.Builder addDocumentScan(DocumentScan documentScan)
Adds document scan module with custom config to the flow. DocumentScan module captures the document photo and sends it to the server. On some document types, OCR is performed and the results are returned through the corresponding callback.
- Parameters:
documentScan
- Config for DocumentScan module.- Returns:
-
addSelfieScan
final FlowConfig.Builder addSelfieScan()
Adds Selfie scan module with default config to the flow. Selfie scan module captures the face of the user by using the selfie camera. Photo is sent to the server and liveness check is done automatically.
- Returns:
-
addSelfieScan
final FlowConfig.Builder addSelfieScan(SelfieScan selfieScan)
Adds an instance of Selfie scan module with custom config to the flow. To create Selfie scan instance, use SelfieScan.Builder. Scan selfie module captures the face of the user by using the selfie camera. Photo is sent to the server and liveness check is done automatically.
- Parameters:
selfieScan
- Config for SelfieScan module.- Returns:
-
addFaceMatch
final FlowConfig.Builder addFaceMatch()
Adds face match module to the flow. Face match module compares selfie vs photo from the ID and calculates the match score. Matching is done on the server. addIDScan and addSelfieScan need to be called up front. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Returns:
-
addFaceMatch
final FlowConfig.Builder addFaceMatch(FaceMatch faceMatch)
Adds face match module to the flow. Face match module compares selfie vs photo from the ID and calculates the match score. To create Face match instance, use FaceMatch.Builder. Matching is done on the server. addIDScan and addSelfieScan need to be called up front,
If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
faceMatch
- Config for FaceMatch module.- Returns:
-
addGovernmentValidation
final FlowConfig.Builder addGovernmentValidation()
Module in BETA
Adds government validation module with default config to the flow. Government validation does the following:
Face match between the photo in government's database and the selfie.
Crosscheck between the data in government's database and the data read from the ID.
addIDScan or addQRScan and addSelfieScan modules need to be called up front.
If module is used in Capture-Only mode, ModuleNotAvailableException is thrown.
- Returns:
-
addGovernmentValidation
final FlowConfig.Builder addGovernmentValidation(GovernmentValidation governmentValidation)
Module in BETA
Adds government validation module to the flow. Government validation does the following:
Face match between the photo in government's database and the selfie.
Crosscheck between the data in government's database and the data read from the ID.
addIDScan or addQRScan and addSelfieScan modules need to be called up front.
If module is used in Capture-Only mode, ModuleNotAvailableException is thrown.
- Parameters:
governmentValidation
- Config for GovernmentValidation module.- Returns:
-
addSignature
final FlowConfig.Builder addSignature()
Adds a digital signature module with default config to the flow. Digital signature allows the user to write a signature by hand on the screen. Signature image is sent to the server.
- Returns:
-
addSignature
final FlowConfig.Builder addSignature(Signature signature)
Adds a digital signature module with custom config to the flow. To create Signature instance, use Signature.Builder. Digital signature allows the user to write a signature by hand on the screen. Signature image is sent to the server.
- Returns:
-
addUserConsent
final FlowConfig.Builder addUserConsent(UserConsent userConsent)
Adds user consent module with custom config to the flow. To create User Consent instance, use UserConsent.Builder User consent module captures title and content which user accepts/signs by checking the checkbox or cancels the process.
- Parameters:
userConsent
- Config for UserConsent module.- Returns:
-
addCombinedConsent
final FlowConfig.Builder addCombinedConsent(CombinedConsent combinedConsent)
Adds combined consent module to the flow. To create CombinedConsent instance, use CombinedConsent.Builder.
- Parameters:
combinedConsent
- Config for CombinedConsent module.- Returns:
-
addConference
final FlowConfig.Builder addConference()
Adds a video conference module to the flow. User connects to a video conference with a onboarding executive on the other side. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Returns:
-
addConference
final FlowConfig.Builder addConference(Boolean disableMicOnCallStart)
Adds a video conference module to the flow. User connects to a video conference with a onboarding executive on the other side. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
disableMicOnCallStart
- If true microphone is disabled when entering the video conference, false otherwise.- Returns:
-
addResults
final FlowConfig.Builder addResults()
Adds result module to the flow. Result module shows a screen with OCR data, identity scores, and images captured during the onboarding. It contains the same data that is shown to the onboarding executive in the conference. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Returns:
-
addResults
final FlowConfig.Builder addResults(IncodeWelcome.IDResultsFetchMode idResultsFetchMode)
Adds result module to the flow. Result module shows a screen with OCR data, identity scores, and images captured during the onboarding. It contains the same data that is shown to the onboarding executive in the conference. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
idResultsFetchMode
- Mode for fetching the results.- Returns:
-
addApproval
final FlowConfig.Builder addApproval()
Adds user approval module to the flow. In default configuration, Approval module has no UI. It adds the user in omni database. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Returns:
-
addApproval
final FlowConfig.Builder addApproval(Boolean showUi, Boolean silentFaceMatch)
Adds user approval module to the flow. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
showUi
- Show Approval module UIsilentFaceMatch
- Perform face processing in Approval module.- Returns:
-
addApproval
final FlowConfig.Builder addApproval(Boolean showUi, Boolean silentFaceMatch, Boolean forceApproval)
Adds user approval module to the flow. If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
showUi
- Show Approval module UIsilentFaceMatch
- Perform face processing in Approval module.forceApproval
- If true user is approved with any score.- Returns:
-
addAcceptVideoSelfie
final FlowConfig.Builder addAcceptVideoSelfie()
Module in BETA
- Returns:
-
addVideoSelfie
final FlowConfig.Builder addVideoSelfie()
Adds recording of video of the user session to the flow, with default config. API level 21 is needed for screen recording to work. Selfie image in this step is matched against the selfie collected in the onboarding flow. Omitting the selfie step in the onboarding flow will cause this module to fail with com.incode.welcome_sdk.commons.exceptions.video_selfie.SelfieNotMatchedException
If module is used in capture only mode ModuleNotAvailableException is thrown.
- Returns:
-
addVideoSelfie
final FlowConfig.Builder addVideoSelfie(VideoSelfie videoSelfie)
Adds recording of video of the user session to the flow, with custom config. API level 21 is needed for screen recording to work. Selfie image in this step is matched against the selfie collected in the onboarding flow. Omitting the selfie step in the onboarding flow will cause this module to fail with com.incode.welcome_sdk.commons.exceptions.video_selfie.SelfieNotMatchedException To create VideoSelfie config instance, use VideoSelfie.Builder.
If module is used in capture only mode ModuleNotAvailableException is thrown.
- Parameters:
videoSelfie
- Config for VideoSelfie module.- Returns:
-
addCaptcha
final FlowConfig.Builder addCaptcha()
Adds captcha module to the flow.
- Returns:
-
addGeolocation
final FlowConfig.Builder addGeolocation()
Adds geolocation module to the flow.
- Returns:
-
addCurpValidation
final FlowConfig.Builder addCurpValidation()
Adds CURP validation module with default config to the flow.
- Returns:
-
addCurpValidation
final FlowConfig.Builder addCurpValidation(CurpValidation curpValidation)
Adds CURP validation module to the flow.
- Returns:
-
addTaxIdValidation
final FlowConfig.Builder addTaxIdValidation()
-
addCustomWatchlist
final FlowConfig.Builder addCustomWatchlist()
Adds custom watchlist module to the flow.
- Returns:
-
addGlobalWatchlist
final FlowConfig.Builder addGlobalWatchlist()
-
addMachineLearningConsent
final FlowConfig.Builder addMachineLearningConsent(MachineLearningConsent machineLearningConsent)
-
addAES
final FlowConfig.Builder addAES()
Adds the AES (Advanced Electronic Signature) module to the flow. This method requires the prior inclusion of the ID Scan, Selfie Scan, and Phone modules. The OTP module can be added optionally.
Note: The inclusion order of the ID Scan, Selfie Scan, and Phone modules does not impact the AES module addition. The OTP module can be added at any point if required prior to AE_SIGNATURE module.
- Returns:
-
addAES
final FlowConfig.Builder addAES(AES aes)
Adds the AES (Advanced Electronic Signature) module with a custom config to the flow. To create an AES instance, use AES.Builder This method requires prior inclusion of the ID Scan, Selfie Scan, and Phone modules. The OTP module can be added optionally.
- Parameters:
aes
- Config for AES module.- Returns:
Builder
-
addEKYB
final FlowConfig.Builder addEKYB(EKYB ekybModule)
Adds eKYB (electronic Know-Your-Business) module to the flow.
- Returns:
-
addEKYC
final FlowConfig.Builder addEKYC(EKYC ekycModule)
Adds eKYC (electronic Know-Your-Customer) module to the flow.
- Returns:
Builder
-
addAntifraud
final FlowConfig.Builder addAntifraud()
Adds antifraud module to the flow. Compare current interview with existing interviews and customers and detect anomalies that could be signs of fraud. This module should be added as the last module, except when addCustomWatchlist is used. In that case, first call addAntifraud, then addCustomWatchlist.
- Returns:
-
setRecordSession
@Deprecated(message = "This method was replaced by configureScreenRecording()", replaceWith = @ReplaceWith(imports = {}, expression = "configureScreenRecording()")) final FlowConfig.Builder setRecordSession(Boolean recordSessionMandatory)
Enables screen recording for Front ID Scan, Back Id Scan & Selfie Scan
- Parameters:
recordSessionMandatory
- with true, recording is mandatory, throws an error when recording permission not granted, otherwise proceeds the flow without recording- Returns:
-
configureScreenRecording
final FlowConfig.Builder configureScreenRecording(Boolean isEnabled, Boolean isMandatory)
Enables screen recording for Front & Back ID Scan, as well as Selfie Scan
- Parameters:
isEnabled
- If true, enables recording.isMandatory
- If true, recording is mandatory and an error is thrown when the screen recording permission is not granted.- Returns:
-
contains
final Boolean contains(Modules module)
Checks if a modules is already a part of this Builder().
- Parameters:
module
- the module to check if it's part of this Builder().- Returns:
true if the module is part of this builder, false otherwise.
-
build
final FlowConfig build()
-
-
-
-