Adding Computer Vision to a Digital Journey

There are two ways to add a Computer Vision processor to a digital journey: with a custom processor step or manually.

Add Computer Vision to a Journey with Custom Processor Steps (No Code)

This no-code approach is the easiest way to add Computer Vision to your journey. Use a custom processor step to create a dedicated flow step that triggers the processor.

Add Computer Vision to a Journey Manually

  1. Use the UI Designer to create a button in the user interface that calls the processor.
  2. Add the following code in the After Events window:
    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');

    // For simplified OCR component configuration, use:
    var componentName = "FTOS_ECOS_OCR";

    // For advanced OCR component customizations, use:
    // var componentName "FTOS_DFP_OCR";


    var params = {};
    params.flowSettingsName = '<generic processor settings group name>';
    params.processorSettingsType = 'OCR';
    params.processorSettingsName = '<processor settings name>';

    $('<Computer Vision button name>').click(function () {
        ebs.callActionByName("FTOS_DFP_FlowProcessorSettingsByType", params, function (f) {
            var processorSettingsId = f.UIResult.Data.ProcessorSettingsId;
            dfpHelper.loadComponent(componentName, processorSettingsId, ebs.getCurrentEntityId(), false);
        });
    }
    NOTE  
    The FTOS_ECOS_OCR component can be customized using the FTOS.OCR.Component.Capture and OCR.Translations client script libraries.
    The FTOS_DFP_OCR component can be customized using the FTOS.OCR.Controls, FTOS.OCR.Component, and OCR.Rresources libraries.
  3. If the Computer Vision automation processor is called in an insert form (to create a new record, not edit an existing record), also add the following code in the After Events window:
    Copy
    var ocrResult = sessionStorage.getItem("ocrResult");
    ocrResult = JSON.parse(ocrResult);
     
    if (ocrResult) {
        ebs.setFormAttributeValue("ebsContainerContent", "<form field 1 name>", ocrResult.updateObject.<form field 1 name>); 
        ebs.setFormAttributeValue("ebsContainerContent", "<form field 2 name>", ocrResult.updateObject.<form field 2 name>);
        ................
        sessionStorage.removeItem("ocrResult");
    }

    This code populates the form fields with the scanned values according to the automation processor's mappings (see Computer Vision Mappings for details) and clears the scan results from session storage.

  4. Click Save and Close to save your form step.

Examples