Menu
 

Segmentation and Timestamp Rules: FAQ

1. 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

Special notes

  • 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.

Segments - created_at attribute

2. I’m using a timestamp rule for my campaign trigger, but users are only receiving the first email.

Timestamp rules can get tricky as some of them allow users to exit a segment while others are including them until the timestamp value is changed. If you’re using one of the rules that allow users to exit, make sure that the user will still in the segment after the email delay.

  • is a timestamp the user will enter, but not exit the segment, you can add multiple emails with different delays and the user will receive them
  • is a timestamp before X days from nowthe user will enter, but not exit the segment, you can add multiple emails with different delays and the user will receive them
  • is a timestamp before X days ago the user will enter, but not exit the segment, you can add multiple emails with different delays and the user will receive them
  • is a timestamp after X days from nowthe user will exit the segment as soon as there are less than X days left until that date
  • is a timestamp after X days agothe user will exit the segment as soon as more than X days passed since that date

3. How do I email 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.

Examples:

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 1459515600will match all the users whose upgrade_date is after April 1, 2016 at 13:00 GMT

4. 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.

5. How do I create a segment that only has new users from a certain fixed date (i.e. 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.

Segment of new users since April 1, 2017

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 (seconds since the epoch). Here’s how to convert timestamps to a readable format in Microsoft Excel.

Use this formula (with A1 as the cell with the epoch number, for example):
=(A1 / 86400) + 25569

If you’re using a Mac, you might find that the date conversion comes out 4 years ahead. If so, use this formula:
=(A1 / 86400) + 24107

Then, format the result cell or column of cells for date (and time). This shows you GMT time.

If you’d like to see the result in your time zone, add the UTC offset into the formula like so: =((A1 +/- time zone adjustment) / 86400) + 25569

For instance, here’s the formula used to convert timestamp data on a Mac for the Eastern Time Zone in New York: =(A1-4/24)/86400+24107