Fintech · Accounts receivable

Search inside AI cash management

A slow and erring allocation engine is given an index of every document it ought to have read.

The client runs a cash-management product for accounts-receivable teams. Payments arrive, and someone has to work out which invoices they settle. For years people did that by hand, searching across ERP records, remittance emails and invoices, and it took most of their day.

The first automation did the matching for them, but it was slow and often wrong. A typo in a payment reference or an unrelated document in the pile was enough to send money to the wrong invoice, and the review queue filled up with cases the engine should have handled on its own.

We put a search index under the product. Every ERP record, remittance email, invoice and payment is streamed into Elasticsearch as it changes: change data capture on a database replica, through Kafka. The matching engine stopped scanning invoices and started asking the index for candidates, then scoring them.

Documents flow into an Elasticsearch index; the ML engine scores candidates from it; auto allocation matches funds to invoices. ERP data Remittance emails Invoices Payments Elasticsearch every document, full text ML engine scores the candidates Allocation funds matched to the invoice
Fig. 1 Every document is indexed once; the engine asks the index for candidates and allocation matches the funds to the invoice.

Document search came out 30 times faster than before. And that index is now the retrieval layer the AI matching relies on.

More case studies