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

Refactor mailchimp email and serviceUserProfiles #428

Merged
merged 17 commits into from
Jun 4, 2024

Conversation

annarhughes
Copy link
Member

@annarhughes annarhughes commented May 20, 2024

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 and synced user profiles data to trigger email automations. The existing similar crisp functionality was refactored to improve the DRYness and performance - all service profile updates are handled together in serviceUserProfiles.ts

The logic flows are as follows:

  • User account created -> create user in mailchimp/crisp with profile data and partner access data
  • User adds new partner access -> update mailchimp/crisp users partners data
  • User creates/updates/cancels therapy session -> update mailchimp/crisp users therapy dates and total sessions redeemed/remaining
  • User starts/completes course session -> update mailchimp/crisp users course data
  • New course created -> creates new course fields on mailchimp user profile

Mailchimp automations will to trigger impact measurement email based on signed_up_at date
Mailchimp automation will trigger therapy feedback email based on first_therapy_session_at date

This PR completes the transition of existing emails for Bloom, however it is now much easier to send additional one-off and automated 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.

@annarhughes annarhughes force-pushed the refactor-therapy-feedback-email branch from 67e9842 to 1289cd9 Compare May 20, 2024 14:08
@annarhughes annarhughes mentioned this pull request May 28, 2024
@annarhughes annarhughes changed the title [WIP] Refactor therapy feedback email Refactor therapy feedback email Jun 3, 2024
@annarhughes annarhughes force-pushed the refactor-therapy-feedback-email branch from 1d6d37f to cd5ffab Compare June 4, 2024 18:38
@annarhughes annarhughes marked this pull request as ready for review June 4, 2024 18:38
@annarhughes annarhughes changed the title Refactor therapy feedback email Refactor mailchimp email and serviceUserProfiles Jun 4, 2024
@annarhughes annarhughes merged commit 05f4cd7 into develop Jun 4, 2024
3 checks passed
@annarhughes annarhughes deleted the refactor-therapy-feedback-email branch June 4, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant