Driving Faster Cash Flow Management with Neo4j

Italy-based startup Bflows is using Neo4j to transform the way businesses process invoices by turning the traditional model of accounts payable and accounts receivable on its head.

The graph database is at the center of the revelation: to see the interconnectedness of everything it takes the power of the graph.

Bflows positions itself as a cash flow management solution. By leveraging powerful algorithms and graph data science, Bflows has created a way for businesses to more effectively manage working capital.


By the numbers: Bflows

  • Invoices: 800 million in the graph
  • Companies in the Network: >50,000
  • Platform: Neo4j Aura Enterprise on AWS, Neo4j Graph Data Science, and Neo4j Bloom

Financial institutions currently view payments between their clients as individual relationships between a debtor and a creditor.

With Neo4j, Bflows collects and reorganizes the same bilateral information into a graph, evaluating the existing interconnections between debtors and creditors, effectively creating an unpaid invoice network. Such a network is, by nature, a growing and dynamic thing.

“It was a graph problem,” said Bflows CTO Rinaldo Bonazzo. Trying to manage it with a relational database quickly starts to take up too much processing power as the network expands. But a relational database is also not as good at establishing relationships and finding connections in data.

“The graph database is very helpful to investigate the network, to analyze the data that’s coming in, to find clusters, to find anomalies,” Bonazzo said.

Building a Payment Network

After creating a network with all the unpaid invoices a company has, Bflows applies machine learning to start processing payments. The rule of the algorithm is to automatically pay as many of the invoices in the network as made possible with the liquidity found. By analyzing all possible payment cycles within the network and locating the nodes that, if paid first, would in turn unlock more payments, Bflows is able to reduce some of the bottlenecks that prevent a seamless flow of payments.

Within the Bflows application, everybody is given a “wallet for the transactions to be processed in and for the payments to be made,” Bonazzo said. After a cycle of payments, Bflows updates its Neo4j database and does an analysis to understand why certain nodes are not paid or why certain nodes are paid more than the others.

“We also do some predictive analysis and some seasonal analysis to pinpoint where we can help a company be more engaged, more active, then get paid faster,” Bonazzo said. “This is what we do with our data.”

When Speed Matters, Neo4j Is Like Jet Fuel

By the second quarter of 2022, Bflows had a network of more than 50,000 companies inside its graph. Bonazzo said his team normally uses NetworkX for analysis, but Neo4j Graph Data Science lets them analyze their graph faster. Neo4j Bloom makes it easy to visualize and share findings.

“Let’s say we have 90 million invoices to process. Normally I need to have three weeks or more to do the analysis. With Neo4j I’m able to have the first rough representation of the first analysis after four days,” Bonazzo said.

The Value of the Neo4j Community

Bflows has big plans for the future, including expanding into markets out of Italy. Along the way, Bonazzo and his team have relied on the strong Neo4j developer community to get the most out of the Neo4j graph database and Neo4j Graph Data Science.

“I can say the Neo4j Community is very good,” Bonazzo said. “I can share some requirements or information with people in the community and get good feedback. They might have a solution we did not think of at all, which could turn out to be the best path to take.”