Skip to main content

Business Rules Engine FAQ

No-code business automation tool

Updated this week

What is Veryfi's Business Rules Engine?

Business Rules Engine is a no-code business automation tool that automates and enhances document post-processing by applying customizable conditions and actions. It allows you to define sophisticated logic to validate, transform, and enrich extracted data, reducing manual effort while enhancing accuracy.
โ€‹

Business Rules Engine is a 2nd Generation of Rules

How does the Business Rules Engine work?

The system operates in three simple steps:

  1. Define "Conditions" (Logic) - Specify what data field(s) to inspect and what to look for

  2. Apply "Actions" (Do) - When conditions are met, trigger associated actions like updating fields, tagging documents, or creating new fields

  3. Deploy and Iterate - Continuously refine and enhance your rules

What actions can the Business Rules Engine perform?

The system can execute two types of actions:

Update Actions:

  • Set document fields to static values

  • Auto-approve, categorize, or group documents

  • Reject or flag documents for manual review

  • Set status fields for campaign compliance

Extract Actions:

  • Use regular expressions to extract custom data

  • Extract key-value pairs not included in standard fields

  • Enrich existing data based on custom requirements

What can I automate with Business Rules?

  • Automatic Validation: Document approval/rejection based on criteria

  • Custom Field Extraction: Extract data not covered by standard 170+ fields

  • Data Enrichment: Clean up or modify extracted values

  • Loyalty Campaign Management: Validate participation requirements

  • Expense Policy Enforcement: Ensure compliance with reimbursement policies

  • Fraud Detection: Automatically flag suspicious documents

When are business rules executed?

All Business Rules are automatically executed during the post-processing stage after data extraction for each submitted document. There's no manual intervention required once rules are set up.

What operators can I use in conditions?

The system supports various operators depending on field types:


โ€‹Date Fields:

  • is empty / is not empty

  • equal to / not equal to

  • less than / less than or equal to

  • greater than / greater than or equal to

  • within a range

  • within n-days after date / within n-days before date

  • within n-days before today

String Fields:

  • equal to / not equal to

  • is empty / is not empty

  • contains / doesn't contain

  • matches regex / doesn't match regex

Numeric Fields:

  • is empty / is not empty

  • equal to / not equal to

  • less than / less than or equal to

  • greater than / greater than or equal to

Array Fields:

  • is empty / is not empty

  • contains / doesn't contain

Boolean Fields:

  • equal to / not equal to

Use Cases & Applications

CPG Loyalty & Expense Management use case:

Problem

Solution

Example

Receipt Validation

CPG Brands face slow, non-scalable, and error-prone results due to manual document validation processes when launching loyalty campaigns.

Business Rules Engine automatically validate each submitted document to verify key criteria such as total amount, date, and vendor eligibility, etc.. This ensures faster, scalable, and accurate processing, eliminating manual errors and enhancing the efficiency of loyalty campaigns

Documents that have valid total amount and date, eligible vendor and submitted within 5 days after purchase are automatically flagged as valid for participating in the loyalty program

Fraud Mitigation

Inability to detect and mitigate fraudulent activities effectively

Veryfi API, combined with a Business Rules Engine and Fraud Detection, automatically flags suspicious documents and either instantly rejects them or routes them for manual review for further validation

Documents that contain handwritten edits, were captured from the LCD screen or have hard fraud signals found are automatically rejected

Rewards Policy Automation

Delays in processing and verifying compliance with all reward policy criteria lead to low participation and engagement in loyalty programs.

Veryfi API, integrated with a Business Rules Engine and Product Inteligence, automatically verifies all reward policy criteria, identifies eligible products on the receipt, and determines whether the participant qualifies for rewards.

Valid receipts that contain products participating in the loyalty program and have minimum total of 50$ are automatically approved for reward

Fintech Use Case:

Problem

Solution

Example

Document Approval & Routing

Manual document approval and routing are time-consuming and error-prone, causing delays and inconsistencies in data. Employees verify each document, ensure it meets criteria, and route it to the appropriate department/individual.

Business Rules Engine automate data validation and approval based on predefined criteria. Once validated, the document can be automatically routed to the appropriate person or department for further action, if needed.

Invoice from certain trusted vendors, submitted within 5 days, have a total amount less than 1000$ and PO Box number are automatically approved. If total amount is greater, the invoice gets flagged as pre-approved and routes to a manager

Fraud Detection for Bill Pay

Fraud in bill payments can arise from unauthorized, duplicate, or fake vendor payments. Manual detection is inefficient and often misses sophisticated fraud schemes.

Business Rules Engine combined with a Fraud Detection, flags suspicious documents and either rejects them or routes them for manual review. It checks for anomalies like unusually high payments, new or unknown vendors, duplicates and etc.

Checks that doesnโ€™t have a valid date and signature, contain handwritten or digital edits and vendor is invalid are automatically flagged as potential fraud and send to a manual review for further actions

Reimbursement Policy Enforcement

Ensuring expense claims comply with company policies is complex and time-consuming. Employees may submit claims that exceed limits or breach policy.

Veryfi API, integrated with a Business Rules Engine cross-checks each submission against company reimbursement policies, validates expense categories, checks receipt authenticity, and ensures policy limits are met.

Submitted expense is within the daily allowance, is not duplicated, matches the claimed amount, but has an ineligible product listed, breaks reimbursement policy and should be rejected.

Bank Checks Validation Framework ideas for the Checks Deposit use case

What Veryfi APIs support Business Rules?

How to Create Your First Business Rule - Step by Step Guide

