Conditions help you to define audiences or Target Groups, narrow the scope of Reports, and control the journey through Flows. They allow you to set rules, specifying what criteria recipients should meet to be included in a group.
We recommend that you should have a good understanding of Data Formats before setting up Target Groups. This is because there are many different sorts of Data Formats which work differently to one another.
Setting Conditions
Configuring a Target Group, based on Person Data values
To configure a Target Group, enter the Data module and click on Target Groups in the left side panel. From here, select the icon in the top left corner and then New Target Group. Write the name and description of the Target Group and then go onto the Conditions.
Group Conditions
For each Target Group, there is always a Group Condition set by default. This read that 'All' Conditions that are set must be met. To add a Condition, click on the plus button. A new line will appear where you can select your Data Type and Conditions. You can set as many Conditions as you want.
If you would like, you can change the settings on the Conditions so that recipients don't have to fit all of them to be part of the Target Group. Set up the Conditions in whichever way suits you.
Switching the Group Condition
UI Copy | Explanation |
ALL | All conditions in combination with each other must be met |
ANY | One or more of the conditions must be met |
NO | None of the conditions in combination with each other must be met |
ONE OR MORE FAILED | One or more of the conditions must not be met |
Examples on Group Conditions
ALL Group Condition
An ALL group condition will find all recipients who meet all of the listed conditions. This means that the same recipient must meet all the conditions.
In the example below, in order to be part of the target group, FIRSTNAME must not be empty and BIRTHDAY must be empty.
ANY Group Condition
An ANY group condition will find the recipients who meet at least one of the listed conditions.
In the example below, it means that in order to be part of the target group, either FIRSTNAME must be Bella or LASTNAME must be Thomsen.
NO Group Condition
A NO group condition will find the recipients that don't meet all the listed conditions in combination with each other. This means that the same recipient must not meet condition 1 and condition 2 and so on. Thus, if a recipient does not meet condition 1 but he/she meets condition 2, the recipient will be a part of the target group.
In the example below, in order to be part of the target group, FIRSTNAME must not be Martin and LASTNAME must not be Thomsen.
ONE OR MORE FAILED Group Condition
A ONE OR MORE FAILED group condition will find the recipients that don't meet at least one of the listed conditions.
In the example below, it means that in order to be part of the target group, either FIRSTNAME must not be Martin or LASTNAME must not be Burrows.
The Basic Grammar of Conditions
When inserting a new Condition, you are asked to select from a series of options:
- A Data Format - Person Data, One-to-Many etc.
- An Operator - greater than, less than, like, is empty etc.
- A true/false status - Condition met or not met
Here's an example of some Conditions. The Target Group created with these Conditions would be made up of recipients who have given their email but not their first name.
Format | Data Field | Operator | Status |
Person Data | is empty | Condition not met | |
Person Data | FIRSTNAME | is empty | Condition met |
The Condition Operators change depending on the type of Data field. Date and Timestamp fields, in particular, have a few unique operators, such as 'newer than', and 'is on the same day of the year'.
Condition Operator Examples
UI Copy | Explanation | Example | Result |
Equals | The value matches exactly | COMPANY equals "Agillic" | All recipients with the value "Agillic" in Company |
Like |
Allows you to use "*" or "?", which represents any character. "*" matches any number of characters as a wildcard. "?" matches a single character as a wildcard. |
Email like "*@agillic.com" Email like "????@agillic.com" |
All recipients with an email address ending in @agillic.com
All recipients with an email address named xxxx@agillic.com |
In | Allows you to comma separated list several values, any of which results in a match | ZIPCODE in 1230, 2650, 1100 | Recipients with either 1230, 2650 or 1100 in ZIPCODE will be matched |
Is on the same day of the year | Works especially well for annually recurring events. Only looks at the day and month | BIRTHDAY Is on the same day of the year 0 days in the future | Recipients with a birthday matching today's day/month will be matched |
Condition Types
For each of the data types, Conditions work slightly differently from one another. These will be covered below.
One-to-Many Conditions
As One-to-Many Conditions are table-based, their workflow is slightly different from that of Person Data Conditions. A One-to-Many Condition begins on general 'table level', before diving into the individual rows.
Configuring a Target Group to find any recipient, who has at least row of data in the table SUBSCRIPTIONS
To access the row-specific Conditions, you will have to insert a 'subgroup':
Inserting a subgroup condition one a One-to-Many condition
Once you have inserted a subgroup, you now have access to row-specific conditions. In the example below, we are locating recipients who have one or more rows in the One-to-Many table Subscriptions and at least one row must have an END_DATE between 0-7 days in the future.
Adding a row-specific One-to-Many Condition, in the subgroup of conditions
How to use 'One-to-many Conditions' in Agillic
When creating conditions in Agillic, you might need to create your conditions based on One-to-many data. One-to-many data is a type of data that is stored in a table and can store multiple rows of data for a single recipient. This makes One-to-many tables ideal for storing recipients' order histories or subscriptions.
When creating One-to-many conditions, you will run into a few new operations as opposed to when you create conditions based on Person Data. See the table below.
Name | Show for | Description |
Exists | A One-to-many Table | Returns recipients who have one or more rows in the One-to-Many table |
COUNT | A One-to-many Table | Returns recipients based on the number of rows in a One-to-Many table |
MAX | Timestamp, Date, Number | Returns recipients based on the maximum value for a One-to-Many field. |
MIN | Timestamp, Date, Number | Returns recipients based on the minimum value for a One-to-Many field |
AVG | Number | Returns recipients based on the average of a One-to-Many field |
SUM | Number | Returns recipients based on the sum of a One to Many fields |
Table 1: One-to-many Operators
Below, we will give you a few examples of how One-to-many conditions can be set up and what types of recipients the conditions would match.
Example 1: Using 'Exists'
A Condition matching all recipients who have one or more rows of data in the PURCHASES One-to-many Table
Example 2: Using 'Exists' with a subgroup condition
A Condition matching all recipients who have one or more rows of data in the PURCHASES One-to-many Table whose STORE is equal to Copenhagen
Example 3: Using 'Condition not met'
A condition matching all recipients who do not! have one or more rows of data in the PURCHASES One-to-many table whose STORE is equal to Copenhagen. This will also include recipients who do not have any rows in the PURCHASES One-to-many Table
Example 4: Using Count
A Condition matching all recipients who have more than 1 row in the PURCHASES One-to-many table, where STORE is equal to Copenhagen
Example 5: Using SUM
A condition matching all recipients who have a SUM greater than 100 in the PRICE field in the One-to-many Table PURCHASES, where CATEGORY is equal to Candy
Lookup Conditions
Matches made by either Data Lookups or Unique Lookups can be used as a Condition type. Lookup Conditions are constructed in a similar manner to One-to-Many Conditions. They start with a general match before going into 'row specific' Conditions.
Lookup Condition locating recipients returned by the Data Lookup 'LOOKUP_MACHINERY', where at least one row exists with Active = true
In order to inspect the exact data returned by a Data Look for a recipient, open the details view and drag Data lookup item into view:
Other Types of Conditions
Compare
This allows you to compare two Person Data or Global Data values of the same Data Type such as string data or boolean data.
For example, you could compare the success rates of two slightly different emails. You would do this by dividing your group of recipients into two and sending Email A to the first half and Email B to the second. Each time either email is opened, you could set up a Side Effect so that a counter increases. On a given date, we could use a Compare Condition to see which was higher and automatically send the best performing email to a new group of recipients.
Testing the 'open rate' of two similar emails. If an email is opened, the respective Global Data field is increased by 1 - to be used later in a 'Compare' condition
Target Group
This allows you to nest a Target Group within a Target Group.
This might be useful if you wanted to separate out different parts of a Target Group. For example, you've just created a Target Group which identifies all 'Valid Recipients' and want to create a new one which further filters on recent purchases. To save yourself some work of creating the same conditions again, you can simply include the 'Valid Recipients' as a Target Group Condition.
Event
Looking at the Event counter for a recipient, this will illustrate the number of times the Event has been achieved by each recipient.
For example, you might have attached an Event to the top banner logo included in an email. Now, you want to analyse how many recipients have clicked it at least once. You achieve this with the Event Condition '{event name}, greater than 0, condition met'
Step
This is a Step counter, counting how many times a recipient goes through a specified Step.
For example, if your Flow contains a Split Step, you can investigate how many recipients have passed through branch 2. You achieve this by creating a Step Condition '{step name} - greater than 0, condition met'.
Flow
To check if recipients are currently in a Flow. This is especially useful for if the Flow has one or more waiting steps or loop steps.
For example, if you have performed a Flow Status which shows that 381 recipients are currently waiting in a Wait for Period step, you could use a Flow step to see which specific recipients are held here. You create a Condition like '{flow name} - condition met'.
Email Conditions help you identify recipients who have either opened or clicked on a specific email.
For example, you might be creating a combined email and reminder Flow. If a recipient has clicked on the email, you can create a Condition that sends a reminder Flow or exits the recipient from the Flow. This might be '{email name} - Opened - condition met'.
Transactional emails will have the label (Transactional) on them. Conditions for these are the same as for regular emails.
Tracking Page View
This Condition looked at the tracked page-history of each matched recipient. It can either be based on the time of visiting the page or the number of times a page has been visited. This is only available once the Agillic Tracking Script has been enabled.
For example, if you implemented Agillic Tracking Script on a new Promotion subpage of your website, you could identify people who have spent more than 2 minutes on the site. The screenshot below shows how you would set up this Condition.
If you unsure of the format to match, consider doing an Activity Export of the tracking data available. This will give you insight into the URL format to match in your conditions.
Configuring a Tracking Page View Condition, targeting all who have spent more than 2 minutes at a particular URL