> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstwork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Management

> Collect, store, verify, and manage employee documents with OCR and compliance automation

## Overview

Firstwork's **Document Management** system handles the complete lifecycle of employee and candidate documents — from collection and storage to verification, OCR processing, and compliance tracking.

## Document Types

Firstwork supports collection and management of various document types:

| Category               | Examples                                         |
| ---------------------- | ------------------------------------------------ |
| **Identity**           | Government-issued ID, passport, driver's license |
| **Work Authorization** | Work visa, employment authorization document     |
| **Education**          | Diplomas, transcripts, certifications            |
| **Professional**       | Licenses, professional certifications            |
| **Employment**         | Offer letters, employment agreements, NDA        |
| **Tax**                | W-4, W-9, I-9, state tax forms                   |
| **Background**         | Background check results, drug test results      |
| **Financial**          | Direct deposit forms, banking information        |

## Document Requirements

**Company Document Requirements** define which documents your organization needs:

| Configuration       | Description                       |
| ------------------- | --------------------------------- |
| Document Type       | Category of document              |
| Required            | Mandatory or optional             |
| Stage               | At which hiring stage it's needed |
| Verification Method | How the document is verified      |
| Expiration Tracking | Whether to track expiry dates     |
| Compliance Rule     | Rule that validates the document  |

### Per-Entity Requirements

Document requirements can vary by **Legal Entity**:

* Different jurisdictions may require different documents
* Entity-specific compliance requirements
* Regional document formats and standards

## Document Submissions

When a candidate uploads a document, a **Document Submission** is created:

```mermaid theme={null}
graph LR
    A[Document Uploaded] --> B{Verification Method}
    B -->|OCR| C[Extract Data]
    B -->|Manual| D[Queue for Review]
    B -->|Auto| E[Compliance Rule Check]
    C --> F[Populate Form Fields]
    D --> F
    E --> F
    F --> G[Document Verified]
```

### Submission Status

| Status    | Description                         |
| --------- | ----------------------------------- |
| Pending   | Uploaded but not yet verified       |
| In Review | Being reviewed by HR                |
| Verified  | Document approved                   |
| Rejected  | Document rejected (reason provided) |
| Expired   | Document past expiration date       |

## OCR Processing

Firstwork integrates **OCR (Optical Character Recognition)** to automatically extract data from uploaded documents:

### Supported Document Types

* Government-issued IDs
* Passports
* Driver's licenses
* Tax forms
* Certifications

### OCR Workflow

1. Candidate uploads a document image or PDF
2. OCR processes the document and extracts text
3. Extracted data is mapped to form fields
4. Compliance rules validate the extracted data
5. Results are available for review

### OCR Configuration

OCR processing can be configured for:

* Multiple languages
* Specific document layouts
* Custom extraction rules
* Confidence thresholds

## Compliance Integration

Documents integrate deeply with the [Compliance Engine](/features/compliance-engine):

* **Validation rules** — Check that document data meets requirements (e.g., ID not expired, age verification)
* **Completeness checks** — Ensure all required documents are submitted
* **Cross-reference** — Compare document data against form submissions
* **Automated actions** — Trigger automations when documents are verified or rejected

## Storage and Security

| Feature             | Description                                     |
| ------------------- | ----------------------------------------------- |
| **Secure Storage**  | Documents stored with enterprise-grade security |
| **Fast Delivery**   | CDN-backed delivery for fast access worldwide   |
| **Encryption**      | At-rest and in-transit encryption               |
| **Access Control**  | Permission-based document access                |
| **Audit Trail**     | Complete history of document access and changes |
| **GDPR Compliance** | Document deletion support for GDPR requests     |

## File Formats

Supported upload formats:

* **Images** — JPEG, PNG, GIF, WebP
* **Documents** — PDF, DOC, DOCX
* **Spreadsheets** — XLS, XLSX, CSV
* **Other** — TXT, RTF

Maximum file size and format restrictions are configurable per document requirement.

## Large File Uploads

For large files, Firstwork supports **multipart uploads** — files are split into smaller parts and uploaded in parallel, then reassembled. This enables reliable uploads of large documents without timeouts, even on slower connections.
