Skip to main content

Customer Conditions

Customer conditions evaluate the current user's identity, history, and metadata.

User Role

Matches the customer's WordPress user role.

  • Operators: equals, in, not in
  • Value: one or more role slugs (e.g., customer, wholesale, subscriber)

User ID

Matches specific WordPress user IDs.

  • Operators: equals, not equals
  • Value: one or more user IDs

User Email

Matches the customer's billing or account email.

  • Operators: equals, not equals
  • Value: one or more email addresses

Customer Segment

Segments customers based on their purchase history. Segments are computed automatically:

SegmentCriteria
guestUser is not logged in
newLogged in with zero previous orders
returningHas placed at least one order
low_valueTotal spent below medium threshold
medium_valueTotal spent between medium and high threshold
high_valueTotal spent above high threshold

Thresholds are configurable in PredictCart settings.

  • Operators: equals, in, not in
  • Value: one or more segment names

Logged In

Checks whether the customer is logged in.

  • Operators: equals
  • Value: yes or no

Orders Count

Matches customers based on their total number of previous orders.

  • Operators: greater or equal, less or equal, equals
  • Value: numeric count

Total Spent

Matches customers based on their total lifetime spend.

  • Operators: greater or equal, less or equal
  • Value: numeric amount

First Order Date

Matches customers based on the date of their first order.

  • Operators: before, after, equals
  • Value: date string (YYYY-MM-DD)

Last Order Date

Matches customers based on the date of their most recent order.

  • Operators: before, after, equals
  • Value: date string (YYYY-MM-DD)

User Meta

Matches WordPress user meta fields.

  • Operators: equals, not equals
  • Value: expected meta value
  • Parameter: meta_key — the user meta key to check

Customer Country

Evaluates the customer's shipping or billing country.

  • Operators: equals, in, not in
  • Value: one or more ISO 3166-1 alpha-2 country codes (e.g., US, RO, DE)

Shipping Zone

Matches the customer's WooCommerce shipping zone.

  • Operators: equals, in, not in
  • Value: one or more shipping zone IDs