Skip to content

Working with Distribution Rules

Distribution rules define the conditions that must be met for a document to be routed by a Document Distributor. This guide explains the rule types and how to configure them.

Rule evaluation

Core principle

  • OR logic: As soon as one rule of a distributor matches, the document is distributed
  • Rules are evaluated in ascending sequence number
  • If no rule matches, the next distributor is checked

Rule components

Each distribution rule consists of:

Field Description Required
Rule Method Determines the data source to evaluate Yes
Captured Data Field Field name from Smart Processing (only for "Captured Document Data") Conditional
Evaluation Method How the input pattern is compared Yes
Input Pattern The value or regex pattern used for matching Yes
Sequence No. Execution order of the rule Yes

Rule methods

1. Document Classification

Checks the document type from Smart Processing.

Example:

Rule Method: Document Classification
Evaluation Method: Contains
Input Pattern: Invoice

2. Captured Document Data

Checks extracted fields such as vendor or amount.

Examples:

Specific vendor:

Captured Data Field: VendorName
Evaluation Method: Equals
Input Pattern: ACME Corporation

Amount over 10,000:

Captured Data Field: TotalAmount
Evaluation Method: Regex Pattern
Input Pattern: ^[1-9][0-9]{4,}$

3. Email Address

Checks the sender email address.

Example:

Rule Method: Email Address
Evaluation Method: Ends With
Input Pattern: @acme.com

4. Email Subject

Checks the email subject.

Example:

Rule Method: Email Subject
Evaluation Method: Contains
Input Pattern: [URGENT]

5. Filename

Checks the document file name.

Example:

Rule Method: Filename
Evaluation Method: Starts With
Input Pattern: INV_

6. Barcode

Checks barcode values in the document.

Example:

Rule Method: Barcode
Evaluation Method: Starts With
Input Pattern: LOC-NYC

Evaluation methods

Equals: Exact match (case-sensitive)

Contains: Substring search

Starts With / Ends With: Prefix/Suffix check

Regex Pattern: Complex patterns with regular expressions

Regex examples:

Amounts 1,000-9,999: ^[1-9][0-9]{3}$
Email addresses: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Case-insensitive: (?i)invoice

Rule sequencing

Setting sequence numbers

  • Use steps of 10 (10, 20, 30...) for future additions
  • Lower numbers are evaluated first
  • Order affects performance

Performance tip: Suggested order for faster processing: 1. Filename 2. Email Address / Email Subject 3. Barcode 4. Document Classification 5. Captured Document Data

See also