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.
External APISends extracted data to external systems and uses API responses to enrich or transform workflow outputs.Validate vendors, perform compliance checks, enrich data, or drive workflow decisions using third-party or internal APIs.
Export BlockGenerates export-ready structured data from all documents with configurable format and preview.Combine multi-document data into a single downloadable output for reporting or downstream system ingestion.
Case Update BlockUpdates case fields, document fields, and case metadata based on configured mappings during workflow execution.Sync transformed values back into cases after enrichment, validation, or harmonization.
Validation BlockDefines custom validations using prompts and displays results in the Case Overview Validation tab.Enforce mandatory fields, cross-field checks, and business rules across documents.
Summarise with AIGenerates a high-level AI summary of selected blocks or workflow parts.Quickly understand complex workflows or share simplified workflow context with teammates.
Split with AISplits binder documents into respective document types using prompts and custom split logic.Automatically separate invoices, packing lists, and shipping docs from multi-file binders.
LLM BlockQueries large language models to generate structured outputs and custom AI-driven logic.Create derived fields, apply reasoning, classify cases, or generate insights across documents.
Parser BlockConverts raw text or API responses into structured data for downstream workflow logic.Parse External API responses or unstructured text into fields usable for routing, validation, or case updates.

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


Split with AI

Split with AI allows you to automatically split binder documents containing multiple attached file types into their respective document types using an input prompt. You can also define custom split logic for each document type to control how files are separated during workflow execution.

Configuration Steps

  1. Navigate to Workflow → Transform Blocks.
  • Select Split with AI.
  • Enter an Input Prompt describing how the binder document should be split.
  • Define Split Logic for each document type (for example, Invoice, Packing List, Bill of Lading).
  • Review the configuration to ensure each document type is mapped correctly.
  • Save the setup and apply the block to your workflow.

Example Use Case

Automatically split multi-document binders

For binder files containing multiple document types in a single upload, use Split with AI to:

  • Separate invoices, packing lists, and shipping documents automatically
  • Apply custom split rules for each document type
  • Route each resulting document to the correct extraction or validation flow
  • Eliminate manual document separation

This enables fully automated handling of multi-document uploads while maintaining accuracy and structure.


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)

External API Block

External API Block allows you to send extracted data to external systems and use the API response to enrich or transform your workflow output.

Configuration steps

  • Navigate to Workflow → Transform Blocks.
  • Click Add External API.
  • Configure the API request:
    • Select Request Method (GET / POST / PUT).
    • Enter the Endpoint URL.
    • Add required Headers (Authorization, Content-Type, etc.).
    • Define the Request Body by mapping extracted fields or using the full JSON payload.
  • Configure Output Mapping:
    • Map response fields to existing blocks or new blocks further down the workflow.
  • Save the configuration and apply the block to your workflow.

Note: You can also add secret keys or variables inside docsumo reuse in this block

Example Use Case

Send extracted invoice or case data (such as Vendor Name, GSTIN, Amount) to an external validation or enrichment API. Use the response to:

  • Validate vendor or customer details
  • Perform compliance or fraud checks
  • Enrich extracted fields with additional metadata
  • Update workflow outputs with approval status or remarks

This enables real-time integrations directly within Docsumo workflows, eliminating the need for external post-processing.


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

Validation Block

Validation Block allows you to define custom validations for your workflow automation using an input prompt. These validations help verify extracted and transformed data during workflow execution, ensuring accuracy and completeness.

Once configured, all validation rules are executed automatically, and results are visible in the Case Overview → Validation tab.

Configuration Steps

  • Select Validation Block.
  • Enter an Input Prompt describing the validations you want to apply (for example, required fields, value ranges, cross-field checks, or business rules).
  • Configure any additional parameters as needed for your validation logic.
  • Save the configuration and apply the block to your workflow.

Example Use Case

Use Validation Block to:

  • Ensure mandatory fields like Invoice Number or Total Amount are present
  • Validate amounts against line-item totals
  • Check date formats or value ranges
  • Apply custom business rules across documents in a case

After workflow execution, users can review validation results directly in the Case Overview → Validation tab, making it easy to identify issues and take corrective action.


Case Update Block

Case Update Block allows you to update case fields, document fields, and case metadata fields based on the configuration defined in the block. During workflow execution, selected fields are automatically updated with values from newly generated or transformed fields.

Configuration Steps

  • Select Case Update Block.
  • Choose the fields you want to update:
    • Case Fields
    • Document Fields
    • Case Metadata Fields
  • Map each selected field to the corresponding new field value generated earlier in the workflow.
  • Review the mappings to ensure the correct fields will be overwritten or updated.
  • Save the configuration and apply the block to your workflow.

Example Use Case

After applying blocks like External API or Export, use the Case Update Block to:

  • Update case-level fields such as Status, Priority, or Assigned Values
  • Update document-level fields with enriched or corrected extraction results
  • Store derived values in case metadata for reporting or routing

This ensures the final case reflects the latest transformed data without requiring manual updates.


Summarise with AI

Summarise with AI helps you generate a high-level overview of your workflow by summarising individual blocks and/or selected parts of the workflow. This makes it easier to understand what each workflow is doing without manually reviewing every configuration.

Configuration Steps

  • Select Summarise with AI.
  • Choose the blocks or workflow sections you want to summarise.
  • Select the preview format of the block output
  • Generate the AI summary to get a concise overview of the selected workflow parts.

LLM Block

LLM Block allows you to query and generate structured outputs tailored to your cases.

Configuration Steps

  1. Select LLM Block.
  2. Enter your Prompt defining what you want the model to generate or infer.
  3. Map required input fields from your workflow output.
  4. Define the expected Structured Output Schema to generate new fields.
  5. Review the configuration and save the block.
  6. Apply the block to your workflow.

Parser Block

Parser Block helps convert raw text or API responses into structured data. This makes it easier to map outputs to fields and use them in downstream workflow logic.

Configuration Steps

  1. Select Parser Block.
  2. Define parsing rules or structure to extract required values.
  3. Save the configuration and apply the block to your workflow.

Export Block

Export Block allows you to generate export-ready structured data from all documents in a workflow. You can define how the final output should look using a prompt, choose the export format, preview the result, and download it directly.

Configuration Steps

  • Select Export Block.
  • Enter a Prompt describing how you want the exported data to be structured (for example, combined fields, grouped documents, flattened JSON, etc.).
  • Select the Export Format (such as JSON, CSV, or other supported formats).
  • Use Preview to review the generated export output.
  • Once satisfied, Save the configuration and apply the block to your workflow.
  • After workflow execution, download the export-ready file.

Example Use Case

For a case containing multiple documents (such as Invoice, Packing List, and Bill of Lading), use Export Block to:

  • Combine data from all documents into a single structured output
  • Format fields based on downstream system requirements
  • Preview the final structure before exporting
  • Download clean, standardized data for reporting or system ingestion

This helps teams quickly generate ready-to-use exports without manual formatting or external processing.