Matcher Type

Split supports the following Matcher Types.

{
  IN_SEGMENT,
  
  EQUAL_SET,
  ANY_OF_SET,
  ALL_OF_SET,
  PART_OF_SET,

  ON_DATE,
  ON_OR_AFTER_DATE,
  ON_OR_BEFORE_DATE,
  BETWEEN_DATE,

  BOOLEAN,
  
  EQUAL_NUMBER,
  LESS_THAN_OR_EQUAL_NUMBER,
  GREATER_THAN_OR_EQUAL_NUMBER,
  BETWEEN_NUMBER,

  IN_LIST_STRING,
  STARTS_WITH_STRING,
  ENDS_WITH_STRING,
  CONTAINS_STRING,
  MATCHES_STRING,
  
  IN_SPLIT,
}

IN_SEGMENT

When using this type, the matcher selects the set of customers that fall within a Segment.

Fields

string: Mandatory.
negate: Optional.

EQUAL_SET

This matcher selects customers with a multi-valued attribute equal to a Set of provided String literals. Since this is a Set based matcher, the order of the Set does not matter.

Fields

strings: Mandatory.
attribute: Mandatory
negate: Optional.

ANY_OF_SET

This matcher selects customers with a multi-valued attribute containing any of a Set of provided String literals. Since this is a Set based matcher, the order of the Set does not matter.

Fields

strings: Mandatory.
attribute: Mandatory
negate: Optional.

ALL_OF_SET

This matcher selects customers with a multi-valued attribute containing every String literal in a provided Set. Since this is a Set based matcher, the order of the Set does not matter.

Fields

strings: Mandatory.
attribute: Mandatory
negate: Optional.

PART_OF_SET

This matcher selects customers with a multi-valued attribute that is a subset of a Set of values. Since this is a Set based matcher, the order of the Set does not matter.

Fields

strings: Mandatory.
attribute: Mandatory
negate: Optional.

ON_DATE

The ‘is on’ matcher is helpful for doing date equalities. Note that this matcher drops the time component of a DateTime when doing the comparison. Thus, the values 1457382451 and 1457382452 fall on the same date even though they represent different times.

Fields

date: Mandatory. Milliseconds since epoch.
attribute: Mandatory
negate: Optional.

ON_OR_AFTER_DATE

The ‘on or after date’ matcher is helpful for targeting customers that performed an action after a given time. As an example, you can use this matcher to target customers that registered or bought something after a certain time.

Note that this matcher ignores time fields smaller than minutes. Specifically; seconds, milliseconds, and nanoseconds are ignored when doing the comparison. In other words, you can compare dates down to the minute field.

Thus, the values 1457382451 and 1457382471 will be equal to one another, even though they represent different seconds.

Fields

date: Mandatory. Milliseconds since epoch.
attribute: Mandatory
negate: Optional.

ON_OR_BEFORE_DATE

The ‘on or before date’ matcher is helpful for targeting customers that performed an action before a given time. As an example, you can use this matcher to target customers that registered or bought something before a certain time.

Note that this matcher ignores time fields smaller than minutes. Specifically; seconds, milliseconds, and nanoseconds are ignored when doing the comparison. In other words, you can compare dates down to the minute field.

Thus, the values 1457382451 and 1457382471 will be equal to one another, even though they represent different seconds.

Fields

date: Mandatory. Milliseconds since epoch.
attribute: Mandatory
negate: Optional.

BETWEEN_DATE

This matcher is an AND between ON_OR_AFTER_DATE and ON_OR_BEFORE_DATE. The same rules of ignoring time fields smaller than seconds apply.

Fields

between: Mandatory. It is an object that contains two fields, from and to. Both fields
are dates represented by milliseconds since epoch.
attribute: Mandatory
negate: Optional.

BOOLEAN

This is a self-explanatory matcher. At least, we think so :-).

Fields

bool: Mandatory.
attribute: Mandatory

EQUAL_NUMBER

This matcher selects the subset of customers that have an attribute equal to a numeric value.

Fields

number: Mandatory.
attribute: Mandatory
negate: Optional.

LESS_THAN_OR_EQUAL_NUMBER

This matcher selects the subset of customers that have an attribute that is less than or equal to a numeric value.

Fields

number: Mandatory.
attribute: Mandatory
negate: Optional.

GREATER_THAN_OR_EQUAL_NUMBER

This matcher selects the subset of customers that have an attribute that is greater than or equal to a numeric value.

Fields

number: Mandatory.
attribute: Mandatory
negate: Optional.

BETWEEN_NUMBER

A matcher of this type will match if the received number is between the two ones specified.

Fields

between: Mandatory. It is an object that contains two fields, from and to.
attribute: Mandatory
negate: Optional.

IN_LIST_STRING

This matcher selects customers with an attribute or key that falls within a whitelist. The whitelist is encoded within the strings field. This matcher is case sensitive.

Fields

strings: Mandatory.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.

STARTS_WITH_STRING

This matcher selects customers with an attribute or key starting with any of a list of strings. This matcher is case sensitive. Note that the strings should not be regex patterns, they are string literals that are used for exact prefix matching.

Fields

strings: Mandatory.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.

ENDS_WITH_STRING

This matcher selects customers with an attribute or key ending with any of a list of strings. This matcher is case sensitive. Note that the strings should not be regex patterns, they are string literals that are used for exact suffix matching.

Fields

strings: Mandatory.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.

CONTAINS_STRING

This matcher selects customers with an attribute or key containing any of a list of strings. This matcher is case sensitive. Note that the strings should not be regex patterns, they are string literals that are used for exact contains matching.

Fields

strings: Mandatory.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.

MATCHES_STRING

This matcher selects customers with an attribute or key that matches the regex pattern in string.

Fields

string: Mandatory.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.

IN_SPLIT

This matcher is useful when you want to consider the experience of a customer for one Split in deciding the experience for the same customer for another Split. As an example, consider a team working on a brand new homepage and another team responsible for a new widget design on that new homepage. The Split controlling the widget should take into account whether or not the new homepage is turned on for a user.

Fields

depends: Mandatory. This object contains two fields, splitName and treatment.
attribute: Optional. If it is set the match will be triggered against the attribute. If it is not set, the match will be against the key provided.
negate: Optional.