80% of reactivation attempts for "dormant" customers fail due to template emails and poor timing. Acquiring a new customer costs 5–7 times more than retaining an existing one, but standard discount campaigns yield only 2–5% response. We develop an AI system that analyzes inactive customer behavior, identifies churn reasons, and generates a personalized offer for each segment — from segmentation to sending.
Why Standard Reactivation Campaigns Fail
The typical mistake is sending identical coupons to the entire database. As a result, 80% of users ignore the emails, and 5% unsubscribe. The problem is that different segments require different approaches: some left due to poor service, some due to high prices, and others simply forgot about the store. Our system identifies 5–7 segments using customer churn analysis and selects a unique strategy for each.
How We Segment Inactive Customers
We use a combination of KMeans clustering and LLM: the model groups customers by numeric attributes (days inactive, total orders, frequency, recency of last purchase), and then the neural network describes each segment and proposes a reactivation strategy. Below is an example implementation in Python using the Anthropic Claude API.
import pandas as pd
import numpy as np
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from anthropic import Anthropic
class InactiveCustomerAnalyzer:
def __init__(self, inactivity_threshold_days: int = 90):
self.threshold = inactivity_threshold_days
self.llm = Anthropic()
self.scaler = StandardScaler()
def identify_inactive(self, customers_df: pd.DataFrame,
last_activity_col: str = 'last_purchase_date') -> pd.DataFrame:
"""Identify inactive customers"""
customers_df['days_inactive'] = (
pd.Timestamp.now() -
pd.to_datetime(customers_df[last_activity_col])
).dt.days
inactive = customers_df[
customers_df['days_inactive'] >= self.threshold
].copy()
return inactive
def segment_inactive(self, inactive_df: pd.DataFrame) -> pd.DataFrame:
"""Cluster inactive customers by behavior pattern"""
features = pd.DataFrame()
features['days_inactive'] = inactive_df['days_inactive']
features['total_orders'] = inactive_df.get('total_orders', 1)
features['avg_order_value'] = inactive_df.get('avg_order_value', 0)
features['order_frequency'] = inactive_df.get('order_frequency', 0)
features['last_order_value'] = inactive_df.get('last_order_value', 0)
features['support_issues'] = inactive_df.get('support_tickets_total', 0)
X = self.scaler.fit_transform(features.fillna(0))
km = KMeans(n_clusters=5, random_state=42, n_init=10)
inactive_df['segment'] = km.fit_predict(X)
# Describe segments
segment_profiles = features.copy()
segment_profiles['segment'] = inactive_df['segment']
segment_stats = segment_profiles.groupby('segment').mean()
# LLM names each segment
for seg_id in range(5):
if seg_id not in segment_stats.index:
continue
stats = segment_stats.loc[seg_id].to_dict()
stats_str = ", ".join([f"{k}: {v:.1f}" for k, v in stats.items()])
response = self.llm.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=100,
messages=[{
"role": "user",
"content": f"""Name this inactive customer segment (3-5 words) and suggest reactivation approach.
Stats: {stats_str}
Return: "Segment Name | 1-sentence strategy" """
}]
)
print(f"Segment {seg_id}: {response.content[0].text}")
return inactive_df
class ReactivationCampaign:
"""Reactivation campaign with personalization"""
def __init__(self):
self.llm = Anthropic()
self.reactivation_offers = {
0: {'discount': 20, 'message_theme': 'we_miss_you'},
1: {'discount': 15, 'message_theme': 'best_of_what_they_liked'},
2: {'discount': 10, 'free_shipping': True, 'message_theme': 'new_arrivals'},
3: {'special_access': True, 'message_theme': 'exclusive_comeback'},
4: {'survey': True, 'small_incentive': True, 'message_theme': 'help_us_improve'},
}
def create_reactivation_email(self, user: dict, segment: int) -> dict:
"""Personalized reactivation email"""
offer = self.reactivation_offers.get(segment, {'discount': 10})
days_inactive = user.get('days_inactive', 90)
past_categories = user.get('top_categories', ['products'])
response = self.llm.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=300,
messages=[{
"role": "user",
"content": f"""Write a reactivation email for an inactive customer.
Customer: {user.get('first_name', 'Customer')}
Inactive for: {days_inactive} days
Past purchases: {', '.join(past_categories[:3])}
Offer: {offer}
Requirements:
- Subject line (engaging, personal, 50 chars max)
- Body (150 words max, warm tone, mention specific past interest)
- Clear CTA
Return JSON: {{"subject": "...", "body": "...", "cta": "..."}}"""
}]
)
try:
import json
return json.loads(response.content[0].text)
except Exception:
return {'subject': f"We miss you, {user.get('first_name', '')}!",
'body': response.content[0].text[:400], 'cta': 'Come Back'}
def predict_reactivation_probability(self, user: dict,
offer: dict) -> float:
"""Probability of reactivation with given offer"""
# Simplified heuristic (in reality, a trained model)
base_prob = 0.05 # Base probability
# Factors that increase probability
if user.get('total_orders', 0) > 5:
base_prob += 0.05 # Loyal customer
if user.get('days_inactive', 999) < 180:
base_prob += 0.08 # Recently left
if offer.get('discount', 0) >= 20:
base_prob += 0.06 # Good discount
if user.get('email_open_rate', 0) > 0.3:
base_prob += 0.04 # Opens emails
return min(base_prob, 0.4)
Conversion Table by Time Windows
| Inactivity Period | Average CRR | Recommended Offer |
|---|---|---|
| 0–90 days | 15–20% | Reminder + exclusive content |
| 90–180 days | 10–15% | Personalized discount 15–20% |
| 180–365 days | 5–10% | Strong offer (25%+ discount or free shipping) |
| > 365 days | 2–5% | Survey + small incentive (5% discount) |
What LLM Brings to Reactivation
LLMs (Large Language Models) generate personalized texts that consider each customer's purchase history and preferences. Instead of a generic "We miss you," the model creates an email mentioning a specific product or category the customer previously bought. This increases open rates (OR) by 20–40% and conversion rates (CRR) by 2–3 times compared to mass mailings. Additionally, LLMs interpret segments — automatically giving them names like "Price Skeptics" or "Forgotten Shoppers" — which simplifies strategy setup.
Comparison: Traditional vs AI Approach
| Criteria | Traditional Approach | AI Approach with LLM and ML |
|---|---|---|
| Segmentation | Single attribute (recency) | Multidimensional clustering + interpretation |
| Personalization | Template emails | Unique text generation per customer |
| Discount targeting | Uniform discount | Differentiated offer by segment |
| Setup time | 1–2 days | 2–3 weeks (initial), then automated |
| CRR on test sample | 3–5% | 12–20% |
Case Study: 12% Reactivation in One Month
One project involved an electronics e-commerce store with a database of 50,000 inactive customers. We implemented the described system, segmented customers into 6 groups, and generated personalized emails via the Claude API. Result: 12% returned within a month, with an average repeat purchase value of 3,500 rubles. Conversion was 3 times higher than in the previous campaign using template emails.
What's Included
- Database audit: analyze current data, identify gaps, recommend missing fields.
- Segmentation model development: feature selection, clustering, segment interpretation via LLM.
- Personalized email generator: integration with Anthropic/OpenAI, templates for different segments, A/B headline testing.
- Monitoring dashboard: metrics for CRR, ROI, CTR, OR. Automated reports.
- CRM integration: module to export segments and generated offers via REST/SOAP API.
- Team training: 2-hour session on campaign management and trigger setup.
- Result guarantee: first 3 months of support plus model adjustment to your data.
Timeline and Pricing
A basic version with one campaign can be launched in 2–3 weeks. Full turnkey implementation with multiple segments and integration takes 1 to 2 months. Pricing is calculated individually depending on database size and integration complexity. We'll evaluate your project within 1 day — just reach out.
Our track record:
Ready to test the system on your database? Request a demo — we'll show how segmentation works on your data. Get a consultation for your project — write to us.







