Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: clarifying the behavior of segment for a campaign #218

Open
rathboma opened this issue Oct 14, 2023 · 2 comments
Open

Question: clarifying the behavior of segment for a campaign #218

rathboma opened this issue Oct 14, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@rathboma
Copy link
Contributor

rathboma commented Oct 14, 2023

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?
@aaronkelton
Copy link

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.

@joshuap
Copy link
Member

joshuap commented Nov 22, 2023

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.

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

@joshuap joshuap added documentation Improvements or additions to documentation question Further information is requested labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants