## RiskOS™ Setup: Selfie Reverification

Use this guide to assemble a **RiskOS™** workflow for the **Selfie Reverification** flow—what steps to add, what each step produces, and how to handle **errors** and **resubmits**.

The workflow follows the same shape as a standard Document Verification flow, with the flow-specific differences in the following sections.

## What's different for this flow

- **What the consumer captures:** a live selfie only, compared against the headshot from a prior DocV evaluation. There is no document capture and no splash screen.
- **Requires a prior evaluation:** the Evaluation request must include `data.individual.additional_context.previous_reference_id`—the reference ID of the earlier DocV evaluation to match against.
- **Enrichment result:** the flow returns a `selfieReverification` enrichment object containing the comparison decision, reason codes, and Digital Intelligence signals.
- **Configure the flow:** select the Selfie Reverification flow server-side through your Capture App flow configuration (`config.use_case_key`) or workflow setup.

## Before You Start

Make sure you have the following:

- Access to the RiskOS™ Dashboard with the **Predictive DocV** enrichment enabled.
- A published **Capture App flow** for your DocV flow type.
- A basic understanding of RiskOS™ **workflows** and **enrichment steps**.

## Execution Flow

Predictive DocV runs as an **enrichment step** in a RiskOS™ workflow. Because document capture happens on the consumer's device, the workflow **pauses** at the Document Request step and resumes automatically once capture finishes.

```
user handoff

Input

Document Request

Capture App

Document Verification

Conditional Decision Logic

Decision
```

1. **Input** — You [call](https://help.socure.com/riskos/reference/postevaluation#/) the **Evaluation** API with PII and optional DocV config.
2. **Document Request** — The workflow **pauses** and returns a **URL / QR / token** for user handoff to the [DocV Capture App](https://help.socure.com/riskos/docs/capture-app#/).
3. **Document Verification** — After the consumer completes capture, the workflow **resumes**, verifies the images, and returns DocV results.
4. **Image Request** _(optional but recommended)_ — Retrieves captured images and attaches them to the case in RiskOS™.
5. **Conditional Decision Logic** — Routes based on the DocV decision, reason codes, document type, and other signals.
6. **Decision** — Emits the final outcome (**accept**, **reject**, **resubmit**, **review**, or **cancel**).

> 📘
> **Note**:
> After **Document Request**, the workflow stays **paused until the end user acts** or the Document Request **expires**.

## Add DocV to a Workflow

1. In the RiskOS™ Dashboard, go to **Workflows** and create a new workflow or open an existing one.
2. On the workflow canvas, select the **plus (+)** icon.
3. Add a **Document Request** enrichment step, then add a **Document Verification** enrichment step.
4. _(Recommended)_ Add an **Image Request** enrichment step to attach captured images to the case.
5. Add **Conditional Decision Logic** and a **Decision** step to route on the DocV outputs.

## Required and Optional Inputs

DocV evaluates the consumer information provided through your workflow. Providing complete and accurate inputs improves extraction matching and verification confidence.

### Required Inputs
- `data.individual.given_name` — Consumer's first/given name
- `data.individual.family_name` — Consumer's last/family name
- `data.individual.phone_number` — Phone number in E.164 format
- `data.individual.address.country` — Country code in ISO 3166-1 alpha-2 format

### Optional Supporting Inputs
- `data.individual.date_of_birth`
- `data.individual.email`
- `data.individual.address.line_1`
- `data.individual.address.locality`
- `data.individual.address.major_admin_division`
- `data.individual.address.postal_code`
- `data.individual.docv.config` — Capture App behavior

## Workflow Components Used by DocV

| Component | Purpose | Typical input | Output |
| --- | --- | --- | --- |
| [Input](https://help.socure.com/riskos/docs/input) | Start an evaluation | PII | Workflow begins |
| [Document Request](https://help.socure.com/riskos/docs/enrichment) | Create capture session | — | URL / QR Code |
| [Document Verification](https://help.socure.com/riskos/docs/enrichment) | Verify uploaded images | — | DocV **decision**, **reasonCodes**|
| [Image Request](https://help.socure.com/riskos/docs/enrichment) _(rec.)_ | Attach images to the case | `referenceId` | Images available in RiskOS™ |
| [Condition](https://help.socure.com/riskos/docs/condition) | Apply your rules | DocV decision | Route to final **Decision** step |
| [Decision](https://help.socure.com/riskos/docs/decision) | Emit final outcome | Routed value | **accept / reject / resubmit / review / cancel** |

## Common Decision Patterns

DocV returns a module **decision** plus **reason codes** rather than a numeric risk score. Use `documentVerification.decision.value` in [conditions](https://help.socure.com/riskos/docs/condition) and [decision rules](https://help.socure.com/riskos/docs/decision-rules) to route evaluations. The following patterns are common starting points:

### Decision-Based Routing

| Condition | Suggested Action | Rationale |
| --- | --- | --- |
| `documentVerification.decision.value = accept` | Continue | Document verified — proceed to the next step |
| `documentVerification.decision.value = review` | REVIEW | Inconclusive signals — route to manual review |
| `documentVerification.decision.value = resubmit` | Resubmit | Image quality issue — start a new evaluation |
| `documentVerification.decision.value = reject` | REJECT | Verification failed or fraud signals present |

### Error Handling

Errors can occur on the **Document Request** and **Document Verification** enrichment steps. Configure error handling in the workflow for these fields:

- `socure_doc_request_error`
- `socure_docv_error`

Common configurations:
- On error, route to **resubmit** and add logic to initiate a new evaluation request.
- On error, route to **cancel** and add logic to re-initiate an evaluation request.

## Resubmit Handling

A **resubmit** decision typically means a captured image prevented verification — not necessarily fraud. Start a **new evaluation** so the consumer receives a fresh DocV transaction. Tailor messaging based on returned **reasonCodes**.

## Save and Publish

Once your workflow is configured, publish it to go live. After publishing, capture the workflow identifier you pass as `workflow` on the [Evaluation API](https://help.socure.com/riskos/docs/docv-sdk-integration#/).

## Workflow Testing Checklist

Use this checklist to confirm accuracy, resilience, and completeness before going live.
- PII inputs are collected consistently
- Country codes use ISO format
- The Document Request handoff is surfaced to the consumer
- Workflow routing aligns with your fraud policy
- Error, resubmit, and review paths are defined
- The Image Request step is included for reviewers.
