Chủ doanh nghiệp nhỏ phân tích hành vi khách hàng bằng AI trên laptop với biểu đồ phân khúc khách hàng
  • Post author:
  • Post published:28/11/2026
  • Post category:Tổng hợp
  • Reading time:13 mins read

Your shop has thousands of orders sitting in a spreadsheet, in a CRM, in Shopify — but do you know which customers will buy again next month, which ones are quietly drifting away, and which ones deserve special care? Analyzing customer behavior with AI turns that pile of order data into decisions: who to keep, who to win back, and what to say to each group. This guide walks you through it in 6 steps, with no data scientist required.

One note up front: this post is about customer purchase behavior, taken from order and CRM data. It is different from analyzing behavior on your website (heatmaps, session recordings), which our comparison of AI website behavior analytics tools covered. The two complement each other, but the data and the tools are completely different.

A few numbers to show why this is worth doing right now in 2026. According to a synthesis of churn-prediction sources from October 2026, a customer counts as at risk when the gap between two consecutive orders grows to 1.5 times their usual buying gap, and as churned when it reaches about 2 times (Polar Analytics, Omniconvert, and Darkroom all use these thresholds). The same sources report that a simple three-tier RFM score built from order history alone is enough to start — no complex model needed — and one beauty brand raised email revenue 34% in two months just by splitting messages by buying behavior (Balistro). On the tooling side, Klaviyo says its predicted customer lifetime value (CLV) and churn-risk features need at least 500 customers with orders, 180 days of order history, and repeat buyers — and that the predicted next order date is usually more useful than the churn percentage when choosing who to email. In short: the data you already have is enough, as long as you use it the right way.

Step 1: Gather 12 months of order data

Every customer behavior analysis starts with a clean order table. Export the last 12 months from wherever you sell — Shopify, WooCommerce, or a CRM like HubSpot. Each row is one order, with at least 4 columns: customer name or ID, purchase date, amount, and products bought. If customers buy through several channels (website, Facebook, physical store), merge them under a single customer ID — one phone number or one email is enough to identify them.

Do not worry about missing data: if 10% of customers lack a phone number, you can still analyze the other 90%. What you must avoid is duplicate data — the same customer under two different IDs will skew every score in step 2. Spend an afternoon cleaning up: merge duplicates, delete cancelled orders, and standardize date formats.

Bảng lịch sử đơn hàng và điểm RFM của khách hàng trên màn hình laptop

Step 2: Score every customer with RFM

RFM is the simplest way to score buying behavior that still works: Recency (how recently they bought), Frequency (how often they buy), Monetary (how much they spend). Score each letter 1–3, and every customer ends up with a score from 111 (has not bought in a long time, buys rarely, spends little) to 333 (bought recently, buys often, spends a lot).

Let AI do the math for you. Paste your order table into ChatGPT, Claude, or Gemini with this prompt:

“Here is my shop’s 12-month order table (columns: customer ID, purchase date, amount). Please calculate an RFM score for each customer: R by days since the most recent purchase, F by number of orders in 12 months, M by total spend — each criterion split into 3 equal tiers. Return a table with customer ID, R, F, M, and total score. Use only the data in the table, do not invent anything.”

Sanity-check the result by eye: a customer who bought last week should have a high R, a customer who bought once 11 months ago should have a low R. If the AI scores something wrong, restate the tiers more precisely — for example, R = 3 if they bought within 30 days, R = 2 if within 31–90 days, R = 1 if longer than 90 days. Adjust these thresholds to your product’s buying cycle: a cosmetics shop with monthly purchases is different from a furniture shop where customers buy once every few years.

Step 3: Split customers into 5 groups

From the RFM scores, your customers naturally fall into 5 groups. Each group needs different treatment — that is the whole point of the analysis:

  • Champions (333, 332): bought recently, buy often, spend a lot. This is a small group but it drives most of your revenue. Keep them with VIP perks, early access to new products, and referral invitations.
  • Loyal customers (323, 233): buy steadily, decent value. They need a reminder at the right time, not a deep discount.
  • New customers (3xx with F = 1): just bought for the first time. The goal is a second purchase within 30 days — the second purchase is when a buyer starts becoming a regular.
  • At-risk customers (R = 1, high F): used to buy a lot but have not come back in a while. This is the group most worth saving: they already like your products, they just need a reason to return.
  • Churned customers (111, 112): buy rarely and have not bought in a long time. Do not burn ad budget on this group — one gentle reminder email is enough, and if they do not respond, let them go.

