In many cases, a single search rule (field – operator – reference value) is not sufficient to define a target group. It is therefore admissible to specify several search rules, linking them with the AND and OR operators as in a normal search. Brackets are also allowed in target group definitions.
The use of brackets permits the definition of very complex target groups. Mathematical rules apply for bracket processing: what’s inside brackets will be processed first. Brackets may also be nested. However, this quickly leads to a rather unclear target definition structure.
Fig. 6.4: Using brackets, you can group search rules, controlling the sequence of their processing.
Imagine you have defined various database fields describing recipients’ interests and hobbies (INTEREST_CARS, INTEREST_TRAVEL i.e. car interest, travel interest etc.) where 0 means not interested and 1 means interested. Now imagine you wanted to send an email containing images to two interest groups only. You need to use the HTML mail format (see chapter "Mailings - Sending out newsletters" on mailings). You would need to define the following search rules: (INTEREST_CARS = 1 AND INTEREST_TRAVEL = 1) AND (MAILTYPE = 1 OR MAILTYPE = 2). This will result in a target group containing all recipients who have ticked INTEREST_CARS and INTEREST_TRAVEL and who requested the HTML (1) or Offline-HTML (2) mail formats.
It is easiest to define a target group by first jotting down the search rules with required brackets on a piece of paper. To enter the search rules from our example, proceed as follows:
1. | As described in chapter "Creating and managing target groups", call up the entry dialog for a new target group and give it a Name and Description. |
2. | Select the left bracket ( from the first drop-down list in the search rule entry line. Select the field INTEREST_CARS from the next drop-down list, then the = relational operator and 1 as a reference value. Click on Add to close the rule. |
3. | In front of the second search rule, an additional drop-down list allows you to select a linking operator (AND or OR). Select the AND operator. Select the field INTEREST_TRAVEL, then the = relational operator and 1 as a reference value. In the last drop-down list of the line, select the right bracket ). Click on Add to close the rule. |
4. | The third search rule begins with an AND link, followed by a left bracket ( . Select the MAILTYPE field, the = relational operator and 1 as a reference value (HTML). Click on Add to close the rule. |
Fig. 6.5: The third search rule is complete. Finish by clicking on Add.
5. | The fourth search rule starts with the OR link and no bracket. Select the MAILTYPE field again, the = relational operator and 2 as a reference value (Offline-HTML). Finish the rule with a right bracket. Click on Add to close the rule. |
6. | After entering the four search rules and the relevant brackets, close the target group definition by clicking on Save. The new search rule will now be listed in the Overview when you click on Target groups in the navigation bar. |
Please note: Complex data bank queries within a target group can extend the processing time considerably. This may lead to loading times in the minute range.