Ecommerce Development
08 min read

build Shopify AI customer segmentation by starting with a commercial decision, creating trustworthy behavioural features from Shopify customer and order data, defining a transparent rule-based baseline, and applying predictive or clustering models only where they improve that decision. Activate segments through consented channels, hold out a comparable control group, measure incremental contribution rather than campaign revenue, and monitor drift, eligibility, privacy and customer experience.
AI does not create value because it produces more segments. It creates value when a segment changes an action: which customer receives which message, offer, service level, product recommendation, replenishment reminder or suppression. A model that predicts perfectly but does not alter a profitable decision is analytical decoration. A simple segment that reliably changes treatment and earns incremental contribution is more valuable.
What Shopify already provides
Shopify customer segments are dynamic rule-based lists. Merchants can use ShopifyQL filters, operators, values and connectors, and customers are automatically added or removed when they meet or stop meeting the criteria. Segments can support marketing, discounts and analysis. Shopify’s current documentation also describes predicted spend tiers for eligible stores and notes that this prediction uses purchase recency, frequency, order count and average spending relative to the store.
Use native segmentation as the baseline before building custom AI. It provides transparent logic, operates close to commerce data and is easier for marketers to audit. Custom models become appropriate when the business needs a prediction or grouping that native rules cannot express reliably—for example, expected replenishment date, product-category propensity, return risk, churn risk or next-best action.
Begin with the decision, not the algorithm
Write a decision brief containing the business objective, eligible population, treatment, comparison, channel, timing, owner, customer safeguard and success metric. “Predict churn” is incomplete. “Among consented customers with at least two fulfilled orders, identify those whose repurchase probability has fallen enough to justify a service-led reactivation message within seven days” is actionable.
Define what happens when the model is uncertain. The default may be no message, a generic experience or a low-risk informational treatment. Do not let a probability score automatically create a discount. Discounts change contribution, teach purchase behaviour and can reach customers who would have bought without one.
A practical segment portfolio
Lifecycle
New subscriber, first-time buyer, second-order candidate, active repeat customer, lapsing customer and reactivated customer. Define each state from observable events and category purchase cycles. A 45-day gap may indicate churn in consumables but normal behaviour in durable goods.
Value
Use realised contribution where possible, not revenue alone. A high-spend customer with high returns, service costs or discount dependence may be less valuable than a smaller full-price customer. Shopify predicted spend tier can be a useful native signal for qualifying stores, but it should be evaluated within the merchant’s economics.
Affinity
Group customers by categories, use cases, ingredients, style, price band or replenishment pattern. Affinity should change merchandising or content. Avoid segments so narrow that campaign volume and measurement become unreliable.
Intent
Use recent browsing, search, cart, checkout, back-in-stock or engagement events where collection and consent allow. Intent decays quickly. Store event time and define an expiry rather than leaving a customer permanently labelled as interested.
Risk and service
Returns, delivery exceptions, negative support interactions and product incompatibility can identify customers who need assistance or suppression. Do not use risk labels to reduce legitimate support or unfairly disadvantage customers. Review sensitive and consequential uses with qualified privacy and legal advisers.
CTA: Project Supply’s AI and Data Analytics team can turn Shopify commerce data into governed segment definitions, model features and incremental-value measurement.
Data foundation
Customer identity
Decide how customer profiles, guest checkouts, email addresses, phone numbers, accounts and offline records are reconciled. Record confidence and source. Do not merge people merely because an identifier appears similar. Shared addresses, recycled phone numbers and household purchasing can create incorrect profiles.
Order state
Use fulfilled, cancelled, refunded and returned outcomes correctly. Test orders and deleted orders are excluded from Shopify segmentation calculations according to Shopify’s documentation. Custom pipelines must also exclude non-commercial activity and distinguish order creation from retained revenue.
Product taxonomy
Map products and variants to stable categories, use cases and replenishment groups. Product names and collections change; model features should rely on governed identifiers. Preserve historical mappings when taxonomy evolves so training and reporting remain interpretable.
Consent and contactability
Segment membership is not permission to contact. Shopify notes that only subscribed customers with valid email addresses receive email campaigns sent through its messaging tools. Maintain channel-specific consent, jurisdiction, suppression, deliverability and frequency rules at activation time.
Time and leakage
Every feature must be computed using information available at the decision time. A churn model cannot use a later return or purchase when training. Split training and evaluation by time, not only by random rows, to approximate future operation.
Feature engineering
Start with interpretable features: days since last retained order, orders in a time window, net amount spent, average retained order value, category mix, full-price share, discount share, return rate, average reorder interval, days relative to expected replenishment, engagement recency and service-contact signals. Use customer tenure so new customers are not compared unfairly with long-established customers.
Separate missing from zero. A customer with no observed browsing data is not necessarily uninterested; tracking or consent may be absent. Cap extreme values or use robust transforms where appropriate. Document feature definition, source, update cadence, owner and permitted use.
Rule-based RFM baseline
Recency, frequency and monetary segmentation provides a useful baseline. Define monetary value from net retained revenue or contribution if available. Use thresholds derived from category cycles and distribution, then name segments by action rather than score combinations: recent high-value buyer, new promising buyer, lapsing repeat buyer or dormant low-evidence customer.
A baseline matters because custom AI must beat it on incremental business value, not only model metrics. Run the same treatment with RFM and model-based selection. If AI does not improve lift, reach, stability or operating effort, retain the simpler system.
Predictive modelling options
Propensity
Estimate the probability of a defined action within a defined horizon, such as purchase from a category within 30 days. Train on past decision snapshots. Evaluate calibration and lift across score bands, not accuracy alone.
Churn or lapse
Define lapse relative to a category’s expected purchase cycle. For non-contractual commerce, churn is not directly observed, so label definitions materially shape the model. Use interventions that help customers rather than defaulting to price reductions.
Replenishment timing
Estimate when a customer is likely to need the product again. Account for quantity, bundle size, returns, subscriptions and household purchasing. Measure whether reminders improve incremental orders without increasing unsubscribes.
Customer lifetime value
CLV is a forecast with uncertainty, not a fact. State horizon, margin treatment, acquisition inclusion and survival assumptions. Do not spend against a long-term prediction before validating realised cohorts.
Clustering
Unsupervised clusters can reveal patterns but often produce unstable or unactionable groups. Standardise features, test stability over time and require each cluster to have a distinct treatment. If marketers cannot explain or use it, do not operationalise it.
Model evaluation
Use ranking metrics such as precision and recall at the reachable campaign size, lift by decile, calibration and coverage. Add business simulation: expected contribution from treatment minus discount, messaging, service and fulfilment costs. Evaluate by market, acquisition source, customer tenure and relevant product groups to reveal uneven behaviour.
Prediction quality does not prove treatment effect. A model may identify customers likely to purchase anyway. Use randomised holdouts within eligible score bands. Compare incremental retained contribution, order rate, average order value, returns, unsubscribe, complaint and repeat behaviour.
CTA: If your current segments report campaign revenue but not incremental value, contact Project Supply for a segmentation experiment and measurement redesign.
Activation architecture
Choose a system of record for each segment. Native Shopify segments can update automatically from ShopifyQL rules. Custom scores may be written to governed customer metafields or synchronised to an activation platform, subject to current API and app capabilities. Store model version, score date and expiry; never leave a stale score active indefinitely.
At send or decision time, intersect model eligibility with current consent, contact validity, product availability, market, recent purchase, frequency cap, customer-service suppression and experiment assignment. This final eligibility layer prevents a correct model from creating an inappropriate experience.
Email and messaging
Match content to the reason for selection. A replenishment message should reference use timing; a second-order message should reduce uncertainty; a high-value service treatment should recognise loyalty without exposing a hidden score. Shopify Messaging can send to selected native segments, while only eligible subscribers receive the email.
On-site personalisation
Use broad, safe changes such as ordering relevant categories or continuing a known journey. Maintain a coherent default and avoid surprising price differences. Personalisation must not break caching, page speed or accessibility.
Paid media
Use consented, permitted audiences and platform controls. Suppress recent purchasers where appropriate and measure through incrementality rather than platform attribution alone. Do not export sensitive inferred attributes.
Service interventions
Some segments should trigger help, not marketing: product education after a complex purchase, delivery recovery or fit assistance after an exchange. Assign operational capacity before activating the segment.
Governance and privacy
Create a segment registry with name, purpose, owner, rule or model, data sources, lawful and consent basis as advised, channels, exclusions, expiry, experiment and review date. Restrict access and log material changes. Avoid sensitive attributes and proxies unless a clearly justified, reviewed use exists.
Provide mechanisms to honour deletion, correction, opt-out and data-access obligations. Verify vendor retention and subprocessor arrangements. Customer segmentation requirements vary by country and use; obtain qualified legal and privacy advice.
Monitoring
Monitor segment size, entry and exit rates, score distribution, feature freshness, missing data, consent coverage and activation volume. Sudden changes can reflect tracking failures, catalogue migrations or model drift rather than customer behaviour.
Track performance and customer outcomes by model version. Set rollback conditions for lost lift, reduced calibration, excessive complaints, unsubscribes, returns or margin erosion. Re-training should follow evidence of drift and a controlled release process, not an automatic calendar alone.
Commercial decision framework
Use native rules when
The behaviour is directly expressible, transparency matters, volume is limited or there is no reliable outcome history. Examples include subscribed repeat buyers, recent category purchasers and customers with no order in a defined period.
Use custom AI when
The decision depends on many interacting signals, enough historical examples exist, the treatment has material value, and the organisation can run holdouts and governance.
Do not segment when
The action would be the same for everyone, segment volume is too small, data is unreliable, consent is absent or no team owns treatment. More precise selection cannot repair an irrelevant offer.
90-day implementation roadmap
Days 1–15: decision and data audit
Select one use case, define economics and safeguards, map Shopify data, consent and identity, and baseline the current outcome.
Days 16–30: native baseline
Create transparent ShopifyQL or RFM segments, validate membership and run an initial controlled campaign with a holdout.
Days 31–60: model proof
Build time-correct features, train an interpretable challenger, evaluate lift and calibration, and simulate contribution at operational capacity.
Days 61–75: controlled activation
Write scores with version and expiry, apply eligibility and consent, randomise holdouts and release to a limited population.
Days 76–90: decision
Measure incremental retained contribution and customer guardrails. Scale, revise or retire the model based on evidence and document the result.
Project Supply can build the data model, segmentation logic, predictive challenger and activation measurement through its AI and Data Analytics services.
FAQs
Web Personalisation
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
UI and UX Design
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Search Engine Optimisation
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
CRM and ERP Solutions
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Ecommerce
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Email Marketing
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Marketing Automation
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Chatbots and Conversational AI
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Chatbots and Conversational AI
Framer is a design tool that allows you to design websites on a freeform canvas, and then publish them as websites with a single click.
Related Blogs
We know your space
Explore our latest UI/UX Case Studies that showcase how our process-driven creativity transforms complex ideas into real, measurable business results, step by step.



