heya
heya copied to clipboard
Question: clarifying the behavior of segment for a campaign
Hey folks,
I just want to clarify the behavior of campaign segment
. I'll submit a PR for the readme once confirmed.
Specifically I'm looking to clarify the case where a user is added to a campaign and does NOT meet the segment
condition for that campaign, but then ~x days later, the condition is met.
In the below example -- will the user ever receive the thanks for purchasing
email?
My understanding is - no, they'll be removed from the campaign immediately? Not sure this is true... it's not documented as far as I can tell.
class PaidUserCampaign
segment { |user| user.paying_customer }
step :thanks_for_purchasing
end
# Monday:
user = User.create!(...)
TrialConversionCampaign.add(user)
PaidUserCampaign.add(user)
# Wednesday
user.update(paying_customer: true)
# What happens here !? Does the user get the `PaidUserCampaign` or no?