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?
I just started using Heya today (so somebody correct me if I'm wrong), but I don't think they're just hanging out waiting to become a paying customer and 💥 thanks_for_purchasing.
If you drop them into the PaidUserCampaign before they're a paying customer, they're done. If you update that flag, you'd need to drop them in again.
I just started using Heya today (so somebody correct me if I'm wrong), but I don't think they're just hanging out waiting to become a paying customer and 💥
thanks_for_purchasing.If you drop them into the
PaidUserCampaignbefore they're a paying customer, they're done. If you update that flag, you'd need to drop them in again.
Hey all, yeah, this is right. I think it would be nice if it could wait for them to match, but that may be difficult based on the current assumptions. Currently, you should add them to the campaign when they become a paying customer (so that the campaign segments match).