Overview
Matcher lets you four matching patterns:
| Pattern | Description | Example |
|---|---|---|
| 1:1 | One source to one target | Single invoice payment |
| 1:N | One source to many targets | Bulk payment covering invoices |
| N:1 | Many sources to one target | Deposits consolidated at bank |
| N:M | Many sources to many targets | Complex netting |
Enabling complex matching
Context configuration
Enable split and aggregate matching at the context level:cURL
Response
Matching settings
| Setting | Type | Default | Description |
|---|---|---|---|
allow_split | Boolean | false | Enable 1:N matching |
allow_aggregate | Boolean | false | Enable N:1 matching |
allow_many_to_many | Boolean | false | Enable N:M matching |
max_transactions_per_group | Integer | 10 | Maximum transactions in a group |
require_full_allocation | Boolean | true | Require 100% allocation |
partial_match_threshold | Decimal | 0.95 | Minimum allocation for partial (95%) |
1:N split matching
One source transaction matches multiple target transactions.
Common use cases
- Bulk payment: Single wire covering multiple invoices
- Payroll: One bank debit for multiple salary payments
- Settlement: One gateway payout for multiple orders
Example: bulk invoice payment
Source (Bank Statement):| ID | Amount | Reference |
|---|---|---|
| bank_001 | $15,000.00 | BULK-PAY-2024-001 |
| ID | Amount | Invoice |
|---|---|---|
| inv_001 | $5,000.00 | INV-2024-001 |
| inv_002 | $7,500.00 | INV-2024-002 |
| inv_003 | $2,500.00 | INV-2024-003 |
API: create split match
cURL
Response
N:1 aggregate matching
Multiple source transactions match one target transaction.
Common use cases
- Bank deposits: Multiple checks deposited as one credit
- Card settlements: Daily batch of transactions as one deposit
- Cash consolidation: Multiple register receipts to one deposit
Example: consolidated deposit
Sources (Point of Sale):| ID | Amount | Register |
|---|---|---|
| pos_001 | $1,250.00 | REG-01 |
| pos_002 | $980.00 | REG-02 |
| pos_003 | $1,770.00 | REG-03 |
| ID | Amount | Reference |
|---|---|---|
| bank_002 | $4,000.00 | DEPOSIT-20240120 |
API: create aggregate match
cURL
Response
N:M many-to-many matching
Multiple source transactions match multiple target transactions. This is the most complex pattern and requires the graph solver.
Common use cases
- Intercompany netting: Multiple invoices netted against multiple payments
- Trade settlements: Complex clearing with partial fills
- Revenue recognition: Multiple deliveries against multiple advances
Example: intercompany netting
Sources (Company A Payables):| ID | Amount | Reference |
|---|---|---|
| pay_001 | $10,000.00 | IC-PAY-001 |
| pay_002 | $8,000.00 | IC-PAY-002 |
| ID | Amount | Reference |
|---|---|---|
| rec_001 | $12,000.00 | IC-REC-001 |
| rec_002 | $6,000.00 | IC-REC-002 |
API: create N:M match
Allocation tracking
Matcher tracks how much of each transaction has been allocated to matches.
Transaction allocation status
| Status | Description |
|---|---|
UNALLOCATED | No allocation (0%) |
PARTIALLY_ALLOCATED | Some allocation (1-99%) |
FULLY_ALLOCATED | Complete allocation (100%) |
View transaction allocation
Response
Partial allocation example
Transaction with remaining unallocated amount:Partial matches
By default, Matcher requires full allocation. Enable partial matching for scenarios where complete matching isn’t possible.
Enable partial matching
Partial match behaviors
| Behavior | Description |
|---|---|
propose_with_residual | Create match, track residual |
create_exception | Create exception for unmatched portion |
hold_for_review | Hold until additional transactions arrive |
Partial match response
Graph solver
For complex N:M scenarios, Matcher uses a bipartite graph solver to find optimal matches.
How it works
- Build Graph: Create bipartite graph with sources and targets as nodes
- Edge Weights: Calculate match confidence as edge weights
- Solve: Find maximum weighted matching
- Allocate: Distribute amounts across matched pairs
Graph solver configuration
Solver algorithms
| Algorithm | Best For | Complexity |
|---|---|---|
hungarian | Small graphs (<100 nodes) | O(n³) |
auction | Medium graphs (<1000 nodes) | O(n² log n) |
greedy | Large graphs (>1000 nodes) | O(n log n) |
Run graph solver
cURL
Response
Tolerance rules
Configure how tolerance applies to split and aggregate matches.
Tolerance modes
| Mode | Description | Use Case |
|---|---|---|
residual | Apply to final unmatched amount | Default, most common |
per_item | Apply to each transaction | Strict matching |
total | Apply to sum of all transactions | Flexible matching |
Configure tolerance mode
Tolerance examples
Residual Mode (Default):- Source: $10,000.00
- Targets: $9,980.00 total
- Residual: $20.00 (0.2%)
- Tolerance: 1% = $100.00
- Result: Match (residual within tolerance)
- Source: $10,000.00
- Target 1: $5,010.00 (0.2% variance)
- Target 2: $4,980.00 (0.4% variance)
- Each within 1% tolerance
- Result: Match (all items within tolerance)
Auto-discovery
Matcher can automatically discover split and aggregate patterns.
Enable auto-discovery
Discovery heuristics
| Heuristic | Description |
|---|---|
| Amount summing | Find combinations that sum to target |
| Reference patterns | Match based on common references |
| Temporal clustering | Group transactions by date proximity |
| Counterparty grouping | Group by same counterparty |
View discovered groups
Response
Reporting
Group match summary
Best practices
Start with 1:N and N:1 before N:M
Start with 1:N and N:1 before N:M
Many-to-many matching is complex. Start with simpler patterns and enable N:M only when necessary.
Set reasonable group size limits
Set reasonable group size limits
Large groups are harder to verify. Limit group size based on your audit requirements.
Use auto-discovery with review
Use auto-discovery with review
Enable auto-discovery to find patterns, but require human review before confirming complex matches.
Monitor residuals
Monitor residuals
Track residual amounts over time. Growing residuals may indicate systematic matching issues.
Document allocation rules
Document allocation rules
When multiple allocation strategies are possible, document why specific allocations were chosen.
Test graph solver with sample data
Test graph solver with sample data
Before enabling graph solver in production, test with representative data to verify results.

