When you are creating an automated campaign, some types of triggers and conditions have a targeting that can be modified using targeting clauses. The clause editor allows to create targeting criteria with fields from the contact list or relational tables. You must understand your data structure to know which fields to use. Using clauses can be complex. If you are not comfortable with clauses, make a request to our support. A bad configuration could result in targeting the wrong segment. This article, intended for advanced users, presents a short guide on data to use to configure a clause.
Source and Field
You must first select the table to use: the Contact table (the contact list from the project) or a relational table. You can then select a field in the list corresponding to this table. This field will be used as the value to validate the targeting.
Operators
The operators are used to create the comparison between the field and the comparison value. The operator options depend on the format of the field. For example, a text field will allow operators like "contains" or "start with". Some operators.
Comparison Value
The comparison value is used to determine if the value from the selected field corresponds to the condition. For the text, number and true/false formats, the clause can only use a fixed value or a value from the same table.
Option 1: Value
The value is a fixed value using text format. For example, if you target the field City, the value could be "Toronto".
You could also use a DI# expression by using the fx icon:
Depending on the context, some variables will be available. A frequent case is the use of System.now. In the context of an automated campaign, you can use values such as dtRun or dtLastRun. We recommend that you consult us if you are not comfortable using expressions.
→ See the DI# documentation
Option 2: Field
The field option is used to compare to a field related to the clause. A common use is to compare 2 fields with a date format. For example, if the renewal date is less than 1 month after the last visit, you could send an automatic reminder message targeting only contacts for which the field used for the renewal date corresponds to that period.
Clauses Using Dates
Clauses that use a date field have different options. The date fields allow to compare with the date and time of the execution. You can use dates to compare the renewal date with the subscription date in order to simulate the subscription anniversary.
Date of use
Often, for dates, the comparison value is not a specified moment but a variable moment so you don't have to modify manually the date. The use date is equal to the clause execution date (System.now). Depending on the date format, the date will include the use time or not.
Calculated date
This is useful in the case which you want, instead of sending a notice on the expiry date of a subscription, you want to send the notice a few days before in order to encourage the contact to renew.
A calculated date allows to specify how much time before or after the date of use you want the comparison value. For example, if the expiry for the contact is April 4th, a calculated date 7 days before will target the contact on March 27th.
And/Or Clauses
When you add a second clause, you can designate it as required (And) or as a sub-clause, which is an alternative (or) to the first clause. You can add as many clauses and sub-clauses as you need to.
And allow to add criteria to restrict the targeting. For example, for a concert promotion, you could target contacts whop participated in the previous 30 days And have indicated "Concerts" in their preferences.
Or allow to add an alternative to an And clause. Still using the concert example, you could target contacts who participated to an event in the previous 30 days OR have indicated "Concerts" in their preferences.
Note: for conditions on the same field, we recommend using a "is in" operator instead of several clauses.