How to do AI Cash Flow Forecasting · Part I

The Foundation

The groundwork for AI forecasting: the business case in euros, 24 months of clean history, bank connectivity, transaction categorisation and ERP data.

Introduction

Every treasury team wants AI cash flow forecasting. Almost nobody is ready for it.

Imagine a mid-size manufacturer. Twelve subsidiaries across eight countries. Eight currencies. The CFO walks into the quarterly business review and asks: “Where will our cash be in thirteen weeks?”

What happens next is usually a spreadsheet nightmare. Treasury sends emails to every subsidiary requesting their forecast. Half respond on time. The data comes in different formats. Someone forgot to include a tax payment. Another subsidiary submitted numbers in the wrong currency. The team spends two weeks consolidating, cleaning, and reconciling — only to produce a forecast that is already outdated by the time it reaches the CFO’s desk.

This scenario plays out in thousands of companies every month. It has played out for decades. But something has changed. AI, and more specifically agentic AI, has matured to the point where it can genuinely transform how treasury teams forecast cash flows — as a practical tool that delivers measurable results.

At Automation Boutique, we have been building AI solutions for treasury and finance since the technology became mature enough to deliver real value. We have seen what works, what does not, and where most companies go wrong. The pattern is almost always the same: they jump straight to the AI part and skip everything that makes AI actually work.

AI cash flow forecasting is not magic. It is a system. A system that starts long before any model runs its first prediction. And if you get the foundation wrong, no amount of AI will save you.

Jan-Willem Attevelt — Co-Founder, Automation Boutique

This is the playbook. Step by step. From raw bank data to autonomous treasury operations. Whether you build it yourself, use spreadsheets, or use a platform like NineAnts, the principles are the same.

The business case: why cash flow forecasting matters

What is bad forecasting costing you right now? Calculate it honestly, and the business case for better forecasting writes itself. We help treasury teams put that number on the table, so they can measure results.

Jan-Willem Attevelt, Co-Founder, Automation Boutique

Cash flow forecasting is consistently ranked as the number one challenge in corporate treasury. Not payments. Not bank relationship management. Not FX hedging. Forecasting. Why? Because it is the foundation for almost every other treasury decision — and most companies are still doing it poorly.

What happens when you get it wrong

A company with inaccurate cash flow forecasting is essentially flying blind. The consequences are real and measurable.

Idle cash earns nothing. If you do not know that you will have €10M of surplus cash for the next sixty days, that money sits in a current account earning zero. At a conservative money market rate of 3%, that is €50,000 in missed yield in just sixty days. Multiplied across a year, the numbers become significant.

Emergency funding is expensive. When a cash shortfall catches you by surprise, you do not negotiate from strength. You draw on credit facilities at unfavourable terms, or worse, you scramble for overnight funding. The spread between planned and emergency funding can easily be 200 basis points. On a €20M shortfall lasting sixty days, that is €65,000 in unnecessary interest — for a single event. And that is only the external side of the story. With a reliable forecast, you can often smooth cash flows internally before going to the market at all: postponing non-critical payments, swapping liquidity across currencies, or using cash intercompany to cover short-term gaps. That kind of proactive management is only possible if you see the shortfall coming.

Unhedged FX exposure hits the P&L. If your forecast does not accurately capture the timing and size of cross-currency cash flows, you cannot hedge effectively. A 5% adverse move on €10M of unhedged USD exposure is €500,000 directly off your bottom line.

And perhaps most damaging: poor forecasting means poor visibility into business health. Cash is the ultimate truth-teller. When customer receipts start declining or supplier payments start stretching, those are early signals. Without a reliable forecast that tracks these patterns and compares them with previous years and seasons, management discovers problems too late.

What is bad forecasting costing you?
Cost driverInputAssumptionCost
Missed yieldIdle balance: €10MMoney market rate: 3%€50k per 60 days
Emergency fundingUnplanned shortfall: €20MSpread over planned: 2%€65k per event (60 days)
Unhedged FXFX exposure: €10MAdverse FX move: 5%€500k P&L hit

Illustrative inputs for a mid-sized group. Plug in your own.

