Date Match
The Date Match category allows you to filter based on dates held within contacts' records. For example, this can be used to match a birthday.
To create the rule, firstly select 'Date Match' from the Rule Category drop-box, and then the Rule Type drop-box will be displayed.
On this page:
Rule Types
- Anniversary—matches dates that occur the same day and month every year, for example birthdays
- Date is before—matches dates in the contact records that are a specified amount of time before a particular or the current date
- Date is after—matches dates in the contact records that are a specified amount of time after a particular or the current date
- Date is equal to—matches dates in the contact records exactly
Note: Date information must be stored as YYYY-MM-DD in the contact record in order for the filter to work correctly.
Rule Logic
An Anniversary filter matches against the month and day but ignores the year, as it is the anniversary of a particular date that is required, not the date itself.
A Date Before/After/Equals filter will match the whole date (YYYY-MM-DD) to search for a specific date, for example the date an order was placed.
Define Field Options
Once you have selected a rule type, click 'Ok' to choose the field and date options.
It is necessary to select a field containing date information by clicking the button to the right of the field box to bring up the field selector.
- Saved filters: the core table you can choose fields from will be the one selected when the filter was created
- Dedicated filters: the core table will be the one that the campaign's current list is associated with.
You can also choose from any available data tables using the 'Data table fields' tab and choosing a table from the drop-down menu.
Date options
There are two different ways to specify a date, depending on the purpose of the filter; 'Fixed Date' or '"Today's" Date', which you can select using the drop-down menu.
Fixed Date requires that exact date to be entered in YYYY-MM-DD format. Adestra will prompt you to re-enter the date if it has been entered incorrectly.
This example will match contacts whose birthday is on the 16th January.
"Today's" Date allows you to build rules with dates relative to the date that you are running the filter. This means the filter count may vary, according to the dates contained within the data. When you select this option, the section will expand to show the date modification options.
The 'Today plus' and 'Today minus' options allow you to refer to dates before and/or after '"Today's" Date'.
'Today plus...' Example
The rule in this example will match email contacts one day before their birthday. This rule will be an Anniversary rule, and the date modification will need to be set to '"Today's" date' and 'Today plus 1 day'.
If "today" is the 16th, then the 16th plus one day will be the 17th. Contacts with birthdays recorded in the data as the 17th would receive the campaign the day before their birthday.
Remember to click the 'Save Filter' button in the bottom left hand corner, or the filter will not be saved if you navigate away from the Campaign Data page.
'Today minus...' Example
The rule in this example will match email contacts three days after their subscription has expired. This rule will be a 'Date is equal to' rule, with the date modification set to '"Today's" date' and 'Today minus 3 days'.
If "today" is the 16th, then the 16th minus three days will be the 13th. Contacts whose subscription expiry is recorded in the data as the 13th would receive the campaign three days after their subscription has expired.
Remember to click the 'Save Filter' button in the bottom left hand corner, or the filter will not be saved if you navigate away from the Campaign Data page.
Date-range Example
An example of using a date-range filter could be for a recurring campaign, sent weekly to contacts whose subscription has expired. A date-range filter would capture all contacts whose subscription expires between each weekly send. For more information on our recurring campaigns feature please refer to the Recurring Campaigns help documentation.
This filter will require two rules, to give a start and end to the date range. The first rule will be a 'Date is before' rule, with the date modification set to '"Today's" date' and 'Today plus 7 days'. Plus seven days sets the end of the date-range as one week ahead.
The second rule will be an AND statement, added by clicking the arrow below the first rule. This rule will be a 'Date is after' rule, with the date modification set to '"Today's" date' and 'Today minus 1 day'. This is because 'After "today"' would not include contacts whose date information matches "today", so minus 1 day sets the start date to include "today".
The two rules together create a filter which, say for example "today" is the 5th of the month, would select contacts whose subscription expiry is before the 12th AND after the 4th.
Remember to click the 'Save Filter' button in the bottom left hand corner, or the filter will not be saved if you navigate away from the Campaign Data page.