Skip to main content

Overview

The Document Upload flow allows users to submit identity documents by uploading files instead of capturing them with a camera. Users progress through three upload stages — required documents, partial documents (pick at least N from a group), and optional documents — then review their uploads before submission. This flow is useful for desktop-first applications, pre-scanned documents, or when camera access is unavailable. Modules used: form (WELCOME, CONSENT, REQUIRED_DOCUMENT_UPLOAD, PARTIAL_DOCUMENT_UPLOAD, OPTIONAL_DOCUMENT_UPLOAD, REVIEW, RESULT screens)
Instead of building from scratch, fork an existing flow from the public sample codes.
Entity must already exist. The document upload flow requires the entity used in the session to already exist — created via the API, the FrankieOne Portal, or a prior SDK flow. If you need to create the entity on the fly, use the Individual module or an eKYC form flow before starting the document upload.

Flow Diagram

1

Welcome Screen

Initial greeting and introduction (type doc_upload).
2

Consent Screen

Capture user consent for data processing.
3

Required Document Upload

User uploads all mandatory documents.
4

Partial Document Upload

User uploads at least the minimum required number from a group of documents.
5

Optional Document Upload

User can optionally upload additional supporting documents.
6

Review Screen

Uploaded documents displayed for confirmation.
7

Result

Upload success or failure displayed.

Full Implementation

Step-by-Step Breakdown

1. Initialize the SDK

Pass the session object to OneSDK(). Include the form.provider and form.docUpload recipe configuration. The docUpload property defines which documents appear at each upload stage.

2. Configure the docUpload Recipe

The docUpload recipe controls the three upload stages:

3. Create Upload Screen Components

Create a component for each upload stage using the dedicated screen names:

4. Wire Up Events

Use .on(event) listeners to navigate through the upload stages. Each stage emits a form:<screen_name>:ready event when complete.

5. Handle Results

The review screen emits form:review:ready on success and form:review:failed on failure. Use UPLOAD_SUCCESS and UPLOAD_FAIL result states for the result screen. See Error Scenarios for details.

Upload Screen Types

The document upload flow uses three distinct screen types, each configured through the docUpload recipe:

Required vs Optional Documents

Configure the three tiers in the docUpload recipe:
See Document Upload Configuration for the full type reference and validation rules.

Review After Upload

The review screen shows all uploaded documents for confirmation. Use type: "doc_upload" to render the upload-specific review UI:
Use the UPLOAD_SUCCESS and UPLOAD_FAIL result states for the outcome screens:

Customization Reference