Step 1: Access the Business Rules Interface

  1. Log into the Veryfi API Portal [ https://app.veryfi.com ]

  2. Navigate to Business Rules

    • Look for the sidebar menu on the left

    • Find "Data Transformation" section

    • Click on "Business Rules"

Step 2: Create Your First Rule

  1. Start New Rule Creation

    • Click "Add Business Rule" or "+ New Rule" button

    • You'll see the rule creation interface

  2. Define Basic Rule Information

    • Rule Name: Give your rule a descriptive name (e.g., "Auto-Approve Small Invoices")

    • Description (optional): Add details about what this rule does

    • Status: Ensure the rule is set to "Active"

Step 3: Set Up Conditions (The "IF" Logic)

  1. Add Your First Condition

    • In the "Set Conditions" section, click "+ Add"

    • Document Field: Select the field you want to check (e.g., "total")

    • Operator: Choose how to compare (e.g., "less than")

    • Value: Enter the comparison value (e.g., "1000")

  2. Add Additional Conditions (Optional)

    • Click "+ Add" to add more conditions

    • Choose "AND" or "OR" to combine conditions

    • Example: Add vendor validation or date checks

Example Condition Setup:

Condition 1: total | less than | 1000 
AND
Condition 2: vendor_name | contains | "Trusted Vendor Inc"
AND
Condition 3: date | within n-days before today | 30

Step 4: Define Actions (The "THEN" Logic)

  1. Add Your First Action

    • In the "Set Actions" section, click "+ Add"

    • Action Type: Choose "update" for setting a static value

    • Document Field: Select field to update (e.g., "tags")

    • Value: Enter what to set (e.g., "APPROVED")

  2. Add More Actions (Optional)

    • Create additional actions like setting status fields

    • Tag documents for easy identification

    • Update custom fields

Example Action Setup:

Action 1: update | tags | APPROVED 
Action 2: update | notes | Auto-approved: Small invoice from trusted vendor

Step 5: Save and Test Your Rule

  1. Review Your Rule

    • Double-check all conditions and actions

    • Ensure field names and values are correct

    • Verify the logic makes sense for your use case

  2. Save the Rule

    • Click "Save" or "Create Rule"

    • Your rule is now active and will process new documents

  3. Test with Sample Documents

    • Submit a test document that should match your conditions

    • Check the API Portal Inbox to see if the rule worked

    • Look for your tags/updates in the processed document

๐Ÿ“Œ Always a good idea to test Validation logic or other use cases outside your production environment. Please request a Sandbox profile by contacting support@veryfi.com.

Step 6: Monitor and Iterate

  1. Check Results

    • Go to API Portal Inbox to review processed documents

    • Look for documents with your rule's tags or actions applied

    • Identify any documents that should have matched but didn't

    • Tip: for a no-code approach - use Export option to review the Rules Performance

  2. Refine Your Rule

    • Edit the rule if needed to handle edge cases

    • Add more conditions or adjust operators

    • Update actions based on real-world results

Pro tip: When testing is done, feel free to export Rules from your Dev Profile to Production using Rules Export/Import option

โš ๏ธ Important Note About Extract Actions

Extract Actions offer advanced capabilities for custom data extraction:

  • Use regular expressions to extract custom data in a custom field

  • Use regular expressions to extract data and overwrite the extracted field value

  • Extract key-value pairs not included in standard fields

  • Enrich existing data based on custom requirements

Please Exercise Caution with Extract Actions

We strongly recommend utilizing our custom fields feature for highly unique and custom use cases only. This functionality proves invaluable when dealing with specific data extraction needs that may not fall under our supported cases and fields.

When to Contact Veryfi Instead

In instances where the model extraction results for supported cases and fields may not be consistent or stable, we encourage you to consider reporting to the Veryfi Data Engineering Team rather than creating Extract Actions to work around the issue.

Before creating complex Extract Actions, ask yourself:

  • Is this data already covered by Veryfi's 170+ standard fields?

  • Are you trying to fix the inconsistent extraction of supported data?

  • Could this be solved by improving the base model instead?

If you encounter persistent issues with standard field extraction, our dedicated data engineering team is here to assist you. Feel free to reach out to us via email at support@veryfi.com. Remember: Extract Actions should be your last resort for truly unique data points, not a workaround for inconsistent base extraction.

Quick Start Example: Simple Invoice Auto-Approval

Here's a complete example for your first rule:

Rule Name: "Auto-Approve Small Trusted Vendor Invoices"

Conditions:

  • total less than 500

  • vendor_name contains "ABC Supply"

  • date within 30 days before today

Actions:

  • Update tags to "AUTO_APPROVED"

  • Update notes to "Automatically approved - small invoice"

Result: Any invoice under $500 from "ABC Supply" submitted within 30 days will be automatically tagged as approved.
โ€‹

Pro Tips for Your First Rule

  • Start Simple: Begin with basic conditions and expand gradually

  • Use Descriptive Names: Make rule names and tags easy to understand

  • Test Thoroughly: Try various document types to ensure rules work correctly

  • Tag Everything: Use consistent tagging for easy document identification

  • Monitor Daily: Check processed documents regularly during the first week

Common First-Rule Mistakes to Avoid

โŒ Too Complex: Don't try to handle every scenario in your first rule

โŒ Field Access: Double-check that field you need is enabled for your account

โŒ Missing Edge Cases: Consider what happens with partial matches

โŒ No Testing: Always test with real documents before going live

โœ… Keep It Simple: Start with 2-3 conditions maximum

โœ… Clear Actions: Make sure your actions provide clear identification

โœ… Document Everything: Use the description field to explain the rule's purpose

How do I request access to the Business Rules Engine?

If Business Rules are not enabled for your account, please request access by contacting support@veryfi.com.

Did this answer your question?