Menu
 

Why aren't users matching my 'within the past X days' segment?

This problem often comes up when you set up a segment to check that someone has not performed an action within the last X days. The reason this happens is because we can only check that criteria if they’ve been in Customer.io for at least that many days.

Using “within the past X days” to check whether customers have or haven’t done certain actions within a certain time can sometimes be tricky, due to how we store data in Customer.io.

An example

Check out this segment, which aims to identify people who have not made a purchase in the last seven days:

What you need to know

To match, these customers must have existed in Customer.io for at least seven days.

If a new user is added and logs in and has made no purchases, they still won’t match; Customer.io doesn’t have seven days’ worth of data to check!

This means that you won’t know whether or not a user hasn’t made a purchase within the last week until they’ve been in Customer.io for at least one week.

Technically-speaking, the important qualifier for these negative “has not performed A” conditions “within the past X days” is that customers need to have been in Customer.io for at least the value of X days, in order to be evaluated against that condition. This also applies to backfilled users that have a created_at value more than 7 days in the past.

Want people to match anyway?

If you’d still want people to match even if we don’t have X days’ worth of data, you can— you just need to explicitly say so in Customer.io, with an OR condition. Like this:

This means that if a customer has been in Customer.io for under 7 days, they would match the second OR condition.