Why don't people match 'within the past X days' conditions?
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 people have or haven’t done certain actions within a certain time can sometimes be tricky, due to how we store data in Customer.io.
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, people must have existed in Customer.io for at least seven days. The “age” of a person’s profile in Customer.io is determined either by:
- The date-time when you added the person to your workspace.
- The timestamp of the earliest event performed by that person. You can use back-dated events to effectively backdate the age of a person’s profile.
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 people 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 person has been in Customer.io for under 7 days, they would match the second OR condition. Anyone who has been in Customer.io for longer than 7 days who meets the first condition will not be evaluated for the second condition since we already know they match.