Import Patterns

Import data from a JSON file. The file should follow the structure shown in the example below. Importing data will automatically create and link document types, targets, and variants in the database.

The imported document type, target, and variant will be automatically linked in the database. These relationships can be viewed and modified on their respective management pages.
Upload JSON File
Select a JSON file containing document patterns to import.
Direct JSON Input
Example JSON Structure
{
    "document_type": "Invoice",
    "target": "Company",
    "variant": "US",
    "table_name": "companies",
    "primary_key": "company_id",
    "classification_regex_pattern": "INVOICE|Invoice|Bill",
    "extraction_regex_patterns": [
        {
            "field_name": "Invoice Number",
            "column": "invoice_number",
            "pattern": "Invoice\\s*#?\\s*(\\d+)"
        },
        {
            "field_name": "Date",
            "column": "invoice_date",
            "pattern": "Date:\\s*(\\d{1,2}/\\d{1,2}/\\d{2,4})"
        },
        {
            "field_name": "Total Amount",
            "column": "total_amount",
            "pattern": "Total\\s*Amount\\s*\\$?\\s*(\\d+\\.?\\d*)"
        }
    ]
}
Field Descriptions:
  • document_type: The name of the document type (will be created if it doesn't exist)
  • target: The name of the target entity (will be created if it doesn't exist)
  • variant: The name of the variant (will be created if it doesn't exist, defaults to "default")
  • table_name: The database table name for storing extracted data
  • primary_key: The primary key column in the target table
  • classification_regex_pattern: Pattern to identify this document type
  • extraction_regex_patterns: Array of patterns for extracting data fields