## 2 Theoretical Framework  
### Modified RFM Model and Customer Engagement Index (CEI)  
Customer centricity is essential for success in the dynamic world of retail, where companies strive to provide customized experiences and maximize marketing initiatives. The RFM model, initially introduced by [PERSON] [10], is a framework for analyzing and predicting customer behavior based on recency, frequency, and monetary attributes. How recently a customer made a purchase is referred to as their recency. Customers who recently made purchases are frequently thought of as being more involved and possibly as being worth more to a company. The frequency of a customer's purchases over a specific time period is represented by frequency. Customers that make repeated purchases may be more loyal and spend more money overall. Money spent by consumers on purchases is known as their monetary expenditure. Customers that spend more money are typically more important to a company's income. The capacity of RFM analysis to identify discrete consumer categories based on their transactional behavior has attracted much interest. Over the past two decades, the RFM model has undergone evolution by incorporating additional variables such as customer relationship length [11; 12; 13; 14; 15], time since first purchase [11], churn probability [11], and product category group information [12]. RFM models are swift to implement and effectively capture customer characteristics, making them widely applicable in customer analysis and segmentation in various industries. Customers can be evaluated using actual values or the customer quintile differentiation method [7; 13], which sorts customers into five equal quintiles based on RFM variables. The weighting of model variables can be equal or different based on industry characteristics [14]. However, in this research, we did not use all of the variables that were mentioned above since not all of them are related to retail terminologies. Rather, we used the term \"modified RFM\" to explain any modification we proposed for the basic RFM model to have a clearer and deeper analysis, specifically from the retail perspective. [PERSON] and [PERSON] [14] proposed incorporating a periodicity variable into the RFM model, which indicates the regularity of a customer's visits or purchases at fixed intervals. Nevertheless, in this study, we also focused on measuring the engagement level for each customer since, regarding retail, the engagement of customers who come and purchase at retail stores also determines the level of sales and company profits. Herein, we introduce a customer engagement index (CEI) as another metric to assess customer engagement. Customer engagement, referring to the ongoing interactions and participations between a business and its customers, focuses on understanding individual purchasing behavior across different touchpoints and channels. [PERSON] et al. [15] emphasized that expected frequency of customer interaction significantly contribute to a company's revenue. However, the customer engagement index specifically relates to customer-purchase behaviour. This model utilizes the time intervals between purchases in a customer's historical consumption data as a variable. The formula proposed by [PERSON] et al. [16] is calculated using maximum likelihood estimation (\(MLE\)) and weighted maximum likelihood estimation (\(W\)MLE) based estimation (\(W\)MLE) as follows:  
\[CEI=\frac{MLE-W\MLE}{MLE} \tag{1}\]  
\[MLE=\sum_{i=0}^{n-1}\sum_{j=i+1}^{n}\Delta t_{ij} \tag{2}\]  
\[\Delta t_{ij}=X_{j}-X_{i}+1 \tag{3}\]  
\[W\MLE=\sum_{i=0}^{n-1}\sum_{j=i+1}^{n}\Delta t_{ij}\times W_{i} \tag{4}\]  
In this method, the total average of intervals between each purchase period for each customer is calculated. Transaction weights (\(W_{i}\)) are based on their order, with closer transactions having a higher weight. The timing of each customer's purchases is taken into account.