Conditions and groupings
Conditions are an offer attribute, an operator, and a value. Groupings are sets of conditions.
Conditions
A condition consists of an offer attribute (which might be parameterized), an operator, and a value.
In the following query,
Expiration Date = 12/31/08
Expiration Date is the custom attribute, "=" is the operator, and 12/31/08 is the value.
The offer attribute list in the Contact Optimization query builder contains custom offer attributes defined in Campaign, and all standard attributes. You can use the attributes that are listed in any offer template that is defined in Campaign. If the offer attribute that you specify in the query builder is a parameterized value, then your query builder search can yield offer versions.
Operator | Definition |
---|---|
= | Equal to |
> |
Greater than If used with a date, this operator signifies a date that falls after the date you specify. For example, Expiration date > 12/31/08, signifies a date after 12/31/08. |
>= |
Greater than or equal to If used with a date, this operator signifies a date that falls on or after the date you specify. For example, Expiration date >= 12/31/08, signifies a date on or after 12/31/08. |
< |
Less than If used with a date, this operator signifies a date that falls before the date you specify. For example, Expiration date < 12/31/08, signifies a date before 12/31/08. |
<= |
Less than or equal to If used with a date, this operator signifies a date that falls before or on the date you specify. For example, Expiration date <= 12/31/08, signifies a date on or before 12/31/08. |
<> | Not equal to |
Groupings
A grouping consists of one or more conditions that are preceded by an "any" or "all" statement. In a query, you select all or any from the Select items where list as follows:
all to specify that the offer must meet each of the conditions presented. For example, you might want to locate offers that cost less than $5 and expire before or after 12/31/08.
The all operator is equivalent to the AND operator, and can be represented as follows:
(Grouping) AND (Grouping) ... AND (Grouping)
where
Grouping = (Condition) AND (Condition) ... AND (Condition)
any to specify that the offer might fall into any of the conditions presented. For example, you might want to locate offers that have an item category of electronics or computers.
The any operator is equivalent to the OR operator, and can be represented as follows:
(Grouping) OR (Grouping) ... OR (Grouping)
where
Grouping = (Condition) OR (Condition) ... OR (Condition)
Offer versions query builder example
The following example illustrates how the query builder helps you to target contacts according to custom offer attributes.
You want your contact list to exclude contacts that meet all of the following conditions:
- An offer expiration date on or before 12/31/08
- A cost per offer greater than $10
- Channel is either Email or Phone.
In this example, the all operator is used to specify all offers to all contacts that meet all of the following conditions:
- A certain expiration date
- Cost more than a certain amount
- Sent using Email or Phone channels
All of these conditions must be met in order for the contact to be excluded from the proposed contacts table (PCT). Create a subgroup by using the any operator to define the particular types of channels that can be considered, Email or Phone.