How Duplicate Customers Affect Shopify Customer Segments

By The Twinfold teamPublished Updated 9 min read
Short answer

Shopify customer segments test each customer profile against the filters on its own. When one buyer has two profiles, their orders, spend and tags are split, so filters such as number_of_orders and amount_spent miss them, the same person can sit in both a VIP and a first-time-buyer segment, and segment counts overstate how many people you're reaching.

Key takeaways
  • Shopify customer segments are rule-based lists that add and remove customer profiles automatically as each profile meets or stops meeting the filters.
  • Order and spend filters such as number_of_orders, amount_spent and orders_placed count only the orders on that one profile.
  • A buyer split across two profiles can appear in opposite segments at once, such as number_of_orders = 0 and a repeat-buyer segment.
  • Segment-based discounts identify customers at checkout by email address or phone number, so a shopper using the profile outside the segment isn't eligible.
  • When Shopify merges two profiles and only one was subscribed to email or SMS marketing, the merged profile is subscribed, which can change segment counts after a cleanup.

Duplicate customers affect Shopify customer segments because a segment checks each customer profile against its filters separately, with no idea that two profiles belong to one person. A buyer whose orders are split across two profiles can drop out of your repeat-buyer and VIP segments, show up in a first-time-buyer segment they shouldn't be in, and be counted twice in any segment both profiles match. The segment is working correctly; it's the customer list underneath that misleads it.

This guide covers which segment filters are most sensitive to duplicates, what that does to campaigns and discounts, and how to audit a segment you rely on.

How do Shopify customer segments work?

A Shopify segment is a saved query over your customer profiles. Shopify's help center describes segments as dynamic, rule-based lists, written in ShopifyQL, where customers are added or removed automatically depending on whether they meet the criteria. Every segment starts from the same locked query:

FROM customers
SHOW customer_name, note, subscription_status, location, orders, amount_spent
WHERE [filters, operators, values]

The important word is customers. Each row is one customer profile, and every filter in the WHERE clause is tested against that profile's own data: its orders, its tags, its addresses, its subscription status. Shopify adds that a customer who matches several segments is included in all of them, and that test orders and deleted orders are excluded from sales-based calculations.

You build segments in the editor on Customers or from Customers > Segments > Create segment, and you use them from the segment page with Use segment, which offers Email (through the Shopify Messaging app) and Discount. You can also export a segment with More actions > Export.

Nothing in that design compares profiles with each other. If the same person has two profiles, a segment sees two separate customers and judges each one on half the story.

Which segment filters do duplicates break?

The filters that count or date a customer's history are the most exposed, because a split profile holds only part of that history. Filters on fixed attributes, such as country or language, are less affected but can still double count. Here's how the main Shopify filters behave when one person has two profiles:

FilterWhat it checks on each profileEffect of a split buyer
number_of_ordersOrders placed on that profileEach profile shows fewer orders; repeat buyers fall below thresholds
amount_spentLifetime spend on that profileHigh spenders fall out of VIP thresholds
orders_placed (with count, sum_amount, date)Orders or spend in a date rangePurchases in the window are divided between profiles
first_order_dateDate of the profile's first orderThe newer profile looks like a recent first-time buyer
last_order_dateDate of the profile's latest orderThe older profile looks lapsed even though the person just bought
products_purchasedProducts bought on that profileCross-sell segments miss purchases made on the other profile
rfm_group, predicted_spend_tierScores built from recency, frequency and spendLoyal buyers land in weaker groups
customer_tagsTags on that profileA VIP or wholesale tag on one profile doesn't apply to the other
email_subscription_status, sms_subscription_statusConsent on that profileOne profile can be subscribed while the other isn't
customer_countries, customer_cities, customer_languageAttributes of that profileBoth profiles usually match, so the person is counted twice

The first group causes missed people. The last row causes inflated counts. Most stores have both at once.

What does a split customer look like in your segments?

The clearest way to see the problem is to follow one person. Take a coffee roaster with three segments it uses every month:

  • First-time buyers: number_of_orders = 1
  • Repeat buyers: number_of_orders >= 3
  • VIP: amount_spent >= 300

