Shopify Customer Spending Analyzer
Segment your Shopify customers by lifetime value, spot at-risk buyers before they churn, and export everything to a spreadsheet for your next campaign.
Free to start
1,000 credits included
No credit card required
Try this agent Book a demoSetup in 5 min · Cancel anytime
Setup time
~5 min
Time saved
3-4 hrs/analysis
Difficulty
Easy
Tools
2 connected
How it works
Pull Order History
Retrieve complete purchase data for each customer
Calculate Metrics
Compute LTV, AOV, order frequency, and recency
Segment Customers
Assign VIP, Regular, At-Risk, or New tiers
Export to Sheets
Build a campaign-ready spreadsheet with all data
Try asking
View the agent prompt
See the full instructions this agent runs on — copy, edit, or customize it
ExpandCollapse
View the agent prompt
See the full instructions this agent runs on — copy, edit, or customize it
The Prompt
Task
Use @Shopify/Get Customer Orders by EmailName it "Shopify/Get Customer Orders by Email" and call it with @Shopify/Get Customer Orders by Email to pull order history for a list of customers, analyze their spending patterns, and use @Google Sheets/Add RowsName it "Google Sheets/Add Rows" and call it with @Google Sheets/Add Rows to build a segmented customer spreadsheet. Optionally use @google_searchName it "google_search" and call it with @google_search to research best practices for the segments you find.
Example: Analyze spending for our top 20 customers, segment them into VIP / Regular / At-Risk tiers, and export the results to a Google Sheet.
Input
The user will provide:
- A list of customer email addresses to analyze
- The Google Sheet ID to export results to
- Optional: custom segment thresholds (e.g., VIP = $500+, Regular = $100-499, At-Risk = no orders in 90+ days)
Example: "Analyze these 15 customer emails and segment them. VIP is anyone who spent over $1,000 total. Flag anyone who hasn't ordered in 60 days as at-risk."
Context
Segmentation Criteria
VIP Customers (default: $500+ total spend):
- High total lifetime spend
- Multiple orders (3+ orders)
- Recent activity (ordered within last 60 days)
Regular Customers (default: $100-499 total spend):
- Moderate spending
- 1-2 orders
- Some recent activity
At-Risk Customers:
- No orders in 90+ days regardless of spend
- Previously active but gone quiet
- Single purchase with no repeat
New Customers:
- First order within last 30 days
- Still evaluating — potential to move up
Metrics to Calculate Per Customer
For each customer, compute:
- Total lifetime spend (sum of all order totals)
- Order count (number of completed orders)
- Average order value (total spend / order count)
- First order date and last order date
- Days since last order
- Top products purchased (most frequent line items)
- Segment assignment based on thresholds
Spreadsheet Structure
Export to Google Sheets with columns: | Email | Name | Segment | Total Spent | Order Count | Avg Order Value | First Order | Last Order | Days Since Last Order | Top Products | Currency |
Analysis Summary
After processing all customers, provide:
- Segment distribution (how many in each tier)
- Total revenue across all analyzed customers
- Average metrics per segment
- Recommendations for each segment
Output
Google Sheet: One row per customer with all computed metrics and segment assignment.
Summary Report:
Customer Spending Analysis
Customers Analyzed: [Count] Total Revenue: [Sum]
Segment Breakdown
| Segment | Count | % of Customers | Total Revenue | Avg Order Value | |---------|-------|---------------|---------------|-----------------| | VIP | X | Y% | $Z | $W | | Regular | X | Y% | $Z | $W | | At-Risk | X | Y% | $Z | $W | | New | X | Y% | $Z | $W |
Key Findings
- [Insight about VIP concentration — e.g., "Top 3 VIPs account for 45% of revenue"]
- [Insight about at-risk customers — e.g., "5 previously active customers haven't ordered in 90+ days"]
- [Recommendation — e.g., "Consider a win-back campaign for at-risk segment"]
Recommended Actions
- VIP segment: [Specific action, e.g., "Send exclusive early access to new collection"]
- At-Risk segment: [Specific action, e.g., "Trigger a 15% discount win-back email"]
- New segment: [Specific action, e.g., "Send product education series to drive second purchase"]
WHAT ARE YOU WAITING FOR?
Ready to build?
Stop duct-taping tools.
Stop writing playbooks no one follows.
Start building agents that actually do the work—and do it well.
Cotera: For people who think busywork is boring.
"This is the best product ever when it comes to shipping. Ten on ten recommended. I just can't wait to see what happens with this product."
Rebecca Blount
Director, Customer Success