Skip to main content

What are Data Rules?

Understand how Data Rules control which products appear in your widgets

Tom Nipravsky avatar
Written by Tom Nipravsky
Updated over a month ago

Data Rules are the brain behind your widgets. They determine which products to show, when to show them, and to whom. Without Data Rules, widgets would just show random products—with them, you show the right products at the right time.

How Data Rules Work

Every widget connects to one or more Data Rules. Each rule has three parts:

  1. Conditions - When should this rule apply?

  2. Actions - What products should we show?

  3. Widget Overrides - How should the widget look when this rule applies?

Think of it like this:

"WHEN a customer's cart is over $100, SHOW premium accessories, AND change the title to 'Complete Your Look'"

Why Data Rules Matter

Without Data Rules

  • Show random products

  • Same products for every visitor

  • No relevance to what they're browsing

  • Low engagement and conversions

With Data Rules

  • Show products relevant to current context

  • Different products for different situations

  • Personalized to customer behavior

  • Higher engagement and conversions

Types of Conditions

Conditions are organized into categories:

Customer Conditions

Based on logged-in customer data:

  • Is Logged In - Customer has an account and is signed in

  • Customer Tags - Customer has specific Shopify tags

  • Purchased Products - Customer has bought specific products

  • Customer Segments - Customer belongs to Shopify segments

  • Total Spent - Lifetime spending amount

  • Viewed Products - Products the customer has viewed (logged-in)

Visitor Conditions

Based on browsing behavior (no account required):

  • Is New Visitor - First-time visitor to your store

  • Is Returning Visitor - Has visited before

  • Viewed Products - Products viewed this session

Cart Conditions

Based on current cart contents:

  • Cart Subtotal - Total cart value

  • Items Count - Number of items in cart

  • Cart Contains Products - Specific products in cart

  • Cart Product Tags - Products with specific tags in cart

  • Cart Product Type - Product types in cart

  • Cart Product Vendor - Vendors/brands in cart

  • Cart Product Collections - Products from specific collections in cart

Page Conditions

Based on current page:

  • URL - Current page URL matches pattern

Time Conditions

Based on when the visitor is shopping:

  • Hour - Current hour of day

  • Day of Week - Current day (Mon-Sun)

  • Date - Specific date or date range

Klaviyo Conditions

Requires Klaviyo integration:

  • Segment Membership - Visitor belongs to Klaviyo segment

Types of Actions

Actions determine which products to show:

Product Selection (Recommenders)

AI-powered product selection:

  • Most Viewed - Products with highest view counts

  • Similar Items - Products similar to what's being viewed

  • Frequently Bought Together - Products commonly purchased together

  • Customers Who Viewed Also Viewed - Co-browsing patterns

  • Recommended for You - Personalized AI recommendations

  • Best Sellers - Top-selling products

  • Recently Viewed - Products the visitor has browsed

  • Buy It Again - Products the customer previously purchased

Product Inclusion

Manually add products:

  • Include Products - Select specific products

  • Include Collections - Add products from collections

  • Include Products by Tags - Add products with specific tags

Product Filtering

Remove products from results:

  • Exclude Products - Remove specific products

  • Exclude Out of Stock - Only show available products

  • Exclude Products with Tags - Remove products with tags

  • Exclude Source Product - Don't show the product being viewed

  • Filter by Price - Limit to price range

Widget Overrides

Widget Overrides let you change how your widget looks when a specific rule is triggered. This enables dynamic, context-aware messaging that adapts to your customer's situation.

Available Overrides

Override

Description

Example

Title

Replace the widget's heading text

"VIP Exclusive Picks" for VIP customers

Subtitle

Replace the widget's subtitle text

"Selected just for you" for returning visitors

Add to Cart Button

Change the primary button text

"Add to Bundle" when showing bundle upsells

added to Cart Button

Change the confirmation button text

"Added to Bundle!" after item is added

Example: Personalized Messaging

Rule Condition

Title Override

Customer is logged in + Total Spent > $500

"VIP Picks Just for You"

Customer is logged in

"Welcome back Sarah - You Might Like"

Data Rule Priority

When multiple rules could apply, they're evaluated top to bottom. The first rule whose conditions are met will be used, and its actions and widget overrides will apply.

Example:

  • Rule 1: VIP customers → Title: "VIP Picks"

  • Rule 2: Returning visitors → Title: "Welcome Back"

  • Default: Title: "Recommended"

A VIP customer who is also a returning visitor will see "VIP Picks" because Rule 1 is evaluated first.

Getting Started

  1. Start simple - Create a basic rule with one condition and action

  2. Test it - See which products the rule returns

  3. Refine - Add conditions to narrow targeting

  4. Add overrides - Customize messaging for the rule

  5. Expand - Create additional rules for different scenarios

Did this answer your question?