Write these 5 groups into a table with customer counts and total revenue per group. You will be surprised: usually only 10–20% of customers drive more than half of revenue, and the at-risk group is usually bigger than you think.

Bảng điều khiển AI hiển thị các nhóm khách hàng và cảnh báo khách có nguy cơ rời bỏ

Step 4: Spot the early signs of churn

RFM tells you whether a customer has already churned. But you want to know beforehand — before they leave. There are 4 early signals AI can scan from data you already have:

  • The gap between orders is growing: a customer who used to buy every 30 days has not bought in 45 days — exactly the 1.5x threshold churn-prediction sources recommend. This is the strongest signal.
  • They stopped opening emails and clicking ads: a customer who used to open 8 out of 10 emails has ignored the last 5. They are losing interest, even if they have not left yet.
  • Order value is shrinking: from buying big bundles to buying one cheap item — the customer is trying a competitor, or their budget is tightening.
  • A recent complaint or low rating: one badly handled experience is the fastest cause of churn. Fix this group before sending any offer.

Ask AI to scan for you: “Based on this order table and email open history, list the 20 customers with the highest churn risk, with a specific reason for each (order gap, unopened emails, most recent order value). Use only the data in the table.” These 20 people are your to-do list for next week.

Step 5: Let AI write one action per group

Analysis without action is just a pretty report. For each group from step 3, ask AI to write one concrete action — just one per group, so you can actually do it this week:

  • Champions: a personal thank-you note + early access to new products. Sample prompt: “Write a thank-you email for my 20 best customers, in a warm tone as if the shop owner wrote it by hand, mentioning the products they bought, inviting them to preview the new collection, no discount.”
  • Loyal customers: a reorder reminder on their usual cycle — send the email 3 days before they normally buy again, suggesting the exact products they usually buy.
  • New customers: a how-to-use email for the product they bought + an incentive for a second purchase within 30 days. The single goal: the second purchase.
  • At-risk customers: a check-in email asking why — “We haven’t seen you in a while, did we do something wrong?” — with a small offer. This group answers surveys more than you would expect, and their answers are your most valuable data.
  • Churned customers: one single email after 60 days of silence, then stop. Do not send more — more emails only get you marked as spam.

The golden rule: each email speaks to one group, about one thing, with one call to action. An email sent to everyone is an email nobody reads.

Hai đồng nghiệp cùng xem biểu đồ hành vi mua hàng của khách tại quầy cửa hàng

Step 6: Measure again every month with 3 metrics

Customer behavior analysis is not a one-time job. At the end of each month, measure 3 metrics and compare them with the previous month:

  • Repeat purchase rate: customers buying for the second time or more, divided by all customers who bought that month. Rising means step 5 is working.
  • Churn rate: customers who passed 2 times their usual buying gap without returning, divided by all customers. Falling means the step 4 signals are being handled in time.
  • Customer lifetime value (CLV): average order value times average purchases per year times the number of years a customer stays. This is the final number that tells you whether retention is actually profitable.

Keep these 3 numbers in a monthly tracking table. After 3 months you will see a clear trend: which group is growing, which is shrinking, and which action is worth continuing. If the repeat purchase rate does not move after 2 months, the problem is usually not the email — it is the product or the buying experience, and that is what needs fixing before you send another email.

Điện thoại hiển thị email giữ chân khách hàng đang được soạn trên bàn làm việc

Tool picker: choose by your needs

You do not need to buy a new tool to start — an order table and an AI chatbot are enough for steps 1–3. When you have thousands of customers and want automated predictions, the 5 tools below are the ones comparison roundups updated in October–November 2026 mention most often. All of them are still active in 2026; this post lists no prices because pricing changes by plan and over time.

