Tutorials / Payments

Payment Projections & Cash Forecasting

There are a few pages across YayPay that display payment projections and cash forecasting results based on YayPay's proprietary machine learning algorithms.

This article will describe in detail how the payment projection module works, how it is configured and how you can make use of it to have a glimpse into the future. 

YayPay uses a family of machine learning algorithms in order to understand the payment behavior of your customers and come up with the most accurate prediction on when each individual invoice is going to be paid.

What are the algorithms? 

YayPay has created 2 separate models that use the same input data, but have different architectures and approaches. 

On-time Prediction

This model is looking at the Current invoices and is attempting to predict if an invoice is going to be paid before the due date. The resulting prediction of this algorithm is the probability of this invoice being paid in time. 

Overdue Prediction

This algorithm is used for Overdue invoices only and it is attempting to predict which Bucket this invoice is going to end up in. The following Buckets are used for the predictions:

  • 1-30 days overdue
  • 31-60 days overdue
  • 61-90 days overdue
  • 90+ days overdue

What drives the prediction?

The most frequent question we get is based on what data points the prediction is made, and this section will answer this question. 

When YayPay is integrating with your ERP system, we are pulling historical documents for the last few years of business, including paid invoices, old payments, credit memos, etc. This data is the core of the payment prediction algorithms we use. 

Then we use this data to calculate different behavioral patterns of your customers and create a customer profile, based on the following data:

  • Average Payment Time
  • Credit Limit 
  • Age of them doing business with you
  • Average Days Overdue 
  • Seasonality Behavior
  • etc.

The same profiling approach is taken to your business as a whole to understand who are the typical customers of yours, how they pay you and what to expect from them. 

Then on the invoice level, we also analyze the individual invoice parameters, such as:

  • Total invoice amount.
  • The number and dollar amount of invoice items.
  • What invoice items there are - we use natural language processing to understand which kind of product your customers are more inclined to pay for.
  • Notes on the invoice.
  • etc.

What approach is used?

We use an ensemble of different machine learning models. For obvious reasons, we can not disclose all the details of the approach taken, but we can say that we use a combination of the following algorithms:

  • RNN/LSTM Models for Natural Language Processing
  • Multilayer Neural Networks
  • LightGBM Classifier

What is the accuracy?

YayPay works with clients from different industries and lines of business. Every business is different - some of the more predictable, some much less. It depends on the business model and traits of the industry this business is in. 

Thus the accuracy varies across the portfolio of our customers, it could be anywhere from 83% to 94%, which means that YayPay can correctly predict if an invoice is going to be paid in time, or predict what Bucket it is going to end up for at least 83% of your invoices. 

Note, that when we measure the accuracy of the predictions, we use a normalized validation dataset that consists of invoices that were paid 60 to 180 days prior.

System-wide configuration

There are a few settings that impact how Cash Forecasting functions in YayPay. To find these settings go to the Settings > Business page and scroll down to Enable Payment Prediction section. 

  • Dashboard - Enable Payment Prediction chart on the Dashboard. If selected, both of the payment prediction charts on the Dashboard page will be displayed. Otherwise, they won't be visible. 
  • Statement - Show payment prediction data for invoices. If selected, invoice on-time payment projections will be displayed on the Statement page as a separate column on the list of the invoices. It will be hidden otherwise. Note, that these predictions will only be visible to you, not your customers. 
  • Invoices page - Show payment prediction data for invoices. If enabled, payment projection probabilities will be displayed on the Invoices page as a separate column, and hidden otherwise. 
  • Payment Projection Threshold. This is an important parameter that allows configuring which invoices the system will consider Projected to be Paid versus Unpaid. YayPay's models calculate the probability of an invoice being paid in time, and this parameter defines the threshold to consider invoices projected to be paid. The optimal number may vary for every business and how well YayPay algorithms "understand" particular business data, but the default and recommended value is 70%.

Dashboard - On-time Payment Projection

On the Dashboard page, YayPay has got 2 separate charts that show projections on when invoices are going to be paid, and how much of funds inflow you will have on a particular day.

This chart shows you the dollar amount of funds projected to be received daily in the future. You can pick what period you want to look at, it could be 7, 17, 30, or 60 days.

Note, that the further you look the less precise the prediction becomes. If you are looking at the 7 days projections they are going to be accurate around 90% of the time, but the further you go the lower is the accuracy. Just like with weather forecasts. 

