WorkflowsFunctionsSystem Functions
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
| Parameter | Type | Description |
|---|---|---|
fileId | string (UUID) | UUID of the uploaded file to parse (must exist in file storage) |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
bankName | string | Optional name of the bank for statement identification |
parserName | string | Optional specific parser to use |
parserPatternId | string (UUID) | Optional UUID of a parser pattern configuration to use |
usePatternParser | boolean | Optional 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
| Field | Type | Description |
|---|---|---|
statementGroup | object | Group information about the parsed statement |
statementAccounts | array | Account information from the parsed statement |
statementServices | array | Service 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
- File Type Detection: Automatically detects file type (PDF, XML, EDI, Excel)
- Parser Selection:
- If
parserNameprovided: Uses specified parser - If
parserPatternIdorusePatternParser=true: Uses pattern-based parser - If
bankNameprovided: Attempts to find bank-specific parser or pattern - Otherwise: Tries all available parsers until one succeeds
- If
- Parsing: Extracts statement data based on file format
- Data Enrichment: Resolves bank metadata, validates account numbers, checks for duplicates
- 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:
- Explicit Parser: If
parserNameis provided, uses that parser - Pattern Parser: If
parserPatternIdorusePatternParser=true, uses pattern-based parser - Bank-Specific: If
bankNameis provided, searches for bank-specific parser or pattern - Fallback: Tries all available parsers sequentially until one succeeds
- Generic Parser: Falls back to generic PDF parser if all specific parsers fail
Related Functions
- Statement Processor - Process parsed statements by mapping categories, forex rates, and other data
- Parse Bank Statement - Similar function with additional currency and country parameters
- Parse CSV/Excel File - Parse CSV and Excel files for general data
- ECR Analysis - Analyze ECR data from parsed statements