What happens when you get it right

Companies with accurate, timely cash flow forecasts consistently achieve better investment yields, lower funding costs, tighter FX risk management, and earlier warning of business issues. Treasury stops being a reporting function and becomes a strategic partner. For most mid-to-large corporates, the annual value of improving forecast accuracy by even 20–30% runs into hundreds of thousands, sometimes millions of euros or dollars.

The ROI calculation is straightforward. Take your average idle cash balance, multiply by the yield you could be earning, and add the cost of emergency funding events and FX losses over the past year.

If you are trying to convince your CFO to invest in AI forecasting, start there. The numbers speak for themselves.

Look back before you go forward

Before you forecast a single dollar or euro, you need to understand your past. Historical transactions and bank account balances are the raw material of any cash flow forecast. Without them, you are guessing. With them, you are learning. This is the unsexy part that most companies want to skip. Do not skip it.

Get your bank data. All of it.

Aim for at least 24 months of historical transaction data. Why 24 months? Because seasonality — the recurring patterns that follow a calendar rhythm — only reveals itself when you have enough history to compare year over year. Tax payments hit in specific months. Customer receipts spike in Q4. Supplier payments cluster around quarter-ends. None of this is visible in three months of data. Thirty-six months is even better — more history makes it easier to distinguish real patterns from one-off anomalies.

That unusually large payment in March 2025: was it a seasonal pattern or a one-time event? With three years of history, the answer becomes clear.

How to automate bank connectivity

For bank connectivity, the two main approaches are Host-to-Host (H2H) via SFTP (CAMT.053 or MT940 file drops onto a secure server, batch-based but reliable) and API connectivity (real-time or near-real-time, accelerated in Europe by PSD2 and Open Banking). For multinationals, SWIFT messaging adds another option for global banking partner networks. Most groups end up using a mix. Whatever the method, automate the pipeline and normalise the data into a single format. CSV uploads are a fallback, not a strategy.

H2H via SFTP is the workhorse of corporate bank connectivity. Your bank drops statement files onto a secure SFTP server and your system picks them up automatically. It is batch-based, not real-time, but it is reliable and well-established. API connectivity is the modern approach. Many banks now offer standardised API access that did not exist five years ago. The data is fresher, the integration is cleaner, but API coverage is not yet universal across all banks and geographies. SWIFT is particularly useful when dealing with a large number of banking partners across different regions.

The reality for most multinationals is that you end up using a combination of these methods. Your German subsidiary pulls data from Deutsche Bank via H2H file drops. Your US entity connects to JPMorgan via API. The problem is not whether the technology exists. It does. The problem is stitching it all together. That integration challenge has to be solved before any forecasting can happen.

If you are still downloading CSV files manually from your bank portals every month, stop. Invest in automating your bank data pipeline. Whether you build the integration yourself, use middleware, or use a platform like NineAnts, the goal is the same: connect to your banks, via APIs or secure file transfers, either directly or through SWIFT, and standardise everything into a single format. Automation here pays for itself almost immediately. CSV uploads can serve as a fallback, but automated feeds should always be the preferred path.

Categorise your cash flows

Then categorise. Raw transactions are noise; categorised transactions are signal. Typical categories include Customer Receipts, Supplier Payments, Salaries, Taxes, Capex, Intercompany flows, Bank Fees, Interest, Rent, Utilities, Loan Drawdowns and Repayments, and Dividends. Make them specific to how your business actually operates — a SaaS company and a manufacturer have very different cash flow profiles.

The usual suspects: categories often used
  • Customer Receipts
  • Supplier Payments
  • Salaries
  • Taxes
  • Capex
  • Intercompany flows
  • Bank Fees
  • Interest
  • Rent
  • Utilities
  • Loan Drawdowns and Repayments
  • Dividends

Do not just copy this template. Make the categories specific to how your business actually operates.