On top of the chart, you can see the consolidated statistics of the projections for the selected period of time - how much is projected to be paid, promised to be paid, projected to be unpaid, or past due with no promise to pay. Let's see what those terms mean:

  • Projected to be Paid. The invoice is projected to be paid if its probability of being paid in time is greater than the one configured in settings (70% by default), as predicted by our machine learning algorithms. 
  • Projected to be Unpaid. Invoice is projected to be Unpaid if its probability of being paid in time is less than the configured threshold (70% by default), as predicted by our machine learning algorithms.
  • Promise to Pay. If an invoice has got a non-broken, future-dated promissory note. 
  • Past Due, No Promise. Invoices that are now overdue, that were projected to be paid, but projection failed, or Promissory note is broken, end up in this bucket. Note, the chart does not display bars with this category, only the summary information for the selected period of time. 

On the chart itself, you can see color-coded bars, indicating how much funds you are projected to receive on a particular day. So, if an invoice is projected to be paid in time - you will see its amount as a bar on this chart at the date of this invoice's Due date. If you have multiple invoices projected to be paid in time with the same Due date - these invoice totals will add up.

The same exact thing is happening with invoices projected to be unpaid. But Promise-to-pays are displayed at the date when the payment is promised to be sent. 

If you hover over the bar, you will see the details popup that shows you the exact dollar amounts of the projections. Clicking on the popup will bring another dialog where you can drill down to the level of individual invoices, as displayed below.

On-time Daily Projections - Export to Excel

The projections can also be exported to an Excel file by their clicking the link on the top right of the chart, or clicking Export to Excel in the details dialog. 

This spreadsheet gives you a day-by-day view of the payment projections. Note, that one day may include multiple invoices from multiple customers, and the last two columns represent the average probabilities of those invoices to be Paid or Unpaid in time. 

The columns with the projected amounts total up all the invoices for each given date. 

Dashboard - the Expected time of payment of Past due invoices

While the first chart is dealing with the Current invoices, the second Dashboard chart for cash prediction gives you a view into the past-due invoices and when YayPay algorithms believe they are going to be paid. The projection is based on Buckets and YayPay is forecasting which bucket invoices are going to end up. 

The pie chart on the left displays the ratio of the dollar amount of invoices based on which bucket they are projected to be paid. 

The list on the right shows the actual invoices in question, as well as basic details about them, such as the Amount Due, Customer link, and the actual bucket prediction. 

You can click on the customer name or invoice number in order to navigate to the statement or invoice page accordingly. 

The pie chart on the left is also clickable and works as a filter - see below.

If you only want to see invoices that are projected to be paid in a 1-30 days bucket, you click on this yellow sector of the chart and the invoices in the table will be filtered to only show the ones you need. 

Note, that the Total Due value on top only displays the total due of the Overdue invoices in question, not all the Open invoices.

Overdue Projections - Export to Excel

As well as with the previous chart, you can export the prediction data into an Excel file and review them separately. Export can be triggered by clicking on the Export button in the top right corner of the chart.

This file is different from the previous chart spreadsheet. It displays each specific invoice with its details and projection. You can find all the necessary invoice details you need to slice and dice this table, and the actual prediction is housed in the Probability column to show you when this invoice is projected to be paid. 


Statement & Invoices Pages

If enabled, projections can also be seen on the customer Statement page and Invoices page. The way this information is displayed is very alike, thus we will describe them together. Predictions will be displayed as values in the Probability column of the invoice table.

On the Current invoices, you will see the probability estimate of this invoice to be paid at or before the due date.

If there's a Promise to pay associated with an invoice, you will see the message indicating it with the date of the promise to pay. 

For the Overdue invoices, you will see the bucket YayPay predicts this invoice will end up in. On the screenshot above, the last invoice is projected to be paid only after it is 90+ days overdue. 

If you hover over the (i) symbol next to the Probability column header, you will see a popup dialog like this:


What data is required for payment predictions?

To have clearer statistics, when bringing over historical data from your ERP/via API/CSV integration, you are advised to include:

  • invoices (based on their creation date)
  • payments linked to the invoices uploaded (irrespective of their (payments') creation date)

For example: if you push invoices created starting from 1 Jan 2019, then only those payments created against these invoices should be synced over.  



Can't find what you need?

Contact our support team support@yaypay.com for help.