Related links: Product Requirements Brief, Technical Spec
In 2019, we launched sending Activate Account emails to new users who are created via Chompy CSV import. The Activate Account email prompts the new user to activate their DoSomething account by setting a password upon visiting a URL in the email content.
This is implemented via the following steps:
-
When the Chompy import creates a new (password-less) user in Northstar, it executes a
POST /v2/resets
request to Northstar, passing the new Northstar user id as the requiredid
parameter, and a password reset type (e.g.rock-the-vote-activate-account
) as the requiredtype
parameter. - When Northstar receives a
POST /v2/resets
request, it will:- Generate a valid password reset URL for the given user
id
and resettype
, e.g.https://identity.dosomething.org/password/reset/rock-the-vote-activate-account/0b68a813dc3354af96a1749be77ed8a0e8d03de12940ea7310a382c28ad?email=puppet+sloth%40dosomething.org
- Create a
call_to_action_email
event in Customer.io (via Blink) for the user, passing the password URL as anactionUrl
parameter and reset type as atype
parameter.
- Generate a valid password reset URL for the given user
-
When Customer.io receives a
call_to_action_email
event withtype
equal torock-the-vote-activate-account
orbreakdown-activate-account
, it sends an email to the user prompting them to visit the givenactionUrl
to activate their account. - When the user visits the Activate Account URL in the email (e.g.
https://identity.dosomething.org/password/reset/rock-the-vote-activate-account/:token?email=:email
), they are prompted to join DoSomething.org by creating a password.- When the password reset URL (
/password/reset/:type/:token
) has atype
route parameter that containsactivate-account
, the form displays “Activate Account” copy instead of the default “Forgot Password” copy. We match by substring so multiple activate account types can re-purpose this form.
- When the password reset URL (
-
Upon creating a password and submitting the form, Northstar creates a
password_updated
event in Customer.io for the user, passing the reset type (e.g.rock-the-vote-activate-account
) as anupdated-via
parameter. - When Customer.io receives a
password_updated
event withupdated-via
containingactivate-account
, it sends an Account Activated email to the user confirming that they have activated their DoSomething.org account.- We match by substring so multiple activate account types can re-purpose this confirmation email.
Creating new Activate Account emails #
Here are the steps for creating a new type of Activate Account email:
-
In Northstar, add a new valid value that can be sent as the
type
parameter in aPOST /v2/resets
request. This value should contain the stringactivate-account
to repurpose re-branding Northstar’s Reset Password form as an Activate Account form, as well as re-purposing the Account Activated Event Triggered Campaign. -
In Customer.io, create a new Event Triggered Campaign that sends an email to a user when a
call_to_action_email
event is created with the newtype
you’ve added in Step 1. -
You’re done! Execute a Northstar
POST /resets
API request (or call Gateway PHP’ssendUserPasswordReset
) with the id of the user to send the email to, along with the newtype
you’ve added, to send your new type of Activate Account to the user.
Current imports #
We currently use Chompy to import users from three sources:
-
Rock The Vote - sends Activate Account emails
-
Call Power
-
Email subscriptions (Instapage marketing sites, e.g. https://lets.dosomething.org) - sends Activate Account emails for Breakdown subscribers
Retired imports #
-
TurboVote - Imported via Chompy
-
Niche - Imported via Quicksilver
-
AfterSchool - Imported via Quicksilver
-
Celebs Gone Good - Created via Voting App
-
Athletes Gone Good - Created via Voting App
-
Mailchimp - Before we switched to Customer.io, we used Mailchimp to send emails. Grandpa Phoenix had an email opt-in form that would directly add subscribers in Mailchimp, without creating a Drupal user. When we migrated from Mailchimp to Customer.io, the data team ran a one-time import that created users for Mailchimp emails that did not have accounts.