Adding Face Recognition to a Digital Journey
There are two ways to add a Face Recognition processor to a digital journey: with a custom processor step or manually.
Add Face Recognition to a Journey with Custom Processor Steps (No Code)
This no-code approach is the easiest way to add Face Recognition to your journey. Use a custom processor step to create a dedicated flow step that triggers the processor.
Add Face Recognition to a Journey Manually
- Open the form step where you wish to trigger the processor.
- In the Advanced section, open the After Section Save tab and use the following model to add the processor code:Copy
// For Ecosystem SysPack 2.5.0 and later, use:
var dfpHelper = ebs.importClientScript('FTOS.ECOS.Utils');
// Prior to Ecosystem SysPack 2.5.0, use:
// var dfpHelper = ebs.importClientScript('FTOS.DFP');
ebs.removeFormEditButton('ebsContainerContent');
context.stopNextNavigation = true;
var componentName = 'FTOS_DFP_FaceRecognition';
var entitydata=ebs.getCurrentEntityData();
var recordId = formData.id;
var flowSettingsName = formData.FlowSettings;
var params = {
flowSettingsName: flowSettingsName,
processorSettingsType: 'FaceRecognition',
processorSettingsName: ''
};
var typeFaceRecId = entitydata.FTOS_Test_FaceRecognition_typeFaceRecId_displayname;
switch (typeFaceRecId){
case 'Liveness':
params.processorSettingsName='FTOS_Test_FaceRecognition_Liveness';
componentName='FTOS_DFP_FaceRecognitionLiveness';
break;
case 'LivenessMultipleImages':
params.processorSettingsName='FTOS_Test_FaceRecognition_LivenessMultipleImages';
componentName='FTOS_DFP_FaceRecognitionLiveness';
break;
case 'LivenessOCR':
params.processorSettingsName='FTOS_Test_FaceRecognition_Liveness_OCR';
componentName='FTOS_DFP_LivenessOCR';
break;
case 'LivenessOCRMultipleImages':
params.processorSettingsName='FTOS_Test_FaceRecognition_Liveness_OCR_MultipleImages';
componentName='FTOS_DFP_LivenessOCR';
break;
default:
params.processorSettingsName='FTOS_Test_FaceRecognition_Selfie';
break;
};
dfpHelper.loadComponent(componentName, params, recordId, true); - In the form driven flow's Advanced section, in the Before Events tab, use the following model to add code that assigns the Face Recognition flow settings to the form driven flow:Copy
if (sessionStorage.getItem("B2CSessionIdParam")) {
formData.setSaveEndpoint("FTOS_Test_SaveOnboarding");
}
formData.FlowSettings = "FTOS_Test_FaceRecognition";