As of SDK version 4.7, Swrve enables you to target and track your audience based on the date and time of custom user properties. For example, target users who have an upcoming event, such as a flight or concert, or ask customers to leave a review a few days after an event, such as checking out of a hotel or purchasing an item.

For information on how to implement custom DateTime user properties in your app, see the related integration guide:

This article describes the time frames associated with DateTime filter operators in the audience filter tool. It also includes examples of how to use custom DateTime user properties to target or segment your users. For more information about how to use the audience filter tool, see About Audience Filters.

Filter Time Frames

For DateTime targeting purposes, one day equals a 24-hour sliding window. The following examples show how a property would match the selected filter, where the point of evaluation for in-app campaigns is session start and the point of evaluation for push notification campaigns is the scheduled time of the push.

Example

Time Frame

Property is 1 day ago.

The property DateTime is within a 24-48 hour window prior to the point of evaluation.

Property is 1 day away.

The property DateTime is within a 24-48 hour window after the point of evaluation.

Property is 2 days ago.

The property DateTime is within a 48-72 hour window prior to the point of evaluation.

Property is 2 days away.

The property DateTime is within a 48-72 hour window after the point of evaluation.

Property is not 2 days ago.

The property DateTime falls outside of the 48-72 hour window prior to the point of evaluation.

Property is not 2 days away.

The property DateTime falls outside of the 48-72 hour window after the point of evaluation.

Property is between 1 and 2 days away.

The property DateTime is within a 24-48 hour window from the time of evaluation.

Property is between 1 and 2 days ago.

The property DateTime is within a 24-48 hour window prior to the time of evaluation.

Property is not between 1 and 2 days away.

The property DateTime falls outside of the 24-48 hour window from the time of evaluation.

Property is not between 1 and 2 days ago.

The property DateTime falls outside of the 24-48 hour window prior to the time of evaluation.

Property is date Nov 30 2016 PST.

The property DateTime is between 00:00 and 23:59:59:59 on the selected date, in the selected time zone.

The property DateTime is between the dates and times selected, in the selected time zone.

Time Zones

If using the is date or is date between filter operators, note the following points about time zones:

The customer’s device logs the property DateTime in a set time zone (for example, PST). For targeting purposes, the SDK converts the value to UTC when sending the DateTime to Swrve (for example, UTC-8:00).

The filter in the audience builder defaults to your company time zone. If you select the same time zone as the property’s time zone (for example, America/Los_Angeles), the system again converts the DateTime to UTC and the values will match.

If you select a filter time zone that is different than the property’s time zone, the DateTime may not match the targeted time frame. For example, if the property is set to EST but the audience filter is set to PST, there could be a possible mismatch of three hours.

Targeting DateTime User Properties

This section covers some common use cases for targeting DateTime user properties.

Target an Upcoming Event

Use this example to target customers who have an upcoming event, such as a flight, to encourage them to check in or book a seat.

Target a Recent Purchase

Use this example to target customers who made a recent purchase, to prompt them to review their purchase.

Target a Specific Date Range

Use this example to target customers within a specific date range; for example, to notify them of an airport strike.

Recurring Push Notifications

You can also use DateTime properties to target your recurring push campaigns.

When using date user properties to target a recurring push audience, ensure the user property you select includes DateTime information, otherwise your targeted audience will be zero.

The following examples show the time frames associated with the different scheduling options for recurring push notifications. In this example, the property DateTime is seven days away and the company time zone is PST (UTC-8). For evaluation and scheduling purposes, Swrve converts all times to UTC.

Option 1: Schedule the notification at the same time worldwide

The point of evaluation is the scheduled time, converted to UTC. For example, 16:55 UTC.

Every day at 16:55 UTC, Swrve calculates the target audience, checking if the property DateTime is within 168 (24 x 7) and 192 (24 x 8) hours from the time of calculation.

If the property DateTime is in that range, the user is sent the push notification.

Option 2: Schedule the notification at the user’s local time

The point of evaluation is at the scheduled time in the company’s time zone, converted to UTC. For example, 16:55 UTC.

Every day at 16:55 UTC, Swrve calculates the target audience, checking if the property DateTime is within the 168-192 hour window from the time of calculation.

If the property DateTime is within that range, the user is sent the push notification at the scheduled time in their local time zone.

Option 3: Schedule the notification at the user’s optimal time between 8am and 9pm

The point of evaluation is midnight in the company’s time zone, converted to UTC. For example, 8:55 UTC.

Every day at 8:55 UTC, Swrve calculates the target audience, checking if the property DateTime is within the 168-192 hour window from the time of calculation.

If the property DateTime is within that range, the user is sent the push notification at their optimal time between 8am and 9pm, in their local time zone.

Option 4: Schedule the notification at the user’s optimal time over a 24-hour period

The point of evaluation is midnight in the company’s time zone, converted to UTC. For example, 8:55 UTC.

Every day at 8:55 UTC, Swrve calculates the target audience, checking if the property DateTime is within the 168-192 hour window from the time of calculation.

If the property DateTime is within that range, the user is sent the push notification at their optimal time over a period of 24 hours, in their local time zone.