Processing OCR files
The OCR bank file (also known as OCR giro) is a standard file used in Norway to report mandate and payment information.
A single file is called a transmission. The file structure is flat, so each line in the file is a complete entry or “order.” There are specifications for mandates and for payments, however, these can come in a single OCR file.
OCR giro files are used to reconcile AvtaleGiro payments initiated through FinDock. They also capture several other payment methods indicated in the TRANSACTION TYPE field. These include:
- Giro debited account (10)
- Standing orders (11)
- Direct remittance (12)
- Business Terminal Giro (13)
- Counter giro (14)
- AvtaleGiro (15)
- Telegiro (16)
- Giro - paid in cash (17)
- Terminal and internet-payments:
- Reversing with KID (18)
- Purchase with KID (19)
- Reversing with free text (20)
- Purchase with free text (21)
Payments made with any of these methods are captured by FinDock through the automatic OCR reconciliation process.
OCR reconciliation process
FinDock automatically polls the MPS file transfer service for new OCR files. When a file is received, it is first parsed by ProcessingHub. Mandate entries are captured as inbound reports, and payments are captured as transaction sets and transactions. The overall flow is illustrated below.
- Send OCR giro claim (via payment schedule) for recurring AvtaleGiro payments.
- Automatically fetch claim response (CSV file).
- Poll MPS for incoming OCR giro files.
- Parse CSV file: OCR giro mandates to inbound reports, and OCR giro payments to transaction sets.
- Match transactions to installments and inbound reports to mandates.
- Further process and enrich through Guided Matching.
Targets for OCR processing
For each originating bank account of your OCR files, you need to configure a target. The target includes the SFTP server account from where FinDock fetches the OCR files for the originating bank account.
Follow the same procedure as with AvtaleGiro to set up a target for OCR processing.
OCR payment claim L00202
When an OCR file is uploaded to the MPS service, an L00202 payment claim report is returned which uses a comma-separated value (CSV) format.
If the payment claim report indicates an error on file level, FinDock automatically sets all included installments to Rejected. Errors on individual payment/mandate level are parsed into inbound reports and the impacted installments are updated as indicated in the table below.
Serial Nr. | Error Code | FinDock Action |
---|---|---|
2.1 | NO_KID_IN_AGREEMENT | Set mandate to Rejected |
2.2 | MANDATE_NOT_FOUND | Set installment to Rejected and add code to Last Status Reason field |
2.3 | INVALID_KID | Set installment to Rejected and add code to Last Status Reason field |
2.4 | NOTIFICATION_ALL_INVALID_TRANSACTION_TYPE | Set installment to Rejected and add code to Last Status Reason field |
2.5 | RECORD49_SIZE_EXCEEDED | Set installment to Rejected and add code to Last Status Reason field |
2.6 | NOTIFICATION_30_DUEDATE_IS_BEFORE_RECEIVED_DATE | Set installment to Rejected and add code to Last Status Reason field |
2.7 | NOTIFICATION_30_DUEDATE_IS_SAME_AS_RECEIVED_DATE | Set installment to Rejected and add code to Last Status Reason field |
2.8 | DUE_DATE_IS_12MONTHS_AFTER_RECEIVED_DATE | Set installment to Rejected and add code to Last Status Reason field |
2.10 | INVALID_DUEDATE_FOR_PAYMENT_DUE_TRANSACTION_TYPE_02 | Set installment to Rejected and add code to Last Status Reason field |
2.11 | INVALID_DUEDATE_FOR_PAYMENT_DUE_TRANSACTION_TYPE_21 | Set installment to Rejected and add code to Last Status Reason field |
2.12 | TRANSACTION_TYPE_NOT_MATCHES_WITH_RECORD31_TRANSACTION_TYPE | Set installment to Rejected and add code to Last Status Reason field |
2.13 | TRANSACTION_NUMBER_MISMATCH_OR_30_31_MISSING | Set installment to Rejected and add code to Last Status Reason field |
2.14 | INVALID_LINE_COLUMN_RECORD49 | Set installment to Rejected and add code to Last Status Reason field |
OCR field mapping for mandates
The following table outlines the mapping between OCR fields for mandates (agreements) and fields on Inbound Report.
OCR Line | OCR Field | Object | Field | Value |
---|---|---|---|---|
n/a | n/a | Inbound Report | Source | Nordic Payments |
n/a | n/a | Inbound Report | Report Type | OCR Norway |
n/a | n/a | Inbound Report | Status | New |
n/a | n/a | Inbound Report | Raw Message | Raw value from AvtaleGiro mandate record line |
AvtaleGiro mandate record | FIELD 7 - KID | Inbound Report | Mandate | Mandate matched based on Mandate Id |
n/a | n/a | Inbound Report | Payment Profile | Fetched from mandate if match found |
n/a | n/a | Inbound Report | File | |
n/a | n/a | Inbound report | Checksum | md5() of Raw Message |
OCR field mapping for payments
The following table outlines the mapping between OCR fields for payments and fields on Transaction Set and Transaction.
OCR Line | OCR Field | Object | Field | Value |
---|---|---|---|---|
Start record for assignment | FIELD 7 - ASSIGNMENT ACCOUNT | Transaction Set | Iban | IBAN |
Start record for assignment | FIELD 6 - ASSIGNMENT NUMBER | Transaction Set | Electronic Sequence Number | Assignment sequence number |
n/a | n/a | Transaction Set | Filename | File name |
n/a | n/a | Transaction Set | Filesize | File size |
n/a | n/a | Transaction Set | File Contents Hash | File hash |
End record for assignment | FIELD 9 - EARLIEST DATE | Transaction Set | From Date | Date |
End record for assignment | FIELD 10 - LATEST DATE | Transaction Set | To Date | Date |
n/a | n/a | Transaction | Raw XML Entry | Amount item lines combined |
n/a | n/a | Transaction | Status | New |
Amount Item 3 | FIELD 6 – FREE TEXT MESSAGE | Transaction | Payment Reference | Only when available, otherwise KID |
n/a | n/a | Transaction | Currency | NOK |
Amount Item 1 | FIELD 12 - AMOUNT | Transaction | Amount | Amount |
Amount Item 1 | FIELD 12 - AMOUNT | Transaction | Actual Amount | If Transaction Type is debit set to amount *-1 |
Amount Item 2 | FIELD 9 - BANK DATE | Transaction | Date | Date |
Amount Item 1 | FIELD 6 - DATE | Transaction | Value Date | Date |
Amount Item 1 | FIELD 13 - KID | Transaction | End To End ID | End-to-end Id |
Amount Item 2 | FIELD 10 - DEBIT ACCOUNT | Transaction | IBAN | IBAN |
Amount Item 1 | FIELD 3 - TRANSACTION TYPE | Transaction | Type | If 18, 20, then type is Debit |
Extending OCR processing with Guided Matching
Out of the box, FinDock extracts the information from OCR files required to update payment records in Salesforce. However, the files may contain more information that you would also like to use.
Using Guided Matching, you can do just about anything you want with the information in the OCR. For example, you could parse the Raw XML Entry field and extract unique information for your own purposes. You can also create rules that extend the logic of the already parsed data on Transaction Set and Transaction records.