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

Additional logic for recurring emails #305

Closed
venturini-dev opened this issue Mar 30, 2022 · 9 comments
Closed

Additional logic for recurring emails #305

venturini-dev opened this issue Mar 30, 2022 · 9 comments
Labels
enhancement New feature or request
Milestone

Comments

@venturini-dev
Copy link

Some customers want to send out recurring emails ONLY if new entries have been added since the last check.
It would be great to have this option in the recurring sendout settings.

@bencroker
Copy link
Collaborator

You could in theory use a Template Segment to specify that contacts should only receive a sendout if the last article's publish date was within the last X number of days. Have you considered that approach?

@venturini-dev
Copy link
Author

Thanks Ben, that accomplishes the goal I had in mind!
I guess I did not think of implementing logic associated with whether to send a sendout or not with segments, which I thought about as responsible for logic to be run on recipients.
I also see that logic in template segments is run for every contact.
Do you think it is still worthwhile to implement a feature where one could run additional logic before looping through the mailing list?

@bencroker
Copy link
Collaborator

How would you suggest this be implemented? It would kind of be like a Segment that is applied to sendouts instead of contacts, in which case why not just use what already exists?

@venturini-dev
Copy link
Author

Yeah, you could have the same concept of the "template condition" field but applied to the sendout. It would just be a way to access and evaluate the global state of craft before iterating through the mailing lists.

As a user, when I create a new sendout I kind of expect all logic for the sendout to be on that page - like time, dates, send multiple times, and then there could be like an additional field for a custom condition.

I can definitely accomplish the same with having the logic in the segment, so it's definitely not a missing feature.

I also want to point out that I may be saying this from a mental model that may not be aligned with the plugin - yet. When I think "segment" I think of logic on recipients, not on other entries, whereas logic for other entries could relate to other concepts like time and date, or other automations that are setup for the automated sendout.

@bencroker
Copy link
Collaborator

That's a good point, thanks for clarifying! I would like to be able to leverage the new condition builder in Craft 4 but it doesn't really provide the flexibility one might need for a case like this, so I'll consider your suggestion for Campaign 2.

@bencroker bencroker reopened this Mar 31, 2022
@bencroker bencroker added this to the v2 milestone Mar 31, 2022
@bencroker bencroker added the enhancement New feature or request label Mar 31, 2022
@bencroker
Copy link
Collaborator

Added in 48728f1 for the 2.0.0 release.

@bencroker
Copy link
Collaborator

I ended up adding a condition builder field to the sendout schedule for automated and recurring sendout types, so you can create your own custom condition rules.

Screenshot 2022-04-26 at 19 55 00

@venturini-dev
Copy link
Author

venturini-dev commented Apr 27, 2022 via email

@bencroker
Copy link
Collaborator

This has been released in version 2.0.0.
You can see some examples in https://github.com/putyourlightson/craft-campaign/tree/v2/examples/conditions/sendouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants