Refactor therapy feedback email #428
Draft
+2,710
−2,504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes did you make?
Refactors email functionality for existing automated emails send from bloom - the Impact measurement email and the therapy feedback email.
Replaces mandrill + mailchimp setup, with mailchimp automations. Bloom users are now added to mailchimp, with user fields and events updated on mailchimp to trigger automated email flows.
User account created -> create user in mailchimp with
signed_up_at
User completes therapy session -> update mailchimp user
first_therapy_session_at
andlast_therapy_session_at
fieldMailchimp automation to trigger impact measurement email based on
signed_up_at
dateMailchimp automation to trigger therapy feedback email based on
first_therapy_session_at
dateThis PR completes the transition of existing emails for Bloom, however it is now much easier to send additional one-off and automated (transactional) emails using mailchimp user fields, and/or mailchimp events
Why did you make the changes?
We are introducing mailchimp automations for our transactional (user-triggered) emails across Chayn services. We previously used Mandrill as an add on for transactional emails, which is currently being integrated into mailchimp. However mailchimps existing automations now seems to be the best tool for most of our email requirements, including our Bloom feedback emails. So we’re moving the current functionality for bloom emails to automations.