Skip to content

Platform IDV Recommendation

Client SDK
Mobile approve
SSO
Sub-journey

Obtains an identity verification recommendation based on previously collected documents or selfie

About client-facing steps

A journey is a sequence of steps that are executed when it's invoked by a client application (known as the "client"). Some steps require involvement from the client, such as to collect user input. Other steps, like validating a token, are executed in the backend by the Mosaic journey engine alone.

When invoked, the journey begins executing the steps while the client waits for further instructions. When a journey reaches a client-facing step, the journey asks the client for the required input and then waits for the client to respond. The client presents their own UI if user interaction is required, and returns input to the journey. The journey then proceeds in a similar manner until it's completed.

Description

This step obtains a verification recommendation from Mosaic Identity Verification based on images collected earlier in the journey. It evaluates the captured data and returns a recommendation that indicates the verification outcome.

Use this step after Document Acquisition step, Selfie Acquisition step, or both.

Running this step concludes the Identity Verification session. Capture steps that run after it require a new session.

When executed, Mosaic processes the collected images asynchronously. The client should keep polling until the journey proceeds to the next step or returns an error. If capture didn't succeeded, the step returns a not_enough_data error and follows the failure behavior.

If defined, an output variable will store the verification result (including document details and personal user info—see example here). This data can be used in subsequent journey steps in the expression fields (e.g., idv_recommendation.recommendation) or as a part of an interpolated string (e.g., Hi ${idv_recommendation.verified_info.person.given_name}).

Configuration

FieldDescription
Output variableName of the variable used to store the verification result data, which can be used in subsequent journey steps. Default is idv_recommendation. The object includes the recommendation, document details, and personal user info.
Error output variableName of the variable that stores any errors returned by action
Failure behaviorDetermines the behavior in case of failure, which either aborts the journey or proceeds to a failure branch of the control flow (default).
Custom branchesAdditional journey branches supported for this step. The client can select a branch by returning the branch ID. For each branch, you can define a schema for the information that the client is expected to return (used by the code generator and for autocompleting journey expressions) and a display name to label it in the editor.
Journey event data

This step can be configured to record step input and output data, or a custom payload, which is then surfaced in journey events in Journey Analytics for diagnostic purposes. For details, see Additional data reporting.

Example

When executed, this step sends a callback to the client. The journeyStepId is set to Platform IDV Recommendation (transmit_platform_idv_recommendation). Keep calling submitClientResponse() with an empty client response until the journey proceeds to the next step or returns an error. Show a loader while processing runs. Mosaic recommends polling about once per second.

The recommendation data (including final recommendation, checks, and extracted data) is stored in the output variable (default: idv_recommendation) and can be used in subsequent steps, such as a Condition step. For example, use the expression idv_recommendation.recommendation == 'ALLOW' to branch based on the verification outcome.

async function handleIdvRecommendation() {
  let idoResponse;

  do {
    await new Promise((resolve) => setTimeout(resolve, 1000));
    // If SDK was loaded via script tag, invoke functions inside 'window.tsPlatform'
    idoResponse = await ido.submitClientResponse(ClientResponseOptionType.ClientInput);
  } while (idoResponse.journeyStepId === IdoJourneyActionType.WaitForIdvRecommendations);

  return handleJourneyResponse(idoResponse);
}