If birthday in date range
Conditionally merges different content depending on whether a contact's birthday falls inside a range of dates. Use it for a birthday month offer, so one campaign greets everyone born in that stretch of the calendar.
Syntax
{{#ifBirthdayDateRange date startDate endDate}}true content{{else}}false content{{/ifBirthdayDateRange}}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Date | Date | Required | The birthday to evaluate, normally a Birthday field on the contact. |
| Start Date | Date | Required | The first day of the range, written as month and day. |
| End Date | Date | Required | The last day of the range, written as month and day. |
Note: Write the range as month and day with no year, such as"10/1"and"10/31". A Birthday field holds only a month and a day, with no birth year, so a range carrying a year has nothing to match and the true content never shows.
Note: Both days are included, so a range of"10/1"to"10/31"covers a birthday on the first and on the thirty-first.
Note: A range cannot cross the end of the year."12/15"to"1/15"matches nobody, because the end of the range falls before the start. Use two separate blocks for a window like that, one for December and one for January.
Examples
The examples below are based on the following sample content:
{{#ifBirthdayDateRange Contact.Birthday "10/1" "10/31"}}Happy birthday month! Here is 20% off.{{/ifBirthdayDateRange}}
A. The contact's Birthday field is 10/15
Happy birthday month! Here is 20% off.
B. The contact's Birthday field is 9/30
Nothing is merged.