Customer lifetime value
“from the shopify orders export, match orders by customer name and show each customer’s total spend, order count, first and last order date, and average order value; skip refunded and zero-dollar orders”
From the Shopify orders export, match orders by customer name and show each customer’s total spend, order count, first and last order date, and average order value; skip refunded and zero-dollar orders, grouping by customer email.
What the agent built
1 step, each one an ordinary Mammoth step you can open and change.
- FileShopify orders exportCSV export · 24 rows
- StepSummarize customer ordersStep 1
- ResultCustomer Spend Summary9 rows
- ScheduleRuns when you sayProposed
Checked on the sample files: every step ran, 9 rows came out.
- Download Shopify orders export sample (24 rows)Shopify admin: Orders > Export > Current page as CSV
What you get back
The result of that run, the rows to look at first.
| Customer email | Total spend | Order count | First order date | Last order date | Average order value |
|---|---|---|---|---|---|
| ava@northstarstudio.com | 358 | 4 | 2026-09-18 | 2026-11-08 | 89.50 |
| ben@lumenbakes.com | 229 | 4 | 2026-09-19 | 2026-11-09 | 57.25 |
| cara@pinegrovehome.com | 336 | 3 | 2026-09-22 | 2026-11-03 | 112 |
| drew@orbitgear.co | 64 | 1 | 2026-09-24 | 2026-09-24 | 64 |
| ella@harborlane.co | 243 | 2 | 2026-09-30 | 2026-10-25 | 121.50 |
| finn@clayfieldgoods.com | 593 | 3 | 2026-10-05 | 2026-11-11 | 197.67 |
| gina@moontidepress.com | 161 | 2 | 2026-10-08 | 2026-11-04 | 80.50 |
| hugo@greenlinepet.com | 90 | 2 | 2026-10-15 | 2026-11-07 | 45 |
| ivy@foxtrailcoffee.com | 33 | 1 | 2026-10-28 | 2026-10-28 | 33 |
How do you calculate customer lifetime value from Shopify orders?
Export your Shopify orders, then group rows by customer email. Sum each customer’s spend, count their orders, and show their first and last order date plus average order value. Skip refunded and zero-dollar orders so the summary only uses paid orders.
How it works
How to use the Customer Spend Summary workflow
- 1Get early accessWe invite people in small batches, job by job. You'll land on this workflow, already built and checked on the sample files.
- 2Swap in your exportsUpload your own files as they come out of your tools. The agent checks the workflow on your rows.
- 3Change it in words, then turn it onSay what to change and see the new result before anything saves. Then choose when it runs.
Customer Spend Summary: questions
Which export should you use?
What happens to orders that do not match a customer?
How do you change the calculation rules?
Get early access to this workflow
It will open already built and checked on the sample files. Swap in your own exports and see your result.
Workflows like this
Cohorts, churn, repeat purchases, retention, RFM segments and recurring revenue, from your orders or payments.
- Customer lifetime value by cohortWork out customer lifetime value by signup month cohort from Shopify customers and orders exports, with revenue per customer and average order count.See the workflow Built by the agent
- Cohort retentionEach month's new customers, and the share still buying 1, 2, 3… months laterSee the workflow Template
- ARPU by monthCalculate average revenue per user each month from Stripe invoices and active customers.See the workflow Built by the agent
- RFM segmentsEvery customer scored 1-5 on recency, frequency and spend, with a segmentSee the workflow Template
- Net revenue retentionNet and gross revenue retention for every monthSee the workflow Template
- Repeat purchase rateEach month's new customers and the share who ordered again within 90 daysSee the workflow Template