> For the complete documentation index, see [llms.txt](https://docs.timvero.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.timvero.com/timveroos-admin-panel-documentation/v.8.2/setup/05-documents/document-templates.md).

# Document Templates

## Overview

Document management in timveroOS handles both system-generated documents and uploaded files throughout the lending lifecycle. The system provides template-based document generation, structured document storage, and comprehensive tracking capabilities.

## Configuration Scope

### Admin Panel Configuration

1. Navigate to Settings → Documents
2. Review available document types (defined on the Building Platform)
3. Create and edit templates for generated documents
4. Link templates to credit products (optional)

### Through the Building Platform (SDK)

Document requirements and types are configured on the Building Platform:

* **Define required document types**: Specify which documents must be provided for each entity and state
  * [SDK Guide: Document Management](https://documentation.timvero.com/#document-management)
* **Define generated document types**: Configure which documents are automatically generated for each entity and state (templates are created in Admin Panel)
  * [SDK Guide: Document Templates](https://documentation.timvero.com/#document-templates)
* **Set up validation and signing workflows**: Configure document validation rules and signature requirements
  * [SDK Guide: Document Management](https://documentation.timvero.com/#document-management)

**Important**: Document types, validation rules, generation logic, and requirement conditions are configured on the Building Platform. The Admin Panel is used for template creation and management.

## Document Types

### System-Generated Documents

The platform creates documents automatically using configured templates:

* **Application Forms**: Generated from applicant data
* **Agreements and Contracts**: Created with approved templates
* **Notifications-like documents**: Approval letters, decline notices
* **Disclosures**: Regulatory required documents

### Uploaded Documents

External documents submitted through the system:

* **Identity Documents**: Government IDs, passports
* **Income Verification**: Pay stubs, tax returns, bank statements
* **Property Documents**: Titles, appraisals, insurance
* **Signed Documents**: Executed agreements returned to system

## Document System Architecture

The document management system is built on several Building Platform components:

**Entity Support**: Entities that support documents implement the HasDocuments interface, enabling:

* Automatic document storage association
* Document type requirements
* UI tab integration
* Audit trail for all document operations

**Requirement Configuration**: Document requirements configured in the Admin Panel are implemented through DocumentTypeAssociation beans that support:

* Required vs. optional documents
* Conditional requirements based on entity state
* Role-based requirements (e.g., different documents for borrowers vs. guarantors)

**Automatic Features**: Once configured, the system automatically:

* Displays document tabs on entity pages
* Tracks upload/download history
* Validates requirement completion
* Blocks process progression for missing required documents

### Technical Implementation Note

Document management in timveroOS utilizes framework interfaces configured through both Admin Panel and the Building Platform:

**Framework Components:**

**HasDocuments Interface** Entities supporting documents automatically receive:

* Upload and download capabilities
* Version tracking functionality
* Configurable requirement rules
* Integrated UI tabs

**DocumentTypeAssociation System** The framework enables:

* Conditional document requirements
* Role-based document rules
* Status-dependent requirements
* Automatic validation

**Admin Panel Configuration:**

* Document type definitions
* Basic requirement rules
* Template management

**Building Platform Customization (SDK) Enables:**

* Complex conditional requirements
* Custom document types
* Advanced validation logic
* External document system integration

*Note: Advanced document requirements and custom types require Building Platform development (SDK). Contact your implementation team for complex document configuration needs.*

## Template Configuration

### Creating Templates

Document templates are created through the template designer interface:

* **Template Editor**: Visual design interface
* **Variable Integration**: Insert merge fields for dynamic data
* **Version Control**: All template versions archived
* **Testing Capability**: Preview with sample data

### Template Variables

The system provides predefined variables for templates:

* **Participant Data**: Names, addresses, identifiers
* **Loan Information**: Amounts, terms, rates
* **Calculation Results**: Payment schedules, fees
* **System Data**: Dates, reference numbers

### Document Naming

Document names can include the same variables available for document content:

* Client identifiers: Names, identifiers
* Loan details: Contract number, identifiers
* System data: Date, Reference number

### Testing Templates

Templates can be tested before deployment:

1. Click "Check" button in template editor
2. Enter participant ID for test data
3. System generates preview document
4. Verify variable population and formatting

## Document Requirements

### Configuring Required Documents

Financial institutions can specify required documents based on:

* **Participant Roles**: Different requirements for borrowers, guarantors
* **Product Types**: Product-specific documentation needs
* **Entities and Profiles Attributes**: Conditional requirements based on applicant/collateral data
* **Workflow Stages**: Documents needed at different process points

### Conditional Requirements

The system supports dynamic document requirements:

* Documents required based on loan amount thresholds
* Additional documents for specific customer profiles
* Product-specific documentation needs
* Risk-based document requests

## Document Generation

### Automatic Generation

Documents can be generated automatically based on:

* **Status Changes**: Application approval, contract execution
* **Workflow Events**: Specific stages in lending process
* **Time Triggers**: Scheduled document creation
* **User Actions**: Manual generation requests

### Generation Process

1. System identifies trigger event
2. Selects appropriate template
3. Populates template with current data
4. Generates document in configured format
5. Stores in document repository
6. Notifies relevant parties

## Document Upload

### Upload Interface

Users can upload documents through:

* **Single File Upload**: Individual document submission
* **Multiple File Upload**: Batch document upload
* **Drag and Drop**: Simplified upload interface

### Upload Management

The system provides document management features:

* **View Documents**: Display uploaded files
* **Delete Documents**: Remove uploaded files
* **Download Documents**: Retrieve copies
* **Print Documents**: Direct printing capability

## View Documents

### Document Display

The system provides in-browser preview capabilities for uploaded documents, enabling users to review files without downloading them.

#### Supported Format

**PDF Files**: The document viewer currently supports PDF document preview within the system interface.

#### Accessing Document Viewer

**Navigation:**

1. Navigate to the relevant record (Application, Deal, Participant, etc.)
2. Select the **Documents** tab
3. Click on any uploaded PDF file to open the viewer

**Viewer Features:**

* Page navigation
* Zoom controls
* Full-screen mode
* Download option

#### File Upload Support

While the system accepts various document formats for upload and storage, the in-browser preview functionality is available for PDF files. Other file types can be downloaded for local viewing.

## Document Storage

### Organization Structure

Documents are organized systematically:

* By participant (borrower, guarantor)
* By document type (identity, income, property)
* By workflow stage (application, underwriting, servicing)
* By date and version

### Version Management

* All document versions maintained
* Clear version identification
* Access to historical versions
* Audit trail of changes

## Signature Management

### E-Signature Integration

Financial institutions can configure electronic signature workflows:

* **Electronic Signature**: Integrated e-sign capabilities
* **Physical Signature**: Upload of manually signed documents
* **Signature Tracking**: Monitor signature status
* **Completion Notifications**: Automatic alerts

### Signature Process

1. Document generated from template
2. Sent for electronic signature or printed
3. Signature status tracked
4. Signed document stored automatically
5. Workflow continues upon completion

## Compliance Features

### Audit Trail

All document activities are tracked:

* Document creation/upload timestamps
* User actions on documents
* Access and viewing history
* Download and print records

### Retention Management

* Configurable retention periods
* Automated archival processes
* Compliance with regulatory requirements
* Secure disposal procedures

## Integration Points

### Workflow Integration

Documents integrate with lending workflows:

* Required documents block process progression
* Generated documents trigger next steps
* Upload completion enables continuation
* Missing documents create alerts

### System Integration

Document management connects with:

* **Notification System**: Alerts for document requirements
* **Workflow Engine**: Process control based on documents
* **Reporting System**: Document status analytics
* **External Systems**: Document exchange capabilities

## Configuration Guidelines

### Initial Setup

1. Define document categories and types
2. Create initial template library
3. Configure requirement rules
4. Set up storage parameters
5. Enable signature options
6. Test document workflows

### Template Development

* Start with essential templates
* Use consistent naming conventions
* Include all required variables
* Test with various scenarios
* Document template purpose
* Maintain template library

### Requirement Configuration

**Admin Panel:**

* Map documents to products
* Establish exception procedures

**Through the Building Platform (SDK):**

* Define conditional logic for document requirements
* Set validation rules for document types
* Configure expiration periods and renewal requirements

[SDK Guide: Document Requirements](https://documentation.timvero.com/#document-requirements)

## Technical Considerations

### Supported Formats

* **Templates**: HTML, custom markup
* **Uploads**: PDF, JPG, PNG, common formats
* **Generated**: PDF, HTML, CSV, XML
* **Storage**: Compressed, encrypted

*Note: When creating templates for PDF document generation in timveroOS, it is essential to wrap all Pebble control structures in HTML comments . This prevents code sanitization when switching between template editing modes. Control Structures to Comment:* \\

* *Conditionals:* `<!--{% if condition %}-->` ... `<!--{% endif %}-->`
* *Loops:* `<!--{% for item in collection %}-->` ... `<!--{% endfor %}-->`
* *Other flow control blocks*

### Performance

* Template caching for speed
* Asynchronous generation for large documents
* Optimized storage and retrieval
* Scalable architecture

## Related Operations

Once configured, see how documents are used in operations:

* [Documents (OPS - Origination)](/timveroos-admin-panel-documentation/v.8.2/ops/01-origination/documents.md) - Managing documents during application processing

## Next Steps

With document templates configured, proceed to:

* [Notification Templates](/timveroos-admin-panel-documentation/v.8.2/setup/06-notifications/notification-templates.md) - Set up communications
* [Product Architecture](/timveroos-admin-panel-documentation/v.8.2/setup/03-products/product-architecture.md) - Configure lending products
* [Workflow Fundamentals](/timveroos-admin-panel-documentation/v.8.2/setup/04-workflows/workflow-fundamentals.md) - Build automated processes

***

*For additional document management guidance, consult your implementation team or system documentation.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.timvero.com/timveroos-admin-panel-documentation/v.8.2/setup/05-documents/document-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
