Add a customer to a segment in Shopify
A customer segment is a rule, not a list you fill in by hand. Shopify adds a customer to a segment when that customer matches the segment rule, and removes them when they stop matching. This tutorial puts one customer, Maya Chen, into the VIP segment by adding the tag the segment rule looks for, then checks the segment count moved.
Written · Shopify admin, desktop steps · 6 minutes read
The worked example
| Segment | VIP, built on customer_tags CONTAINS 'vip' |
| Customer added | Maya Chen |
| Segment before | 23 customers, 16.43% of the store |
| Segment after | 24 customers, 17.14% of the store |
| Store total | 140 customers |
Download the record: segment-membership-record.csv (204 bytes).
A segment membership record for the worked example. Maya Chen is tagged vip and is a segment member; the five rows sum to 15 orders and $1,829.50 spent, with 3 VIP members.
1Open the segment and read its rule
From your Shopify admin, go to Customers, then click Segments. Click the VIP segment to open its details page. Read the query in the editor: the VIP segment is built on the rule customer_tags CONTAINS 'vip', so a customer joins it by carrying the vip tag. The query editor shows the number of matching customers above the editor.
2Check the count before you change anything
Click Run query in the editor and read the count above it. In the worked example the VIP segment holds 23 customers out of 140 in the store. Search the list below the editor for Maya Chen and confirm she is not in it yet, so the change you are about to make is the one that moves the count.
3Open the customer page
From your Shopify admin, go to Customers and click Maya Chen to open her customer page. Work from the customer page, not from the segment page, because the tag lives on the customer profile.
4Add the vip tag
In the Tags section of the customer page, click the field and select vip. If the tag does not exist yet, type vip and it is created for future use. Click Save. Tags are not case-sensitive, so VIP and vip are the same tag.
5Go back and run the segment again
Go to Customers, click Segments, and open the VIP segment again. Click Run query to update the segment with the change. The count above the editor now reads 24 customers.
6Check the customer is in the list
Read the list of customers below the editor and confirm Maya Chen is in it. The count on the segments index is updated when you view the segment by going to the segment details page, so open the details page and read the count there rather than trusting the index list.
7If the segment is not built on a tag, change the rule instead
A tag only moves a customer into a segment whose rule looks for that tag. If your segment is built on amount spent or order history, tagging the customer changes nothing. Open the segment, change the filter in the query editor to one the customer matches, click Run query to test it, review the list, and then click Save segment.
The arithmetic
| Segment | Customers | Share of store |
|---|---|---|
| VIP, before tagging | 23 | 16.43% |
| VIP, after tagging | 24 | 17.14% |
| Rest of the store | 116 | 82.86% |
| Store total | 140 | 100.00% |
Adding one customer moves the VIP segment from 23 to 24 customers, a rise of 1 customer. 24 divided by 140 is 17.14%, against 16.43% before. The three VIP customers in the record file spent $1,624.75 of the $1,829.50 total, which is 88.81%. Average spend is $541.58 per VIP customer and $102.38 per customer outside the segment.
Held at the counter
There is no Add customer button on a segment. Segments are rule-based lists. New customers who match the criteria are automatically included, and when an existing customer no longer matches, they are automatically removed. If the customer disappears from the segment later, check whether they still match the rule before assuming the tag was lost.
A tag only helps a tag-based segment. Tagging a customer changes nothing for a segment built on amount spent, order count, or location. Read the segment rule first; if the rule does not mention a tag, the fix is to edit the rule, not to add a tag.
The index count can be out of date. The count on the segments index is updated when you view the segment by going to the segment details page, or when an app uses the segment. After tagging, open the segment details page and run the query instead of reading the index number.
Sources
- Managing customer segments — Shopify's help pages: the automatic inclusion and removal rule, the segments index count, and editing a segment.
- Creating customer segments — Shopify's help pages: the ShopifyQL query editor, the WHERE clause, Run query, and Save segment.
- Managing customers — Shopify's help pages: tags on a customer profile, the Tags section steps, and tags not being case-sensitive.