Conditions and groupings
Conditions

A condition consists of an offer attribute (which may or may not 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 drop-down list in the Optimize query builder contains custom offer attributes defined in Campaign, as well as all standard attributes. The attributes listed may be in use in any offer template 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.

The following table lists the operators that you can use in the query builder.

Groupings

A grouping consists of one or more conditions preceded by an any or all statement. In a query, you select all or any (from the Select items where drop-down 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)
Example 11. 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:

*
*
*

The all operator in this example is used to specify that each of the conditions that follow—contacts that include offers with a certain expiration date, that cost more than a certain amount, and that have been sent using Email or Phone channels—must be met in order for the contact to be excluded from the proposed contacts table. The any operator is used to define the particular types of channels that should be considered—Email or Phone.