Transform Blocks

Overview

Transform blocks are the processing layer of a workflow. They define how data or documents are transformed, categorized, routed, or enriched before being passed on to the next step.

These blocks can perform AI-based classification, conditional routing, or manual intervention when needed.

BlockDescriptionTypical Use Case
Data ExtractionExtracts structured data from a document based on a defined extraction model.When processing uploaded invoices, bank statements, or IDs to extract fields like Name, Amount, or Account Number.
Merge JSONMerges multiple incoming JSON data objects into a single JSON.Useful when combining multiple document outputs into one unified dataset before processing.
Python CodeExecutes custom Python logic using input data as context.When you need to apply custom validation rules, data transformations, or computations.
Categorize with AICategorizes data fields or rows into preset categories using AI.Auto-categorize transactions in bank statements or classify expense types.
Document Type ClassifierAutomatically classifies incoming documents into types.Identifies whether a file is an invoice, bank statement, or purchase order before extraction.
Human in the LoopPauses the workflow for human verification or manual decision.When confidence is low and a human needs to validate or approve extracted data.
RouterAdds IF-ELSE conditional logic and routes data to the right path based on defined criteria.When workflow branches depend on document attributes like credit score or document type.

Configuring Transform Blocks

Below are the available configuration options and example setups for each Transform Block.


Data Extraction Block

Configuration Steps:

  1. Select Document Type: Choose the document type from the dropdown (e.g., US Bank Statement).

  2. Run Test: Click Test Block to extract data and view the JSON output.

  3. Review Output: Switch between JSON and Table view to verify extracted fields.

Example Use Case:
Extract bank details from uploaded statements:

{
  "account_name": "John Doe",
  "bank_name": "Chase Bank",
  "transactions": [...]
}

Merge JSON Block

Configuration Steps:

  1. Review Output: Test the merged output to ensure data structure integrity.

Categorize with AI Block

Configuration Steps:

  1. Describe Categorization Rules: Define the logic for how AI should categorize data (e.g., loan type, borrower risk, or document class).

  2. Import Categories: Optionally, import from an existing table and select relevant columns.

  3. Test: Click Test Block to preview AI-generated categories.

Example Use Case (SMB Lending):

Automatically categorize loan applications based on business type and risk profile:

DescriptionCategory
Credit Score ≥ 750 & Stable RevenueLow Risk
Credit Score between 650–749 & Moderate RevenueMedium Risk
Credit Score < 650 or High NSF CountHigh Risk

Document Type Classifier Block

Configuration Steps:

  1. Select Document Type: Choose the category or list of document types that the model should classify.
  2. Advanced option: Provide instructions to the model on how to classify the documents
  3. Review Classification: Validate predicted results before proceeding.

Example Use Case:

Automatically classify uploaded files into:

  • Bank Statement
  • Invoice
  • Pay Slip

Python Code Block

Configuration Steps:

  1. Define Function Logic: Use the prompt input to automatically generate validation or transformation code, or manually write your own Python function inside the editor.
  2. Review and Edit: Modify the generated code as needed — for example, add conditional checks or data manipulations.
  3. Test Execution: Click Test Block to validate the output with sample input data.

Example Use Case (SMB Lending):

Use Python to validate uploaded loan documents. This example verifies that the uploaded files contain bank statements before sending them for further processing.

def execute(data):
    # Example: Validate if uploaded documents contain 'bank statement'
    valid_docs = []
    for doc in data.get("documents", []):
        if "bank statement" in doc["name"].lower():
            valid_docs.append(doc)
    return {"valid_documents": valid_docs, "total_valid": len(valid_docs)}

 

Human in the Loop Block

Configuration Steps:

  1. Select One or More Users: Choose the users who will review or approve the data output from previous blocks.

  2. Select Assignment Mode: Decide how the task should be assigned — for example,

    • Round Robin Broadcast – Tasks are assigned evenly among selected users in rotation.
      (Useful for balancing workload across a review team.)
    • Sequential Broadcast – Tasks are assigned one user at a time based on priority order.
      (Useful for hierarchical review or escalation flows.)
  3. Advanced Options:

    • Notify Users: Enable to send email notifications to assigned reviewers.
    • Rejection Reason Required: Require reviewers to provide a reason when rejecting a record.
  4. Test Block:
    Click Test Block to simulate the review workflow and ensure assignments work as expected.

Example Use Case (SMB Lending):

After documents are automatically classified and extracted, send records with low confidence scores to a credit analyst for manual review.

Document TypeConfidenceRouted To
Bank Statement0.92Auto-Approved
Pay Slip0.61Human Review (Credit Analyst)
ITR Form0.55Human Review (Credit Analyst)

Router Block

Configuration Steps

  1. Define Routing Logic

    • In the File Filters section, describe the logic for how documents should be routed.
    • Example:
      IF → Credit Score >= 700 AND Average Monthly Balance > $10,000  
      ELSE IF → Credit Score between 650 and 699 AND No NSF (Non-Sufficient Funds) in last 6 months  
      ELSE IF → Credit Score < 650 OR NSF Count > 3 in last 6 months  
      ELSE → Any other case not matching above
      
  2. Generate Routing Conditions

    • Click Generate Routing Conditions to automatically create routes for each logic branch.
    • Each route can lead to a different step (e.g., verification, AI categorization, or human review).
  3. Set Condition Rules: Use logical operators to define rules precisely:

    • ALL → all sub-conditions must be true.
    • ANY → at least one sub-condition must be true.
  4. Else Condition Handles any document that doesn’t meet the specified routing criteria.

    • Default value is Unclassified, but you can rename it.
  5. Test Block: Click Test Block to preview routing results using sample data.

Example Use Case: SMB Loan Application Routing

ConditionRuleRoute
Premium BorrowerCredit Score ≥ 750 AND Balance ≥ ₹5LRoute to Fast Track Loan Flow
Standard BorrowerCredit Score between 650–749Route to Regular Loan Review
High Risk BorrowerCredit Score < 650 OR NSF > 3Route to Human in the Loop Block
ElseNo matchUnclassified