Buy-It-Again Recommendation
Buy-It-Again Recommendation
Solution Background and Business Value
Buy-it-again recommendations make it easy for customers to repurchase products they already know and trust. These recommendations:
-
Increase repeat purchases by surfacing past buys at the right moment.
-
Improve customer retention by keeping users engaged with relevant products.
-
Personalize marketing campaigns, including push notifications, in-app recommendations, and emails.
Data Requirements and Schema
To build a buy-it-again recommendation model, you need three core tables: Users, Items, and Transactions. Kumo AI can incorporate additional signals beyond this minimum dataset to improve model quality.
Core Tables
-
Users Table
Stores user details.
user_id: Unique identifier (Primary Key).join_timestamp: When the user joined.age,location,other_features: Optional user attributes.
-
Items Table
Stores product details.
item_id: Unique identifier (Primary Key).item_name,category: Product metadata.start_timestamp/end_timestamp: Item availability window.price,color,other_features: Additional item features.
-
Transactions Table
Stores user purchase history.
transaction_id: Unique identifier (Primary Key).user_id: Foreign Key linking to Users.item_id: Foreign Key linking to Items.timestamp: Purchase date.total_amount,payment_method,other_features: Transaction metadata.
Entity Relationship Diagram (ERD)
Predictive Queries
One challenge in buy-it-again recommendations is differentiating repeat purchases from one-time buys. A model trained only on past repeat purchases misses important behavioral signals from non-repeat interactions.
Kumo trains a general item-to-user recommendation model and applies filters at prediction time, ensuring:
- The model learns overall user-item affinity.
- Users receive only buy-it-again recommendations.
This Predictive Query Language (PQL) query:
- Predicts the top 50 distinct items a user is likely to buy again within a future X-day window.
- Limits predictions to active users who have made at least N purchases in the last D days, which avoids empty recommendation sets after filtering.
Filtering Out Newly Introduced Items
To exclude newly launched items that users have not had time to re-purchase, apply post-processing in SQL:
Building models in Kumo Fine-Tune SDK
Kumo AI simplifies ML modeling on relational data, making it well suited for this problem.
1. Initialize the Kumo Fine-Tune SDK
2. Create a Connector for Data Storage
3. Select tables
4. Create graph schema
5. Train the model
6. Run the model