Analysis and formation of sales forecasts in CRM systems Andrii Berko1, Iryna Pelekh1 and Pavlo Hlova1 1 Lviv Politechnic National University, 12 Stepana Bandera st., Lviv, 79013, Ukraine Abstract Creation of system of analysis and formation of sales forecasts in CRM systems has been described that allows you to forecast sales in customer relationship management systems and is a powerful tool for increasing the company's competitiveness and improving cooperation with customers. The Information processes in CRM systems have been analyzed. The sequence of events in the process of forecasting sales in system of analysis and formation of sales forecasts in CRM systems has been highlighted. The problem of forecasting sales as a regression problem have been defined. The main stages that need to be performed to test the model of the sales analysis and forecast system in customer relationship management systems in Azure Machine Learning are shown. Keywords Sales analysis, sales forecast, CRM system, machine learning, machine learning algorithms, regression analysis. 1 1. Introduction Sooner or later, every company faces the task of optimizing the interaction with customers process. The choice of the method of organizing this interaction depends on the company's activity field, its internal structuring and approaches to cooperation with clients. Often, this process includes solving additional tasks, such as storing client information, ensuring its security, optimizing internal communication in the company, and convenient access to the developed methodology for working with clients. To solve these problems CRM (Customer Relationship Management) systems have been developed. Unlike Excel spreadsheets (or Google spreadsheets), CRM systems allow you to automate business processes and ensure competitiveness [1]. They help increase the speed of processing applications, reduce costs and predict sales volumes. Own sales forecasting for CRM systems is a reasonable scope of research, as it allows you to reduce costs, predict a decline in demand, effectively manage stocks, set the right performance indicators, plan the next purchases, launch advertising campaigns, rent warehouses, etc. 2. Analysis of the last research and problem statement Modern customer relationship management (CRM) systems are aimed at studying the market and individual needs of customers. Based on this knowledge, new products and services are developed, which allows the company to achieve its goals and improve its financial indicators [2]. Implementation of the CRM system can be carried out in different ways, depending on the needs and circumstances of a particular company. Below are three general approaches to CRM implementation [3]:  Strategic approach: this approach involves the implementation of CRM as part of the company's overall strategy. Before choosing a specific CRM system, a company must define its strategic and CRM goals. This includes studying customer needs, identifying opportunities to COLINS-2024: 8th International Conference on Computational Linguistics and Intelligent Systems, April 12–13, 2024, Lviv, Ukraine Andrii.Y.Berko@lpnu.ua (A.Berko) Iryna.I.Kushniretska@lpnu.ua (I.Pelekh); Pavlo.Hlova.mSAAD.2022@edu.lpnu.ua (P.Hlova) 0000-0001-6756-5661 (A.Berko); 0000-0002-3769-6844 (I.Pelekh) © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings attract and retain customers, and developing a strategy accordingly. After defining the strategic goals, choose the CRM system that best meets the needs of the company;  Functional approach: in this approach, CRM implementation begins with specific functional tasks. For example, a company may determine that it needs to improve contact management or improve the efficiency of deal management. After that, choose the CRM system that best meets specific functional needs;  Distribution in stages: this approach involves the implementation of CRM in stages or in different divisions of the company. A company can initially implement CRM in only one department or part of the business, and then gradually expand its implementation to other divisions. This approach can allow a company implement CRM to effectively, gradually adapting it to the needs of different departments and reducing risks. Each of these approaches has its advantages and disadvantages, and the choice of approach will depend on the specific circumstances and purpose of implementing CRM for the enterprise. CRM platforms are different, depending on the functions they perform:  Lead management. These customer relationship management (CRM) systems collect information about potential customers from various sources, evaluate their potential, and connect new leads with appropriate sales representatives.  Sales funnel management. Such CRM systems map the sales funnel within the CRM program to better understand the customer journey to purchase and increase conversion.  Work processes automation and marketing. These CRM systems automate routine tasks such as prospecting, lead segmentation and customer interaction to streamline workflows and provide a personalized approach to potential customers.  Reporting and forecasting. These customer relationship management (CRM) systems use dashboards, CRM analytics, and reporting tools to identify customer needs and measure sales performance. CRM programs are widely used in various industries, including SaaS, real estate, manufacturing, and marketing. The CRM platform is suitable for businesses of all sizes looking to improve customer satisfaction, increase productivity and increase sales [1, 4]. Within an organization, sales, marketing, customer support, and also finance and operations departments can use a CRM program to solve the following tasks:  Optimization of the sales funnel to close more deals;  Generating more promising leads to increase income;  Building strong relationships to increase customer loyalty;  Optimization of inter-team cooperation to achieve greater goals;  Load reduction to increase productivity. Depending on the needs, the customer relationship management system can be installed on a computer or use a cloud service. Most modern CRM systems also have a mobile application that allows you to work with your customer base from anywhere. Choosing the right sales platform and CRM is fundamental to the success of any business. Consider the most popular CRM platforms: HubSpot, Salesforce, SalesDrive. HubSpot [5] is a cloud-based customer relationship management (CRM) platform that helps businesses scale better with sales, service, marketing and content management software. Salesforce [6] is a cloud-based customer relationship management (CRM) platform with applications for sales, service, marketing, and more that help connect customers and businesses. Salesforce was built together through acquisition, which means your experience and connections may differ depending on the products you use. SalesDrive [7] is a Ukrainian CRM system aimed at online stores that automates the processes of processing orders, keeping records of goods in the warehouse and tracking delivery statuses. In addition, SalesDrive records all communication with customers, including calls, SMS, messages in messengers and e-mail, and provides the ability to effectively monitoring the work of managers. These systems are suitable for both small and medium-sized companies. Each of them has its advantages and disadvantages. When choosing a system, it is recommended that you evaluate your company's core CRM requirements and determine which features are best implemented in each system and which features can be sacrificed because they are not business critical. Sales analysis and forecasting are key to developing a sales strategy and optimizing business processes. They allow companies to make decisions taking into account demand, the structure of the customer base and other factors. To date, the problem of forecasting sales in CRM systems remains relevant due to the need for enterprises to obtain accurate estimates of their costs and revenues, which enables them to forecast their short-term and long-term effectiveness. Currently, sales forecasting is a requirement of the competitive race of modern business, enabling the enterprise to stay afloat. 3. Analysis and sales forecast formation principles in CRM systems Among the main capabilities of the CRM system, can be distinguished the following: 1. Customer information management. The CRM system consolidates the customer base and provides the organization with complete information about its customers, their preferences, on the basis of which an interaction strategy is built. 2. Sales management: the system saves the history of interaction with customers, helping the sales department to analyze customer behavior, form appropriate offers and win their loyalty. 3. Marketing automation: the CRM system allows you to optimize the company's marketing management, organize marketing activities, manage marketing resources and budgets, and coordinate marketing activities. 4. Automation of document flow: the system provides all the necessary tools for managing the company's external and internal document flow, including automatic document generation, preparation of printed forms of documents, maintenance of current versions of documents and quick search of documents in the system. 5. Business process management: dividing work processes into stages and formalizing their structure help reduce the number of errors and speed up the company's work, making results more predictable. 6. The CRM system analytical capabilities: the system provides companies with the opportunity to obtain static information and conduct deep data analysis necessary for strategic business processes. Information processes in CRM are presented in Fig. 1 [1]. Figure 1: Information processes in CRM system Since the CRM system is a web application, the following components are necessary for its correct operation: a web server and a database management system (DBMS). No additional software needs to be installed on the user's workstation other than a standard web browser. Implementation in the form of a web application allows you to work with the system on any platform, including mobile devices. This approach does not require significant computing resources, so the power of an ordinary computer or laptop is sufficient for the stable operation of the information system. 3.1. The analysis and formation of the sales forecast system main processes We identified main processes of the analysis and formation of the sales forecast system such as:  Strategic planning: - strategic goals determination in the field of sales and profitability; - strategies and tactics development to achieve these goals through sales forecasting.  Data collection and integration: - identification of data sources, such as historical sales data, customer data, demographic data, etc.; - integration of these data into a single system for further analysis.  Data analysis: - analytical methods usage for processing and analysis of historical sales data; - correlations and connections identification between various factors and sales volumes.  Forecasts development: - prognostic models construction based on data analysis and taking into account historical trends and variable factors; - generation of sales forecasts based on these models for different time periods.  Validation and adjustment: - comparison of forecasts with actual sales results to validate accuracy; - corrections making to forecasts based on deviations from actual data.  Planning and resources: - determination of resource needs based on sales forecasts; - planning of work processes and resources to meet demand.  Monitoring and reporting: - constant monitoring of strategy implementation and forecast results; - creation of reports and analytical data to inform management and decision-making. The top level of business processes of the subject area: Figure 2: The main processes of the analysis and formation of the sales forecast system Brief description of the TO BE target process:  Data collection and processing: collection, processing and integration of data from various sources, such as historical sales data, customer data and other factors affecting sales;  Analysis and modeling: use of analytical methods and models to determine trends, correlations and forecast sales based on collected data;  Interaction with customers improving: improving methods of communication and interaction with potential and existing customers based on analytics and sales forecasts;  Process automation: introduction of automated tools to optimize routine operations related to sales and customer service;  Monitoring and evaluation: constant monitoring of sales results, comparing them with forecasts and improving the system based on acquired knowledge;  Reporting and analysis: creating reports and analytical data for management and the sales team to make strategic decisions. As a result of this targeted process predictability has been improved and sales efficiency has been achieved, which contributes to increased profitability and customer satisfaction in the CRM system. 3.2. The analysis and sales forecast methods The goal of the work is the development of a system that provides optimization of customer relationship management (CRM) through sales analysis and forecasting. To achieve the set goal, the task of the sales analysis and forecast system in customer relationship management (CRM) systems is as follows: 1. Data collection and storage: ensure the collection and storage of information about customers, their purchases, interaction history, and other important data necessary for sales analysis and forecasting. 2. Data analysis: develop algorithms and models to analyze historical data, including customer segmentation, determining correlations between factors and sales, analyzing the effectiveness of marketing campaigns and other aspects. 3. Sales Forecasting: Develop sales forecasting models based on historical data and other factors that may affect demand. 4. Sales planning and strategy: based on analysis and forecasts, develop sales strategies, including optimization of pricing policy, marketing activities, as well as inventory and production planning. 5. Monitoring and evaluation of results: constantly monitor the results of the implementation of strategies and adjust them if necessary to achieve better results. Building models for analyzing and forecasting sales in the CRM system helps the company to effectively manage relationships with customers, maximize profitability and improve the quality of customer service. A sales forecasting problem is usually a regression problem because it involves predicting numerical values (sales volumes). The task can be divided into several subtasks, such as forecasting sales by product categories, geographic regions, etc. Thorough analysis and understanding of sales data is an important step. This analysis will help determine which algorithms and methods can be the most effective for this task. Purpose of regression analysis [9]: 1. Determination of the degree of determinism of the variation of the criterion (dependent) variable by predictors (independent variables). 2. Predicting the value of the dependent variable using the independent one. 3. Determination of the contribution of individual independent variables to the variation of the dependent variable. Regression analysis can’t be used to determine the presence of a relationship between variables, since the presence of such a relationship is a prerequisite for applying the analysis. The regression analysis algorithm has the following form: let the measurements of Yn be obtained at the points xn of the independent variable x. It is necessary to find the dependence of the average value of the value on the value of x, 𝑌 ∗ (𝑥) = 𝑓(𝑥|𝑎), (1) Where a is a vector of unknown parameters ai. The function f(x|a) is called the regression function. It is assumed that f(x|a) is a linear function of parameters a, that is, it has the form: 𝑛 (2) 𝑓(𝑥|𝑎) = ∑ 𝑎𝑖 𝜇𝑖 (𝑥), 𝑖=0 Where fi(x) are given functions. In this case, the matrix Am=fi(xn) is called a regression matrix. To determine the parameters, the method of least squares is used, that is, the estimates ai are determined from the minimum conditions of the functional: 𝑁 (3) 𝑌𝑛 − ∑𝑖(𝐴𝑛𝑖 𝑎𝑛𝑖 )2 𝛾=∑ 𝜎𝑛2 𝑛=0 And from the functional minimum: (4) 𝛾 = ∑(𝑌𝑛 − ∑ 𝐴𝑛𝑖 𝑎𝑛𝑖 )(𝑅 −1 )𝑛𝑚 (𝑌𝑚 − ∑ 𝐴𝑚𝑖 𝑎𝑚𝑖 ), 𝑖 𝑖 𝑛,𝑚 For correlated measurements with the correlated matrix R. Power functions fi(x) = x2 serve as functions fi(x). Orthogonal and normalized polynomials on the set fn are often used. In this case, it is easy to find the estimate 𝑎̃𝑙 : 𝑎̃ = ∑ 𝜇 (𝑥 )𝑌 ) (5) 𝑙 𝑖 𝑛 𝑛 𝑛 It follows that the calculation 𝑎̃𝑙 does not depend on calculation of others estimates 𝑎̃𝑗 . Usage the regression method for forecasting sales in the CRM system:  Rationale: regression allows you to model the relationship between a dependent variable (such as sales) and independent sales variables, which is critical for accurate forecasting.  Application: regression can be used to develop a model that will predict sales based on historical data and other factors. Factors such as product price, number of customers, advertising expenditure, etc. can be included as independent variables.  Effectiveness: the regression method is effective for modeling linear and non-linear relationships between variables. It allows you to analyze the impact of various factors on sales and develop sales strategies based on these analyses. When considering the problem of forecasting, it is always necessary to take into account the presence of uncertainty and as a result of incomplete information [10]. Considering the presence of the uncertainty factor and heterogeneous features of information systems for which a forecast is formed, one of the general approaches to the analysis and forecasting of the properties of such processes is the consideration of their time series [10]. Effective planning and management of many processes in CRM systems is impossible without operational forecasting. Often, economic processes in enterprise management have a complex behavior that is similar to "chaotic". There are models of chaotic dynamics that are increasingly used in the management of economic systems [10, 11]. The best solution for forecasting the values of time series levels is considered to be performed on the basis of the generalized logistic mapping model, given by the following recurrent relationship [2]: 𝛽 (6) 𝑦 𝑛+1 = 𝜑𝑦 𝛼 (𝑁 − 𝑦 ), 𝑛 𝑛 Where 𝜑, α and β are model parameters calculated by the method of least squares; N is the maximum value of the levels of the series. The mapping 𝑦𝑛+1 is one-dimensional nonlinear. The previous level of the series is used to form the result. According to the conducted studies, even simple nonlinear models, for some parameter values, have a chaotic behavior that seems random with a sufficient number of levels of the series. However, in deterministic nonlinear models, such chaotic behavior is generated precisely by nonlinearity [10, 11]. For our tasks, in practice, it is not possible to establish the length of the series model 𝑦𝑛+1 , from which "chaotic behavior" will begin. Therefore, forecasting is performed on the basis of the generalization of the results of calculations for several models of the type 𝑦𝑛+1 , the parameters of each of which are calculated by the method of least squares for fragments of time series of different lengths (and are significantly different). The construction of the forecast, in our study the operative one, occurs recurrently. Usage the time series method for forecasting sales in the CRM system:  Rationale: the time series method is very important for the analysis and forecasting of temporal data such as sales volume in different periods. Taking into account temporal factors, such as seasonality and trends, helps to obtain more accurate forecasts.  Application: the time series method can be used to analyze and forecast daily, weekly, monthly, or quarterly sales. This method allows you to take into account seasonal fluctuations and identify trends in sales changes.  Efficiency: the time series method is well suited to situations where time is an important factor in changing sales volumes. It allows you to analyze the dependence between today's and past sales, which is critical in CRM systems. 4. CRM-system sales forecast system description We will describe the sequence of events in the process of forecasting sales in CRM using a UML sequence diagram (Fig.3) [12-14]. In this case, we have three main objects: the CRM user, the CRM system, and the forecasting process. A sequence diagram shows the sequence of messages and interactions between them: 1. CRM user sends forecast request; 2. The CRM system receives this request and starts the process of downloading data for forecasting; 3. After the download is complete, the CRM system sends a forecast request to the forecasting process; 4. The forecasting process processes this request and starts the forecast generation process; 5. After completion of the forecast generation, the forecasting process sends a response with the forecast to the CRM system; The CRM system transmits this forecast to the CRM user. Figure 3: CRM system sales forecast sequence diagram This diagram allows you to visualize the sequence of events in the process of forecasting sales in CRM and shows the interaction between objects. To visualize the architectural structure of the software system, we will use the component diagram. This diagram allows you to represent the system as interconnected components and show how they interact with each other. Let's look at the main elements that can be found in a UML component diagram [12-14]: 1. Component: the main element of the diagram, which represents a separate part of the system. It can be a module, library, subsystem or other logical block of the program; 2. Interface: specifies the method of interaction between components. Interfaces show which services or methods can be used by other components; 3. Dependencies: indicators of the relationship between components. Dependencies show which component uses or refers to another component; 4. Conditional areas (frames): used for grouping components and specifying subsystems or logical blocks in the system; 5. Private components: these are components that are hidden from others and interact only through defined interfaces; 6. Recommendations (stereotypes): Additional marks that can be used to detail components or show specific characteristics. Figure 4: The structure model of the CRM system A component diagram helps model the architecture of a software system and can be used for analysis, documentation, and communication with the development team. Microsoft Machine Learning Studio as one of the main tools for solving the problem of analysis and forecasting in CRM systems has been chosen. Microsoft Machine Learning Studio (formerly known as Azure Machine Learning Studio) is an integrated platform for developing and deploying machine learning models [8]. It is developed by Microsoft and provides advanced tools for any stage of the model lifecycle, including data preparation, model building, training, evaluation, and deployment. The development of a project to solve the problem of forecasting sales in CRM systems using Azure Machine Learning included the following steps: 1. Data preparation: collection of necessary data for forecasting sales from the CRM system and other sources. Checking and cleaning data from missing values, anomalies and extraneous factors; 1. Creation of an Azure Machine Learning workspace: a workspace in the Azure Machine Learning service, for project development and execution; 2. Creating an experiment: an experiment in Azure Machine Learning, which includes the steps of data preparation, model selection, training and model evaluation; 3. Data preparation and visualization: Azure Machine Learning tools, such as Azure Data Studio, for data preparation and visualization; 4. Model selection and training: machine learning libraries in Azure Machine Learning to select and train sales forecasting models. Various models can be used, such as linear regression, decision trees, random forest, etc. Setting model parameters and evaluating their effectiveness using quality metrics; 5. Model validation and tuning: validation techniques, such as cross-validation, to assess model accuracy and reliability. Adjusting model parameters to improve its results; 6. Model deployment: after training and validating the model, it was deployed in an Azure Machine Learning environment using a prediction web service that can be integrated with a CRM system; 7. Provision of a mechanism for updating the model with new data. To obtain a forecast based on the developed forecasting model, functions (Azure Functions) have been developed, the result of which can be obtained using an http request. Figure 4: Functions for working with forecasts For the possibility of integration with the CRM system, Vue.js components has been developed, with the help of which you can start the training of the forecasting model and view the sales forecast for a certain period. As a result of the conducted research, a web component was developed that can be integrated into the CRM system. This program allows you to forecast sales in customer relationship management (CRM systems) and is a powerful tool for increasing the company's competitiveness and improving cooperation with customers. After training machine learning models, we need to deploy them in production so that others can use them to make predictions. In Azure Machine Learning, we can do this with Endpoints and Deployments. Endpoints and Deployments allow you to separate the workload interface from the implementation that serves it. To deploy machine learning models in Azure Machine Learning, you can use Web Service deployment to access the model online. Here is a general overview of the process of deploying a web service to Azure ML: Once deployed, the web service will be available at a specific URL. You can use this URL to interact with the resulting machine learning model via HTTP requests. Acknowledgements In this work, a detailed analysis of the systems of interaction between consumers and the company was carried out, the business processes of the CRM system were described using a structural approach, various sales forecast models were developed in customer relationship management systems (CRM) systems, and the best of them was chosen. Creation of system of analysis and formation of sales forecasts in CRM systems allows you to forecast sales in customer relationship management systems and is a powerful tool for increasing the company's competitiveness and improving cooperation with customers. Building models for analyzing and forecasting sales in the CRM system helps the company to effectively manage relationships with customers, maximize profitability and improve the quality of customer service. The problem of forecasting sales as a regression problem have been defined. The main stages that need to be performed to test the model of the sales analysis and forecast system in customer relationship management systems in Azure Machine Learning are shown. The developed system is effective and provides high accuracy, which allows enterprises to rationally use their resources for future growth and monitor cash flows. The innovativeness of the work consists in an automated approach to forecasting sales of CRM systems, based on the use of large volumes of data and machine learning algorithms. References [1] Possibilities of using CRM systems, 2022. – URL: https://www.terrasoft.ua F. Adikara, R. Fauzi Customer relationship management information system development in pt.citra van titipan kilat in: Proceedings of the 6th International Seminar on Industrial Engineering and Management, Batam, Indonesia, 2013, pp. 14-20. doi:10.1145/567752.567774 [2] Ed Peelen, Rob Beltman Customer Relationship Management 2nd Edition - Pearson Education, 2013 p. 55-77. doi:10.1007/3-540-09237-4 [3] Max Fatouretchi The Art of CRM: Proven strategies for modern customer relationship management - Packt Publishing, 2019 p. 110-117. doi:10.1145/90417. 90738 [4] Hubspot, 2022. - URL: https://www.hubspot.com [5] Salesforce, 2022. - URL: https://www.salesforce.com [6] About us - CRM SalesDrive, 2022. - URL: https://salesdrive.ua/about-us/ [7] Data Concepts in Azure Machine Learning, 2022. – URL: https://tutorialsdojo.com/data- concepts-in-azure-machine-learning/ [8] Litnarovich R. M. Construction and research of mathematical model on the sources of experimental data by the methods of regressive analysis. Train aid.IEGU,Rivne, 2011, pp, 140-141. doi:10.1145/567752.567774 [9] Bidyuk P.I., Korshevnyuk L.O. Designing computer information systems for decision-making support: Training manual. - Kyiv: NNK "IPSA" NTUU "KPI", 2010, 340 p. doi:10.1145/567752.567774 [10] Skalozub V.V., Klymenko I.V. The method of forecasting time series based on logistic mapping. in: Proceedings of the 5th International Scientific and Practical Conf. "Modern information technologies in transport, industry and education", Dnipropetrovsk, 2011. pp. 67-68. doi:10.1145/567752.567774 [11] Edwin Mach Object Oriented Analysis & Design Cookbook: Introduction to Practical System Modeling, 2019. 218 p. doi:10.1145/90417. 90738 [12] Lukman Adam Obomeghie, Bayo Adedeji, Sylvester Aketaumhe Unified Modeling Language Practical Guide, 2022. 59p. doi:10.1145/90417. 90738 [13] Suriya Sundaramoorthy UML Diagramming: A Case Study Approach 1st Edition, 2022. 416p doi:10.1145/90417. 90738