Segmentation and Timestamp Rules FAQ
I sent in a
created_at timestamp, but no user matches my Signed up segment. Why?
In order for any timestamp rule to work, you need to send the timestamps in unix (seconds since epoch) format. If you are sending timestamps in milliseconds or if you're using a different timestamp format like ISO 8601, your users will not match.
Correct: 1461866400 (April 28, 2016, 6:00:00 pm)
Incorrect - milliseconds: 1461866400000
Incorrect - ISO 8601: 2016-04-28T18:00:00Z
Incorrect - RFC 2822: Thu, 28 Apr 2016 18:00:00 +00:00
- You can easily notice if your timestamp is in the correct format or not by the fact that the human readable date and time will appear next to the epoch value in the user interface.
- If you need a timestamp converter, you can try epochconverter.com
I'm using a timestamp rule for my campaign trigger, but users are only receiving the first message.
Timestamp rules can get tricky. Some of them allow users to exit a segment, while others include them in a segment until the timestamp changes. Here are the rules we have:
If you're using one of the rules that allow users to exit, make sure that the user will still be in the segment after any delay.
These rules are for segment entry
is a timestamp: when someone matches this condition, they will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
is a timestamp before X days from now: when they match, the user will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
is a timestamp before X days ago: when they match, the user will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
is a timestamp between: If the timestamp value doesn't change, the user will enter the segment when they match, but not exit. You can add multiple messages with different delays and the user will receive them.
These rules allow for segment exit
is a timestamp after X days from now: The user will exit the segment as soon as there are less than X days left until the date specified. So if your day is one week (7) days from now, then the user will exit the segment as soon as the timestamp is less than seven days away.
is a timestamp after X days ago: The user will exit the segment as soon as more than X days passed your date. For example, if your date is today and the rule is seven days from now, they will exit the segment as soon as seven days passes.
How do I message users whose timestamps are before/after a specific date?
You can use
is less than for before a specific date and
is greater than for after a specific date and compare against your chosen date in epoch (seconds since epoch) format
upgrade_date is less than 1459515600 will match all the users whose
upgrade_date is before April 1, 2016 at 13:00 GMT
upgrade_date is greater than 1459515600 will match all the users whose
upgrade_date is after April 1, 2016 at 13:00 GMT
What timezone are you using to display timestamps?
Inside Customer.io, the timestamp values are dictated by the timezone settings of your computer/laptop. If you change your settings, the values shown in the user interface will update accordingly.
How do I create a segment that only has new users from a certain fixed date (e.g. April 1, 2017)?
If you are using the
created_at attribute with Epoch Timestamp values, you can segment based on that timestamp as seen in the image below. So, using April 1 2017 as an example, you would convert that date to an Epoch Timestamp and then enter that value for comparison against the created_at timestamp of your users.
Note, the timestamp value pictured below (1491022800) is GMT: Sat, 01 Apr 2017 05:00:00 GMT. You can use https://www.epochconverter.com/ to convert to your desired date and timezone and adjust that value accordingly to meet your data requirements.
That segment will contain only people created after April 1, 2017.
How do I convert timestamps back to readable dates and times?
When you export information out of Customer.io, you will see dates and times as unix timestamps. Here's how to convert timestamps to a readable format in Microsoft Excel.
This assumes that A1 is the cell with the epoch number. Then, format the result cell or column of cells for date (and time). By default, this conversion is for GMT.
Converting to your time zone
If you’d like to see the result in your time zone, add your time zone's UTC offset into the formula:
=(((A1/60)/60)/24)+DATE(1970,1,1)+(-[YOUR OFFSET HERE]/24)
For example, to convert timestamp data to Eastern Time, where the offset is -5:
Here's a list of UTC offsets.