Sam has ordered six times and spent $360. The first four orders went to sam.lee@gmail.com. Then Sam checked out as a guest with samlee@gmail.com, which Gmail delivers to the same inbox but Shopify treats as a different email, and two more orders went to a new profile.

Profile AProfile BSam as one person
Orders426
Amount spent$240$120$360
Last order7 months agoLast weekLast week
First-time buyersNoNoNo
Repeat buyersYesNoYes
VIPNoNoYes

Sam belongs in the VIP segment and isn't in it. Sam is in the repeat-buyer segment once, through the old profile, which is the one that looks lapsed. If your win-back segment uses last_order_date < -90d, Profile A sits in that one too, so Sam gets a "we miss you" discount a week after ordering.

Change Profile B's history to a single order and it's worse: Sam lands in First-time buyers and gets a welcome series as well. The same person is now in a segment for new customers, a segment for lapsed customers, and missing from the segment for your best ones.

Our post on how duplicate customers skew lifetime value and repeat purchase reports shows the same split through RFM groups and cohort reports.

Why is my Shopify segment count too high?

Segment counts count profiles, not people. When both of a person's profiles match a filter, the segment shows two customers. Location, language and email domain filters are where this shows up most, because duplicates usually share those values. A customer_countries CONTAINS 'US' segment counts Sam twice.

Two other things make segment counts look off, and they aren't duplicates:

  • The count isn't live everywhere. Shopify says the count on the segments index updates when you open the segment's details page or when an app such as Shopify Messaging uses it. Hover over the count to see when it was last updated. On large stores, a segment can also take a moment to calculate after you run the query.
  • Not everyone in a segment can receive email. Shopify notes that only subscribed customers receive marketing emails, and that Shopify Messaging checks for valid email addresses, so there can be more customers in a segment than recipients of a campaign. When one person is subscribed under two addresses, they're two recipients; our guide to duplicate subscribers in Shopify Email covers that case.

Duplicates add to this in both directions. A person with two subscribed profiles under two different emails can be counted twice. A person whose subscribed profile falls outside the segment, while the unsubscribed one falls inside it, isn't reachable through that segment at all.

How do duplicates affect segment discounts?

Segment discounts are only as accurate as the profile the shopper checks out with. Shopify lets you limit a discount code or automatic discount to Customer segments in the Eligibility section (up to 100 segments for a code and 5 for an automatic discount). Shopify says these customers are identified when they check out using a valid email address or phone number.

That matters with duplicates:

  1. The right person, the wrong profile. Sam qualifies for the VIP code as one person, but neither profile is in the VIP segment, so the code doesn't apply at checkout with either email.
  2. The wrong offer applies. A first-order code limited to a number_of_orders = 0 segment, which is Shopify's own example, can be used by a returning customer who signs up with a new address, because that new profile really does have zero orders.
  3. Use limits follow the identifier. Limit to one per customer tracks a customer's email address or phone number. A shopper with two different emails can look like two customers to that limit.

None of this is Shopify misbehaving. Eligibility is checked against a profile, and the profile is incomplete.

How do you audit a segment for duplicates?

Export the segment, look up each row in a full customer export, and count the people who are split or missing. For a segment of a few hundred customers, this takes under an hour in a spreadsheet.

  1. Note the count. Open the segment from Customers > Segments and write down the customer count shown above the list.
  2. Export the segment. Click More actions > Export, choose the CSV format for spreadsheet programs, and click Export customers.
  3. Export everyone. From Customers > Export, export All customers. You need profiles outside the segment, because that's where the missing halves are. Our guide to exporting customers from Shopify covers the file and its columns.
  4. Build match keys. In both files, add a column with the email lowercased, any "+tag" removed, and dots removed before the @ for Gmail addresses. Add a second column with the phone number reduced to digits. Our post on Gmail dots and plus addresses explains why those variants matter.
  5. Find the other profiles. For each segment row, look up its keys in the full export. Any match with a different customer ID is a second profile for that person. Check name and address before you count it, since families and offices share emails and phones.
  6. Classify. Mark each person as counted twice (both profiles in the segment), split (one profile in, one out), or missing (would qualify with orders combined, but no single profile does). The missing group is the hardest to find, so also run the full export grouped by key and add up Total Orders and Total Spent for each group against your segment's thresholds.
  7. Decide. If the counts are small, note them and move on. If your VIP or win-back segment is noticeably wrong, clean up the duplicates before the next campaign.

