Abstract
<title>Abstract</title> <p> Predicting customer repurchase behavior plays a crucial role in today's business market, especially in e-commerce, helping businesses optimize customer retention strategies, personalize experiences, and improve marketing effectiveness. However, most current research has focused only on predicting the likelihood of customer repurchase without considering two core aspects: the time frame for repurchase and the specific products they will choose. This study proposed a multitasking learning framework based on Long Short-Term Memory (LSTM) along with the Mean Absolute Error (MAE) function and sparse categorical cross-entropy to simultaneously predict both repurchase time and the next product. This combination helped the model balance the two tasks and learn an efficient overall performance. The model framework was evaluated on over 540,000 transactions with 3,655 products. Experimental results show that the model achieved an MAE of 1.62 days for predicting repurchase time and a Top-5 prediction accuracy of 9.17% for product recommendations, outperforming random prediction by 67 times. Compared to other models, including statistical models and artificial intelligence (AI), the proposed LSTM model demonstrated superior performance, affirming the advantages of its multitasking architecture and its ability to learn general representations on zero-inflated transaction data. Furthermore, the study proposed an AI agent system to automate processes based on the model output, helping businesses reduce operating costs and optimize personalized marketing strategies. <bold>Classification code</bold> : C53, M31, L81, C45 </p>