ToolBest fit whenBehavior-analysis strength
KlaviyoYour shop runs on Shopify or WooCommercePredicts CLV, churn risk, and next order date; builds segments in plain language
HubSpot Marketing HubYour sales team already lives in a CRMSegments customers inside the CRM, tied to sales workflows and email
MoEngageA mobile app needs real-time analysisReal-time RFM, predictive cohorts, send-time optimization
PushwooshSmall budget, want to start fastRFM wizard and AI segment builder, multi-channel messaging from one place
MixpanelA product team needs event-level insightFunnel analysis, behavioral cohorts, AI anomaly detection

How to choose: selling on Shopify, start with Klaviyo; already using a CRM, use HubSpot; customers mostly on mobile, look at MoEngage; near-zero budget, try Pushwoosh; and if you want to understand why customers abandon carts or stop at a step inside your app, Mixpanel is the right pick. One tool that does one job well beats three overlapping tools.

5 common mistakes

1. Analyzing before you have enough data. With fewer than 500 customers who have ordered, CLV and churn predictions are unreliable — Klaviyo states this threshold openly. For a small shop, use manual RFM scoring instead of trusting AI predictions.

2. Using a default 180-day threshold for every product. A 180-day no-purchase threshold only fits products bought every few months. For a shop selling monthly consumables, waiting 180 days to call a customer churned means you are already half a year too late — set the threshold to your product’s real buying cycle.

3. Looking only at revenue and ignoring frequency. A customer who spent a lot once and vanished is not as valuable as a customer who spends a little every month for two years. High M with low F is a one-time buyer, not a loyal customer — do not spend your retention budget on the wrong people.

4. Sending the same offer to every group. A 20% discount sent to champions is wasted (they would buy anyway); sent to churned customers it is useless (they do not open the email). Each group needs its own message, and the at-risk group is the one that most deserves an offer.

5. Analyzing once and stopping. Customer groups change every month: new customers become regulars, regulars become at-risk. Without a monthly re-measure, your segmentation table is only correct on the day you made it.

Frequently Asked Questions

1. How much data do I need to analyze customer behavior?
At least a few hundred customers and 6–12 months of order history. For Klaviyo’s CLV and churn-risk predictions, the published threshold is 500 customers with orders and 180 days of history. Below that, manual RFM scoring is still accurate and costs nothing.

2. How is customer behavior analysis different from website behavior analysis?
Customer behavior analysis uses purchase and CRM data: who buys, how much, how often they return. Website behavior analysis uses heatmaps and session recordings: where visitors click and where they stop on the page. The two use completely different data and tools — our comparison of AI website behavior analytics tools covered the second group.

3. What is RFM, and why are three letters enough?
RFM is Recency (how recently they bought), Frequency (how often they buy), and Monetary (how much they spend). These three numbers are enough to split customers into groups and know which group needs keeping and which needs winning back — no complex model required to start.

4. How long without buying counts as churned?
The practical rule from several 2026 sources: a customer is at risk when the gap between orders reaches 1.5 times their usual buying gap, and churned at about 2 times. But this must follow your product’s buying cycle — monthly cosmetics are different from furniture bought once every few years.

5. Does a small shop need to hire a data specialist?
No. A three-tier RFM score can be built from an order table in 1–2 weeks with no machine learning model, and tools like Klaviyo and HubSpot already include predictions. You only need clean data and a monthly re-measure.

6. How often should I analyze again?
Every month. Customer groups keep changing: new customers become regulars, regulars become at-risk. Measure 3 metrics at the end of each month — repeat purchase rate, churn rate, and customer lifetime value — and compare them with the previous month to see which actions are working.

Conclusion

Analyzing customer behavior with AI is not just for big companies. With a clean order table, a three-tier RFM score, and 5 clear customer groups, any small shop can know who to keep, who to save, and what to say to each person. Start with step 1 today: export 12 months of orders, calculate RFM, and send the first email to your 20 highest-risk customers. Then read our guide to market research with AI to understand potential customers before they buy, use the 90-day AI sales plan template to turn that understanding into a concrete weekly schedule, and see the 30-day AI customer care plan template to keep customers after they come back.