Segment filters can help narrow the search. A segment such as number_of_orders = 1 AND customer_added_date >= -90d lists recent first-time profiles, which is where returning customers on a new email tend to show up.

Does merging duplicates fix segments?

Yes, without any extra work on the segments themselves. Because segments add and remove customers automatically as their data changes, a merge updates every segment the next time it's evaluated. Shopify's merge combines orders, addresses, tags, notes and more into the profile you keep. You start one from Customers > [customer] > More actions > Merge customer.

Expect a few changes after a cleanup:

  • Order and spend segments grow. Combined histories push people over thresholds like number_of_orders >= 3 and amount_spent >= 300.
  • First-time and win-back segments shrink. The recent "new" profile and the old "lapsed" profile become one recent repeat buyer.
  • Subscribed segments can grow. Shopify says that if a customer is subscribed to email and SMS marketing on one profile but not the other, the merged profile is subscribed. Check this against how each profile's consent was collected before you merge.
  • Attribute segments drop double counts. Location and language segments count the person once.

Two limits apply. Shopify merges can't be reversed, and Shopify refuses some profiles, including those with a subscription contract, a store credit account, a vaulted credit card or an active B2B company link. Our guide to why Shopify won't merge some customers lists every blocker. For the blocked pairs, a shared tag on both profiles is a workable stopgap for tag-based segments, though order and spend filters will stay split.

How Twinfold helps

If your audit turns up more split customers than you want to merge by hand, Twinfold can find and merge them in bulk. It's a Shopify app by NewClick, independent of Shopify. Scan for duplicates reads your whole customer list through Shopify's bulk export, and scanning is free on every plan.

The scan groups profiles by Email variant (lowercased, "+tag" removed, Gmail dots removed), Same phone and Same name and address, and rates each group High, Medium or Low confidence with the reason it matched. You choose the main profile, preview the merge with Shopify, and confirm; merges run through Shopify's own customer merge and can't be undone. Twinfold doesn't build or edit segments. It puts each person's orders and tags on one profile, and your segments recalculate from there.

A segment can only be as accurate as the customer list it filters. Clean the list, and the segments you already have start pointing at the right people.

Frequently asked questions

Do Shopify customer segments remove duplicate customers?

No. A segment is a filter over your customer profiles, not a deduplicated list of people. Shopify includes every profile that matches the filters, so two profiles for the same person both appear if both match, and neither appears if the person's orders are split so that each profile falls short.

Why is my Shopify segment count higher than the number of people I expect?

Duplicate profiles are one common reason, because the count is of profiles, not people. Shopify also notes that the count on the Segments page refreshes when you open the segment or an app uses it, and that marketing emails only reach subscribed customers with valid addresses, so the count and the number of recipients can differ.

Can a customer get a segment-only discount if their order history is on another profile?

Usually not. Shopify identifies segment-eligible customers when they check out with a valid email address or phone number. If the shopper checks out with the email of a profile that doesn't meet the segment's filters, Shopify treats them as that profile, and the discount isn't available to them.

Will merging duplicates change my existing segments?

Yes, automatically. Segments add and remove customers as their data changes, and a merge moves orders, tags and other data onto the kept profile. Expect order-based segments to gain some customers, first-time-buyer segments to shrink, and subscribed segments to change, because a merged profile is subscribed if either original was.

Sources

  1. Shopify Help Center: Customer segmentation
  2. Shopify Help Center: Managing customer segments
  3. Shopify Help Center: Shopify-based customer segment filters
  4. Shopify Help Center: Managing discounts
  5. Shopify Help Center: Managing customers (merging customer profiles)