Dynamic Customer Group Rules

A dynamic customer group has exactly one rule with one or more condition. A condition is an individual line in the editor, for example, Company equals β€˜Salesforce’.

Each rule must have at least one condition in the inclusion list.

Each condition consists of an attribute, (for example, Company), an operator, (for example, equals), and one or more values, (for example, Salesforce).

Note: When using the exist or doesn't exist operators, there is no value.

When defining dynamic customer group rules, you must consider the following:

  1. A rule can have multiple include and exclude condition groups, following a pre-defined syntax. See Dynamic Customer Group Attributes.
    • Each group can use certain operators. See Dynamic Customer Group Operators.
    • Condition groups are linked with an implicit OR operator.

      For example, "Include customers registered 1 year or longer AND #orders > 50 OR customers registered 2 years or longer and #orders > 100".

    • The list of included groups and the list of excluded groups are linked with the AND NOT semantic.
  2. You can use certain attribute types. (See Dynamic Group Attribute Types.
    • The following attribute types are supported: String, Set-of-String, Enum-of-String, Integer, Set-of-Integer, Enum-of-Integer, Number, Set-of-Number, Boolean, Date, Date+Time.
    • The following attribute types are not supported: Password, Email, Html, Text, Image.
  3. You can define value selection and evaluation criteria.
    • You can specify multiple values with some operators. Multiple values are separated by commas and are evaluated with the OR semantic. For example, "Country is 'United States', 'Germany'" is evaluated as "Country is 'United States' OR 'Germany'".
    • String values can be single-word or multi-word. For example, "Country is 'United States'".
    • String values can't include wildcards. For example, '*' or '?' are interpreted as regular characters.
    • String operations are case-insensitive. For example, a string comparison "firstname is Mike" matches customers with first name "mike", "Mike" and "mIke".
    • Set-of-String, Set-of-Integer and Set-of-Number conditions are evaluated against all values in the value set. For example, if a customer has three hobbies "Reading", "Sailing" and "Diving", and the condition is "hobby is Diving", the customer meets this condition.
    • With Enum-of-String and Enum-of-Integer, one or more values are selected from a defined value list (values are not entered by the user). The value select dialog box shows the values already selected and allows the customer to select new values or deselect already selected values.
    • Conditions evaluate to 'false' if no attribute value exists for the customer for the attribute. For example, 'age less than or equal 18' is false if the customer attribute 'age == null'.
  4. Operators enable you to include or exclude customers with undefined (none-existing) attribute values. For example, rules such as "exclude customers age < 17 or unknown age", exclude certain customers.
  5. Storefront session data is processed as follows:
    • Referrer URL, Host and Keywords attributes are evaluated by comparing their value with the corresponding attributes of the customer's session. Values are compared case-insensitive using string operators. See Using Referrer Attributes.
    • session.customergroups only checks for static and system groups, not dynamic groups.
    • For Source Code Group, each value of a "Source Code" condition is compared with the source code group attached to the customer's session. If at least one of the condition values matches the source code group, the condition matches
    • For Locale Only, locales allowed in the selected site are considered during rule evaluation. A rule condition matches if the locale at the customers request is equal to the locale configured at the condition. If the request holds a locale that is not allowed in the selected site, the condition doesn't match and (potentially) the whole rule doesn't match. If the request doesn't contain a locale, the rule evaluation uses the default locale of the selected site to match it with the rule condition.
    • Session Custom Attribute conditions can only be evaluated in a meaningful way if the condition is applicable for the actual type of the session custom attribute. The condition type is used to deduce the expected type of the session custom attribute. If the actual type of the session custom attribute is different, the condition evaluates to false. For example, if during rule evaluation, the session custom attribute evaluates to a number from the customer's session, but the actual type is Boolean, the condition evaluates to false. See Using Session Custom Attributes.