Labelling every historical transaction is the hard part. Excel’s Power Query engine can handle rule-based categorisation for free; it works but requires a lot of rules and a lot of maintenance. The more scalable approach is hybrid: rule-based categorisation for obvious patterns, with AI classification picking up everything the rules miss. Watch out for intercompany transactions (a payment from your Dutch entity to your German entity can look like a regular supplier payment), refunds and reversals, and multi-currency transactions where the same supplier appears with different names depending on which bank is processing the payment.

With Power Query you define rules: if a transaction has these characteristics, categorise it as X. Power Query applies them across your data. It works, but it also requires a lot of backtesting to get right.

The hybrid model is the approach we took with NineAnts, but the same principle applies whether you build it in-house or use a third-party tool. Rules catch the straightforward stuff. The payroll that comes from the same counterparty every month. The rent that is always the same amount. AI handles the ambiguity: the supplier payment that could be Capex or could be regular procurement, the bank charge that is structured differently across banking partners. The result is fully categorised transaction history without the manual grind.

Refunds and reversals can throw off your category totals if they are not matched to the original transaction. And multi-currency transactions require extra attention.

At this point, you have not used any AI for forecasting. And that is the point. You now have a clean, categorised view of your cash flow history and historical balances. This is the foundation. Everything that follows, every model, every prediction, every insight, is only as good as this data.

Choose your time buckets

Finally, choose your time buckets carefully. Cash flow forecasting is never one-size-fits-all when it comes to granularity. Daily liquidity needs a day-by-day view. Medium-term planning often works better weekly. Board reporting and long-range outlooks read better monthly or quarterly. A good forecasting system lets you switch between these views — store data at the most granular level (daily) and aggregate up. Once you flatten the data at source, you cannot go back.

Bring in what you already know

Your bank data tells you what happened. Your business systems tell you what is going to happen. Open invoices from your ERP, scheduled payroll runs, known tax obligations, lease payments, loan repayments — these are cash flows where the amount and timing are already largely determined.

This data lives in your existing systems: your ERP, your HR platform, your treasury management system (which may or may not be Excel). The challenge is getting it out and into your forecast in a structured way.

A good forecasting system connects to your ERP, HR platform, or TMS via API or SFTP to pull this data in automatically. NineAnts does this out of the box, but you can also build these integrations yourself or import CSV files and Excel exports manually. The method matters less than the principle: use what you already know.

The ERP data quality challenge

But ERP data is not always as clean as it looks. Invoice due dates are not payment dates: your ERP says an invoice is due in 30 days but this customer historically pays in 45. A well-designed forecasting system learns this difference over time. Partial payments, credit notes, and disputes muddy the picture further. And different ERP systems (SAP, Oracle, Microsoft Dynamics) model payment terms differently, so consolidating across multiple ERPs requires normalisation.

Due dates versus payment behaviour. Which date do you use for your forecast? The contractual due date gives you a best-case scenario. The historical payment behaviour gives you a realistic one. The AI observes that Customer X consistently pays 15 days late and adjusts the timing accordingly.

Partial payments are messy. A customer owes €100,000 but pays €60,000 now and the rest “later.” Your ERP might still show the full amount as open. Your forecast needs to account for the split.

Credit notes and disputes muddy the picture. An open invoice of €50,000 means nothing if there is a €20,000 credit note pending against it. Your forecast should work with net amounts, not gross.

Different ERP systems model this data differently. SAP structures payment terms one way. Oracle another. Microsoft Dynamics yet another. If you operate multiple ERPs across your group (which most multinationals do), normalising this data into a consistent format is a challenge.

Known cash flows form the baseline of your forecast. For the near term, they are usually quite accurate. But the further you look into the future, the thinner this data gets. Open invoices only cover what has already been billed. Payroll only covers what has been scheduled. Three months out, your known cash flows might cover only 30% of what will actually happen. Known cash flows alone are not going to get you there. That is where AI comes in.

I’m a bit obsessed with building better cash flow forecasting. Why? Because it reduces waste, and no one likes waste. Done right, it turns information trapped in systems and in people’s heads into something useful. Less idle cash, less risk and fewer surprises. And, with a bit of luck, it even brings a little bit of harmony… and maybe some fun.

Philip Costa Hibberd, Co-Founder, Automation Boutique