Monetize360

Statement Parser

Parse bank statements from various formats including PDF, XML, EDI and Excel

Statement Parser

Parse bank statements from various file formats including PDF, XML, EDI, and Excel. The function automatically detects file type, selects the appropriate parser, and extracts account information, transactions, and fee details.

Technical Name: ParseStatementFunc

Properties

  • Execution Mode: SYNC
  • Type: NATIVE
  • Category: System Functions
  • Function ID: ef13a8f3-8388-47b1-9354-6be62f241964

Input Schema

Required Parameters

ParameterTypeDescription
fileIdstring (UUID)UUID of the uploaded file to parse (must exist in file storage)

Optional Parameters

ParameterTypeDescription
bankNamestringOptional name of the bank for statement identification
parserNamestringOptional specific parser to use
parserPatternIdstring (UUID)Optional UUID of a parser pattern configuration to use
usePatternParserbooleanOptional flag to force use of pattern-based parser

[Image placeholder: StatementParser function configuration panel]

Input Example

Basic Parsing

{
  "fileId": "a7b9c4d2-3e5f-4a1b-9c8d-7e6f5a4b3c2d"
}

With Bank Name

{
  "fileId": "a7b9c4d2-3e5f-4a1b-9c8d-7e6f5a4b3c2d",
  "bankName": "Chase Bank"
}

Using Specific Parser

{
  "fileId": "a7b9c4d2-3e5f-4a1b-9c8d-7e6f5a4b3c2d",
  "parserName": "chaseBankParser"
}

Using Pattern-Based Parser

{
  "fileId": "a7b9c4d2-3e5f-4a1b-9c8d-7e6f5a4b3c2d",
  "parserPatternId": "pattern-uuid-here",
  "usePatternParser": true
}

Supported File Types

  • PDF (application/pdf) - Bank statement PDFs
  • XML (application/xml, text/xml) - CAMT.053, ISO 20022 formats
  • EDI (.edi) - Electronic Data Interchange formats
  • Excel (.xlsx, .xls) - Spreadsheet-based statements

Output Schema

FieldTypeDescription
statementGroupobjectGroup information about the parsed statement
statementAccountsarrayAccount information from the parsed statement
statementServicesarrayService information from the parsed statement

The output structure contains:

  • Statement Metadata: Bank name, account numbers, statement period, currency
  • Account Balances: Opening/closing balances, ledger balances
  • Activity Details: Transactions, service charges, fees

Output Example

{
  "statementGroup": {
    "bankName": "Chase Bank",
    "fileName": "statement_2024_01.pdf",
    "statementFrom": "2024-01-01",
    "statementTo": "2024-01-31"
  },
  "statementAccounts": [
    {
      "accountNumber": "1234567890",
      "accountType": "DETAIL",
      "openingBalance": 10000.00,
      "closingBalance": 9500.00,
      "currency": "USD"
    }
  ],
  "statementServices": [
    {
      "serviceDescription": "Wire Transfer",
      "unitPrice": 25.00,
      "volume": 5,
      "totalCharges": 125.00,
      "accountNumber": "1234567890"
    }
  ]
}

[Image placeholder: Parsed statement visualization]

How It Works

  1. File Type Detection: Automatically detects file type (PDF, XML, EDI, Excel)
  2. Parser Selection:
    • If parserName provided: Uses specified parser
    • If parserPatternId or usePatternParser=true: Uses pattern-based parser
    • If bankName provided: Attempts to find bank-specific parser or pattern
    • Otherwise: Tries all available parsers until one succeeds
  3. Parsing: Extracts statement data based on file format
  4. Data Enrichment: Resolves bank metadata, validates account numbers, checks for duplicates
  5. Output: Returns structured statement data

Use Cases

Parse Uploaded Statement

Parse a bank statement uploaded by a user:

{
  "fileId": "{{context.uploadedFileId}}",
  "bankName": "Wells Fargo"
}

Process Multiple Statements

Parse multiple statements in a workflow:

Start → UploadFile → StatementParser → ProcessFees → End

[Image placeholder: Workflow example]

Use Pattern-Based Parsing

Parse statements using a custom parser pattern:

{
  "fileId": "file-uuid",
  "parserPatternId": "custom-pattern-uuid",
  "usePatternParser": true
}

Parser Selection Strategy

The function uses the following strategy to select a parser:

  1. Explicit Parser: If parserName is provided, uses that parser
  2. Pattern Parser: If parserPatternId or usePatternParser=true, uses pattern-based parser
  3. Bank-Specific: If bankName is provided, searches for bank-specific parser or pattern
  4. Fallback: Tries all available parsers sequentially until one succeeds
  5. Generic Parser: Falls back to generic PDF parser if all specific parsers fail