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.

OCR file processing flow

  1. Send OCR giro claim (via payment schedule) for recurring AvtaleGiro payments.
  2. Automatically fetch claim response (CSV file).
  3. Poll MPS for incoming OCR giro files.
  4. Parse CSV file: OCR giro mandates to inbound reports, and OCR giro payments to transaction sets.
  5. Match transactions to installments and inbound reports to mandates.
  6. 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 CodeFinDock Action
2.1NO_KID_IN_AGREEMENTSet mandate to Rejected
2.2MANDATE_NOT_FOUNDSet installment to Rejected and add code to Last Status Reason field
2.3INVALID_KIDSet installment to Rejected and add code to Last Status Reason field
2.4NOTIFICATION_ALL_INVALID_TRANSACTION_TYPESet installment to Rejected and add code to Last Status Reason field
2.5RECORD49_SIZE_EXCEEDEDSet installment to Rejected and add code to Last Status Reason field
2.6NOTIFICATION_30_DUEDATE_IS_BEFORE_RECEIVED_DATESet installment to Rejected and add code to Last Status Reason field
2.7NOTIFICATION_30_DUEDATE_IS_SAME_AS_RECEIVED_DATESet installment to Rejected and add code to Last Status Reason field
2.8DUE_DATE_IS_12MONTHS_AFTER_RECEIVED_DATESet installment to Rejected and add code to Last Status Reason field
2.10INVALID_DUEDATE_FOR_PAYMENT_DUE_TRANSACTION_TYPE_02Set installment to Rejected and add code to Last Status Reason field
2.11INVALID_DUEDATE_FOR_PAYMENT_DUE_TRANSACTION_TYPE_21Set installment to Rejected and add code to Last Status Reason field
2.12TRANSACTION_TYPE_NOT_MATCHES_WITH_RECORD31_TRANSACTION_TYPESet installment to Rejected and add code to Last Status Reason field
2.13TRANSACTION_NUMBER_MISMATCH_OR_30_31_MISSINGSet installment to Rejected and add code to Last Status Reason field
2.14INVALID_LINE_COLUMN_RECORD49Set 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 LineOCR FieldObjectFieldValue
n/an/aInbound ReportSourceNordic Payments
n/an/aInbound ReportReport TypeOCR Norway
n/an/aInbound ReportStatusNew
n/an/aInbound ReportRaw MessageRaw value from AvtaleGiro mandate record line
AvtaleGiro mandate recordFIELD 7 - KIDInbound ReportMandateMandate matched based on Mandate Id
n/an/aInbound ReportPayment ProfileFetched from mandate if match found
n/an/aInbound ReportFile
n/an/aInbound reportChecksummd5() 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 LineOCR FieldObjectFieldValue
Start record for assignmentFIELD 7 - ASSIGNMENT ACCOUNTTransaction SetIbanIBAN
Start record for assignmentFIELD 6 - ASSIGNMENT NUMBERTransaction SetElectronic Sequence NumberAssignment sequence number
n/an/aTransaction SetFilenameFile name
n/an/aTransaction SetFilesizeFile size
n/an/aTransaction SetFile Contents HashFile hash
End record for assignmentFIELD 9 - EARLIEST DATETransaction SetFrom DateDate
End record for assignmentFIELD 10 - LATEST DATETransaction SetTo DateDate
n/an/aTransactionRaw XML EntryAmount item lines combined
n/an/aTransactionStatusNew
Amount Item 3FIELD 6 – FREE TEXT MESSAGETransactionPayment ReferenceOnly when available, otherwise KID
n/an/aTransactionCurrencyNOK
Amount Item 1FIELD 12 - AMOUNTTransactionAmountAmount
Amount Item 1FIELD 12 - AMOUNTTransactionActual AmountIf Transaction Type is debit set to amount *-1
Amount Item 2FIELD 9 - BANK DATETransactionDateDate
Amount Item 1FIELD 6 - DATETransactionValue DateDate
Amount Item 1FIELD 13 - KIDTransactionEnd To End IDEnd-to-end Id
Amount Item 2FIELD 10 - DEBIT ACCOUNTTransactionIBANIBAN
Amount Item 1FIELD 3 - TRANSACTION TYPETransactionTypeIf 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.

Was this page helpful?