Monday, September 21, 2020

IMPACT OF AI IN B2B MARKET

   IMPACT OF AI IN ACCOUNT RECEIVABLES


Challenges Faced

The main challenges of the A/R is the huge amount of transactions that the customers have to deal with, specially in the B2B space. When we talk about hundred's of thousands of customers, we've millions of invoices. We really have to go after every transaction. So that's where a lot of time is being spent by having AI teams manually going after invoices, trying to get paid, trying to apply the payment or  trying to figure out why the customer has not paid or something. So that's a main challenge of being very transaction heavy in B2B space. So when we've the challenge of lot of transactions that we've to manually go after that's when we look into the technology where technology comes to save us. We look into robotics where we can automate different tasks and we use Artificial Intelligence which is nothing but machine learning algorithms to look at patterns from customer's stand point, from all the transactions stand point and we use machine learning to predict what are the various payment patterns our customer's have, what are the various deductions they have in the past. Trying to help customers to tailored their solution to the problem they have in each of these spaces.

How to Overcome that Challenge

Since the world is evolving towards AI and currently every sector is leveraging Artificial Intelligence in their business domain. Like every business problem I've also used machine learning algorithms to predict the partial payment amount of a customer. The problem statement that we got from the company was totally based on B2B business domain. B2B is nothing but a business conducted between two companies where one of the business is the buyer and the other one is the seller. Buyer business buys some goods from the seller business and the seller business issues some invoices against those goods which contains the detailed information of all the goods along with the payment amount and the date of the payment. Every business has an Account Receivables Department which keeps the track of all the records like the payment status, customer payment details and their payment terms. In the ideal world, the buyer business should pay back within a stipulated time period(i.e the Payment Term). However, in the real world, the buyer business seldom pays within their established time period sometimes they pay in installments and manually it is quite difficult to keep track of all the records so we build an Account Receivables Department chat bot along with an AI enabled dashboard where we have all the invoice details of the customer and with the help of machine learning we can predict the partial payment amount. 


Machine Learning Algorithm

Performed data preprocessing(Cleaned the dataset by removing null values and also dealt with the categorical values by converting them into numerical one using Ordinal Encoding), feature Engineering, feature transformation and Exploratory Data Analysis. Pre-processed the data and unstacked into multiple columns and calculated the partial payment amount against each invoices.

Applied Random Forest Classifier, which identified 4 important features like "name_of_customer", "customer_payment_terms", "age_of_invoice", "invoice_currency" with a Variance Threshold value = 0.01, and predicted the partial payment amount of a customer with a help of binary classification by adding conditions like "+1" for the customer who paid full amount, "0" for the customer who paid partial amount and "-1" for the customer who doesn't paid any amount. Achieved 97% accuracy and finally created two models and compared those two models with respect to" invoice currency" i.e. the one which was having the invoice_currency feature and the other one which was not having the feature "invoice_currency". By comparing those two model's found that the model  having the invoice_currency performed better. This gave an idea that in real world, B2B business works on credits where Customers select products, place an order and arrange delivery through an agreed logistics channel. Customers do not pay at the time of the order, but receive an invoice which they settle within agreed payment terms.




                                     Model with invoice_currency



                                   Model without invoice_currency


ALGORITHM ACCURACIES

Algorithm Used                                     Accuracy
Logistic Regression                                 96.17%
SVM Classifier                                        96.30%
Random Forest Classifier                        97.81%

Project Link: https://colab.research.google.com/drive/1ddM_L_YbAG-0Y4HASxU53EogdbdLFGvQ?usp=sharing












Blog on Data Leakage

                                                  DATA LEAKAGE Data   Leakage refers to a problem where information about the holdout datase...