Optimizing Commercial Teams and Territory Design Using a Mathematical Model Based on Clients’ Values: A Case Study in Canada
Abstract
1. Introduction
2. Definitions and Generalities
2.1. Assessing a Client’s Value with the RFM Model
2.2. Sectorization Problems
- Compactness: sectors should have geographically concentrated activity; according to the problem scenario, higher density in the sectors means less travel, greater accessibility, and more time available for sales or services.
- Balance: sectors should be balanced with respect to a certain measure of activity, containing similar parts of the whole.
2.3. Pareto Front
3. Model Formulation
3.1. Sets and Parameters
3.2. Decision Variables
3.3. Objective Function
3.4. Constraints
4. Results
- If a client falls within one of the previously defined convex polygons, they are assigned to the sales team associated with that polygon;
- Otherwise, the two shortest distances to the existing convex polygons are considered, and the client is assigned to the polygon whose corresponding sales team has the lowest ‘Balance’ value.
5. Discussion: Could ChatGPT Accomplish This, Instead of a Mathematician?
5.1. Input
- Context: The Canadian market holds enormous potential, making the commercial teams of the company in question play a crucial role. However, evaluating commercial performance is challenging—currently, only revenue is considered, which is a poor approach. Given the geographical size of Canada, a review of geographical assignments by commercial team may be justified (the decision may come from the outputs of the previous point).
- Objective: Evaluation model of commercial teams’ performance. Optimization of geographical segments/clients assigned per commercial team.
- -
- Excel file containing data related to sales of parts and equipment from 1 January 2018, to 30 September 2023. Existing columns: ‘Commercial Team’ (name of the commercial team), ‘Region’, ‘Division’, ‘Billing Date’, ‘Sale Type’, ‘Price’ (selling price), ‘Profit’, ‘Customer Number’, ‘Article Group’ (group of the sold article), and ‘Article Code’ (code of the sold article).
- -
- Excel file containing data related to opportunities for parts and equipment from 2018 to 2023. Existing columns: ‘Commercial Team’ (name of the commercial team), ‘Region’, ‘Division’, ‘Closing Date’ (date when the opportunity was closed or is expected to close), ‘Price’ (selling price), ‘Customer Number’, ‘Status’ (status of the opportunity), and ‘Evaluation’ (evaluation of the opportunity).
- -
- Excel file containing data related to services (e.g., equipment repair) provided by the company from 1 January 2018, to 27 November 2023. Existing columns: ‘Commercial Team’ (name of the commercial team), ‘Region’, ‘Division’, ‘Billing Date’, ‘Price’ (service cost), and ‘Customer Number’.
- -
- Excel file containing data related to the organization of commercial teams in the year 2023. Existing columns: ‘Commercial Team’ (name of the commercial team), ‘Name’ (worker’s name), ‘Region’, ‘Division’, and ‘Title’ (worker’s position).
- -
- Excel file containing data related to the addresses of commercial teams. Existing columns: ‘Commercial Team’ (name of the commercial team) and ‘Postal Code’ (postal code corresponding to the location of the commercial team).
- -
- Excel file containing data related to the addresses of customers who have made a purchase or received a service from the company. Existing columns: ‘Customer Number’, ‘Province’, and ‘Postal Code’ (province and postal code corresponding to the location of the customer).
5.2. Output
- The code imports necessary libraries such as pandas for data manipulation, numpy for numerical computations, train_test_split for splitting data into training and testing sets, RandomForestRegressor for building a regression model, mean_squared_error for evaluating model performance, and matplotlib.pyplot for data visualization.
- Excel files containing sales, opportunities, services, team organization, and customer address data are loaded into pandas’ DataFrames.
- Data from different sources (sales, opportunities, services) are concatenated into a single DataFrame. Data from the year 2023 are filtered, and team data from 2023 are merged with the filtered data based on the ’Commercial Team’ column.
- Performance metrics such as Total Sales, Average Sales, Total Profit, Number of Unique Customers, and Number of Transactions are calculated for each commercial team using groupby and aggregation functions.
- The column names of the performance metrics’ DataFrames are renamed for easier interpretation.
- A custom metric (‘Custom Metric’) is added to the performance metrics’ DataFrames to illustrate a fictitious metric. It is calculated by dividing total sales by the number of unique customers.
- Features (X) and target variable (y) are defined. The data is split into training and testing sets. A Random Forest Regressor model is instantiated and trained on the training data.
- The trained model is used to make predictions on the testing data, and mean squared error (MSE) is calculated to evaluate the model’s performance.
- The importance of features in the trained model is visualized using a bar plot.
5.3. Problems of ChatGPT’s Approach
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zuse Institute Berlin. SCIP—Solving Constraint Integer Programs. 2025. Available online: https://www.scipopt.org/ (accessed on 13 May 2024).
- Achterberg, T. SCIP: Solving constraint integer programs. Math. Program. Comput. 2009, 1, 1–41. [Google Scholar] [CrossRef]
- Patron, M. Case Study: Applying RFM segmentation to the SilverMinds catalogue. J. Direct Data Digit. Mark. Pr. 2004, 5, 269–275. [Google Scholar] [CrossRef]
- Wei, J.-T.; Lin, S.-Y.; Wu, H.-H. A review of the application of RFM model. Afr. J. Bus. Manag. 2010, 4, 4199–4206. [Google Scholar]
- Blattberg, R.C.; Kim, B.D.; Neslin, S.A. RFM Analysis. In Database Marketing: Analyzing and Managing Customers; Springer: New York, NY, USA, 2008; pp. 323–337. [Google Scholar] [CrossRef]
- Herrera-Viedma, E.; Carrasco, R.A.; Blasco, M.F.; García-Madariaga, J. A Fuzzy Linguistic RFM Model Applied to Campaign Management. Int. J. Interact. Multimed. Artif. Intell. 2019, 5, 21–27. [Google Scholar] [CrossRef]
- Colombo, R.; Jiang, W. A stochastic RFM model. J. Interact. Mark. 1999, 13, 2–12. [Google Scholar] [CrossRef]
- Zong, Y.; Xing, H. Customer stratification theory and value evaluation—Analysis based on improved RFM model. J. Intell. Fuzzy Syst. 2021, 40, 4155–4167. [Google Scholar] [CrossRef]
- Heldt, R.; Silveira, C.S.; Luce, F.B. Predicting customer value per product: From RFM to RFM/P. J. Bus. Res. 2021, 127, 444–453. [Google Scholar] [CrossRef]
- Martínez, R.G.; Carrasco, R.A.; Sanchez-Figueroa, C.; Gavilan, D. An RFM Model Customizable to Product Catalogues and Marketing Criteria Using Fuzzy Linguistic Models: Case Study of a Retail Business. Mathematics 2021, 9, 1836. [Google Scholar] [CrossRef]
- Ernawati, E.; Baharin, S.S.K.; Kasmin, F. A review of data mining methods in RFM-based customer segmentation. In Proceedings of the 2nd Annual Conference of Science and Technology (ANCOSET 2020), Malang, Indonesia, 28 November 2020; Journal of Physics: Conference Series. IOP Publishing: Bristol, UK, 2021; Volume 1869. [Google Scholar] [CrossRef]
- Wu, J.; Shi, L.; Yang, L.; Niu, X.; Li, Y.; Cui, X.; Tsai, S.B.; Zhang, Y. User Value Identification Based on Improved RFM Model and K-Means++ Algorithm for Complex Data Analysis. Wirel. Commun. Mob. Comput. 2021, 2021, 9982484. [Google Scholar] [CrossRef]
- Rungruang, C.; Riyapan, P.; Intarasit, A.; Chuarkham, K.; Muangprathub, J. RFM model customer segmentation based on hierarchical approach using FCA. Expert Syst. Appl. 2024, 237, 121449. [Google Scholar] [CrossRef]
- Robert, C.B.; Byung, D.K.; Scott, A.N. Database Marketing: Analyzing and Managing Customers; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Christy, A.J.; Umamakeswari, A.; Priyatharsini, L.; Neyaa, A. RFM ranking—An effective approach to customer segmentation. J. King Saud Univ.-Comput. Inf. Sci. 2021, 33, 1251–1257. [Google Scholar] [CrossRef]
- Hsu, P.Y.; Huang, C.W. IECT: A methodology for identifying critical products using purchase transactions. Appl. Soft Comput. 2020, 94, 106420. [Google Scholar] [CrossRef]
- Koch, R. The 80/20 Principle: The Secret of Achieving More with Less: Updated 20th Anniversary Edition of the Productivity and Business Classic; Hachette UK: London, UK, 2011. [Google Scholar]
- Gomes, M.A.; Meisen, T. A review on customer segmentation methods for personalized customer targeting in e-commerce use cases. Inf. Syst. e-Bus. Manag. 2023, 21, 527–570. [Google Scholar] [CrossRef]
- Handojo, A.; Pujawan, N.; Santosa, B.; Singgih, M.L. A multi layer recency frequency monetary method for customer priority segmentation in online transaction. Cogent Eng. 2023, 10, 2162679. [Google Scholar] [CrossRef]
- Lopes, C.; Rodrigues, A.M.; Romanciuc, V.; Ferreira, J.S.; Öztürk, E.G.; Oliveira, C. Divide and Conquer: A Location-Allocation Approach to Sectorization. Mathematics 2023, 11, 2553. [Google Scholar] [CrossRef]
- Kalcsics, J.; Ríos-Mercado, R.Z. Districting Problems. In Location Science; Laporte, G., Nickel, S., Saldanha da Gama, F., Eds.; Springer International Publishing: Cham, Switzerland, 2019; pp. 705–743. [Google Scholar] [CrossRef]
- Zoltners, A.A.; Sinha, P. The 2004 ISMS Practice Prize Winner—Sales Territory Design: Thirty Years of Modeling and Implementation. Mark. Sci. 2005, 24, 313–331. [Google Scholar] [CrossRef]
- Darmian, S.M.; Fattahi, M.; Keyvanshokooh, E. An optimization-based approach for the healthcare districting under uncertainty. Comput. Oper. Res. 2021, 135, 105425. [Google Scholar] [CrossRef]
- Tavares-Pereira, F.; Figueira, J.R.; Mousseau, V.; Roy, B. Multiple criteria districting problems: The public transportation network pricing system of the Paris region. Ann. Oper. Res. 2007, 154, 69–92. [Google Scholar] [CrossRef]
- Camacho-Collados, M.; Liberatore, F.; Angulo, J.M. A multi-criteria police districting problem for the efficient and effective design of patrol sector. Eur. J. Oper. Res. 2015, 246, 674–684. [Google Scholar] [CrossRef]
- Bouzarth, E.L.; Forrester, R.; Hutson, K.R.; Reddoch, L. Assigning students to schools to minimize both transportation costs and socioeconomic variation between schools. Socio-Econ. Plan. Sci. 2018, 64, 1–8. [Google Scholar] [CrossRef]
- Shanker, R.J.; Turner, R.E.; Zoltners, A.A. Sales territory design: An integrated approach. Manag. Sci. 1975, 22, 309–320. [Google Scholar] [CrossRef]
- Sandoval, M.G.; Álvarez-Miranda, E.; Pereira, J.; Ríos-Mercado, R.Z.; Díaz, J.A. A novel districting design approach for on-time last-mile delivery: An application on an express postal company. Omega 2022, 113, 102687. [Google Scholar] [CrossRef]
- Álvarez-Miranda, E.; Pereira, J. A districting application with a quality of service objective. Mathematics 2021, 10, 13. [Google Scholar] [CrossRef]
- Corley, H., Jr.; Roberts, S. A partitioning problem with applications in regional design. Oper. Res. 1972, 20, 1010–1019. [Google Scholar] [CrossRef]
- Martinho, A.; Alves, E.; Rodrigues, A.M.; Ferreira, J.S. Multicriteria location-routing problems with sectorization. In Proceedings of the Operational Research: IO2017, Valença, Portugal, 28–30 June 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 215–234. [Google Scholar]
- Hewitt, M.; Frejinger, E. Data-driven optimization model customization. Eur. J. Oper. Res. 2020, 287, 438–451. [Google Scholar] [CrossRef]
- Kalcsics, J.; Nickel, S.; Schröder, M. Towards a unified territorial design approach—Applications, algorithms and GIS integration. Top 2005, 13, 1–56. [Google Scholar] [CrossRef]
- Ríos-Mercado, R.Z.; López-Pérez, J.F. Commercial territory design planning with realignment and disjoint assignment requirements. Omega 2013, 41, 525–535. [Google Scholar] [CrossRef]
- Saaty, T.L. The Analytic Hierarchy Process in Conflict Management. Int. J. Confl. Manag. 1990, 1, 47–68. [Google Scholar] [CrossRef]
- Albayrak, E.; Erensal, Y. Using analytic hierarchy process (AHP) to improve human performance: An application of multiple criteria decision making problem. J. Intell. Manuf. 2004, 15, 491–503. [Google Scholar] [CrossRef]
- Baskir, M.B. A novel belief-based QFD-AHP model in interval type-2 fuzzy environment for lean after-sales service in automotive industry. Int. J. Lean Six Sigma 2023, 14, 653–678. [Google Scholar] [CrossRef]
- Ben Ali, M.; Rauch, E. Sustainable Mobility Transition: A SWOT-AHP Analysis of the Case Study of Italy. Sustainability 2024, 16, 4861. [Google Scholar] [CrossRef]
- James, A.T.; Asjad, M.; Panchal, R. Purchase decision making of garage equipment using an integrated fuzzy AHP and grey relation analysis method. Grey Syst. Theory Appl. 2022, 13, 238–260. [Google Scholar] [CrossRef]
- Paredes Rodríguez, A.M.; Bravo Bastidas, J.J.; Osorio Gómez, J.C.; Peña Orozco, D.L.; González Feliu, J. Fuzzy AHP TOPSIS Methodology for Multicriteria ABC Inventory Classification. J. Eng. 2023, 2023, 7661628. [Google Scholar] [CrossRef]
- Ortiz-Barrios, M.; Borrego-Areyanes, A.A.; Gómez-Villar, I.D.; De Felice, F.; Petrillo, A.; Gul, M.; Yucesan, M. A multiple criteria decision-making approach for increasing the preparedness level of sales departments against COVID-19 and future pandemics: A real-world case. Int. J. Disaster Risk Reduct. 2021, 62, 102411. [Google Scholar] [CrossRef]
- Pant, S.; Kumar, A.; Ram, M.; Klochkov, Y.; Sharma, H.K. Consistency Indices in Analytic Hierarchy Process: A Review. Mathematics 2022, 10, 1206. [Google Scholar] [CrossRef]
- Tursunbayeva, A.; Chalutz-Ben Gal, H. Adoption of artificial intelligence: A TOP framework-based checklist for digital leaders. Bus. Horizons 2024, 67, 357–368. [Google Scholar] [CrossRef]
- Retkowsky, J.; Hafermalz, E.; Huysman, M. Managing a ChatGPT-empowered workforce: Understanding its affordances and side effects. Bus. Horizons 2024, 67, 511–523. [Google Scholar] [CrossRef]
- Ardito, L.; Filieri, R.; Raguseo, E.; Vitari, C. Artificial intelligence adoption and revenue growth in European SMEs: Synergies with IoT and big data analytics. Internet Res. 2024. [Google Scholar] [CrossRef]
Sets | Description |
---|---|
L | Set of Low-Value customers |
M | Set of Mid-Value customers |
H | Set of High-Value customers |
Set of basic units (customers) | |
C | Set of sectors or territories (commercial teams) |
Parameters | Description |
Distance from commercial team c to customer v | |
Measure of the number of opportunities relative to customer v | |
Measure of the number of workers in commercial team c | |
Average number of opportunities, relative to Low-Value customers, per worker | |
Average number of opportunities, relative to Mid-Value customers, per worker | |
Average number of opportunities, relative to High-Value customers, per worker | |
Tolerance | |
k | Number of commercial teams, |
Branch | Number of Workers | Total Opportunities | Balance | |
---|---|---|---|---|
A | 3 | 663 | 1.03 | 0.2 |
536 | 0.83 | 0.8 | ||
B | 2 | 512 | 1.20 | 0.2 |
768 | 1.79 | 0.8 | ||
C | 3 | 563 | 0.88 | 0.2 |
413 | 0.64 | 0.8 | ||
D | 1 | 227 | 1.06 | 0.2 |
287 | 1.34 | 0.8 | ||
E | 1 | 177 | 0.83 | 0.2 |
138 | 0.64 | 0.8 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Carvalho, A.M.; Lopes, C.; Cruz, M.; Santos, J.; Ramos, S.; Vieira, F.; Louro, P. Optimizing Commercial Teams and Territory Design Using a Mathematical Model Based on Clients’ Values: A Case Study in Canada. Mathematics 2025, 13, 2940. https://doi.org/10.3390/math13182940
Carvalho AM, Lopes C, Cruz M, Santos J, Ramos S, Vieira F, Louro P. Optimizing Commercial Teams and Territory Design Using a Mathematical Model Based on Clients’ Values: A Case Study in Canada. Mathematics. 2025; 13(18):2940. https://doi.org/10.3390/math13182940
Chicago/Turabian StyleCarvalho, Ana Miguel, Cristina Lopes, Manuel Cruz, Jorge Santos, Sandra Ramos, Filipa Vieira, and Pedro Louro. 2025. "Optimizing Commercial Teams and Territory Design Using a Mathematical Model Based on Clients’ Values: A Case Study in Canada" Mathematics 13, no. 18: 2940. https://doi.org/10.3390/math13182940
APA StyleCarvalho, A. M., Lopes, C., Cruz, M., Santos, J., Ramos, S., Vieira, F., & Louro, P. (2025). Optimizing Commercial Teams and Territory Design Using a Mathematical Model Based on Clients’ Values: A Case Study in Canada. Mathematics, 13(18), 2940. https://doi.org/10.3390/math13182940