Metafield-based customer segment filters

If you created a customer metafield definition, then the metafield can be used as a filter. Customer segments can only be created from metafields that use the following data types:

  • date and time
  • number
  • text
  • true or false

Learn more aboutMetafields.

If you're a developer, then you can refer to theMetafields developer documentation.

Operators The operators that are available depend on whichcontent typeis used for the metafield.

Date and time:

  • In the last 7 days:>= 7_days_ago
  • In the last 30 days:>= 30_days_ago
  • In the last 90 days:>= 90_days_ago
  • In the last 12 months:> = 12 _months_ago
  • Exactly on date:=
  • On or before date:< =
  • On or after date:>=
  • Between dates:BETWEEN AND
Number:

  • Is equal to:=
  • Is not equal to:!=
  • Greater than:>
  • Smaller than:<
  • Smaller or equal to:< =
  • Greater or equal to:>=
  • Between:BETWEEN
Number with list of values:

  • Contains:CONTAINS
  • Doesn't contain:NOT CONTAINS
Text:

  • Is equal to:=
  • Is not equal to:!=
Text with list of values:

  • Contains:CONTAINS
  • Doesn't contain:NOT CONTAINS
True or false:

  • Is equal to:=
  • Is not equal to:!=
Exists or doesn't exist:

  • Doesn't exist:IS NULL
  • Exists:IS NOT NULL
Values The values that are available, if any, depend on whether values were added to the metafield or whether you use third-party apps to pull data into your metafields. You might need to enter values manually.
Format The format of the data that is entered depends on what was set up in the metafield.
Example

Points balance example:
customer.points_balance >= 100

Notes
  • The filter name is based on the name of the metafield. The code is based on thenamespace and the keyof the metafield.
  • Some common use cases for using Metafields for a customer segment include point balances, loyalty and rewards, and customer birthdays.
Shopify准备OB欧宝娱乐APP开始销售?Try it free