📊

Customer Classifier

Categorize customers into groups (VIP, Potential, Churn Risk) based on their purchase history using simple logic or AI.

Excel ⭐⭐ Intermediate ⏱️ 5 minutes

😫 The Pain Point

You have a sales Excel file. You want to send a “Thank You” gift to customers who spent over $5000, and a “Discount Code” to those who haven’t bought anything in 6 months. Filtering manually in Excel is tedious and prone to errors.

🚀 Agentic Solution

Automated Classification: Apply business rules to segment 10,000 customers in seconds.

Key Features:

  • RFM Analysis: Classifies based on Recency (Last buy), Frequency (Count), and Monetary (Total spend).
  • Tagging: Adds a “Segment” column to your Excel file.

⚔️ Phase 1: Commander (Quick Fix)

For a one-time segmentation.

Prompt:

“I have sales.xlsx with ‘Customer’, ‘Amount’, and ‘Date’. Calculate total spending per customer. If Total > 5000, label them ‘VIP’. If Total > 1000, label ‘Regular’. Otherwise ‘New’. Save the result to segmented_customers.xlsx.”

Result: A tagged customer list.

🏗️ Phase 2: Architect (Permanent Tool)

For Marketing Managers.

Engineering Prompt:

**Role:** Python Data Analyst
**Task:** Create a "Customer Segmentation App".
**Requirements:**
1.  **GUI:**
    *   Select Sales Data File.
    *   Input Thresholds: e.g., VIP Limit ($), Risk Days (days since last buy).
    *   "Segment" button.
2.  **Logic:**
    *   Group by Customer ID.
    *   Calculate Sum(Amount) and Max(Date).
    *   Apply conditional logic to assign tags: 'VIP', 'Loyal', 'At Risk', 'Lost'.
    *   Export Report.
3.  **Deliverables:** `classifier.py`, `run.bat` (Windows), `run.sh` (Mac).

🧠 Prompt Decoding

  • RFM Model: This is the gold standard in retail marketing. Even a simple Python script implementing RFM is more powerful than hours of looking at spreadsheets.

🛠️ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Load Sales Data -> Segment.

Related Workflows

Explore other categories

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.