hacknight icon indicating copy to clipboard operation
hacknight copied to clipboard

Mailchimp sync

Open jace opened this issue 12 years ago • 0 comments

Mailchimp is a popular tool for sending mass email. Hacknight should sync participant lists with Mailchimp. There is some working code for this in the doctypehtml5 codebase.

The sync is simple, but has a few subtleties to watch out for.

  1. Make a separate table that has a 1:1 relationship with Event. This stores sync data for the events where the owner has chosen to setup sync.
  2. You'll have to store the Mailchimp API key, list id and optionally, a list group, in case the db has to be synced to a single group instead of the whole list.
  3. A Mailchimp list has one mandatory column, EMAIL, and optional columns for everything else. A list will have FNAME and LNAME by default, for first and last name, but in HasGeek's use case we remove that and use FULLNAME instead. You will have to save this mapping information that connects data from the User and Participant models with Mailchimp columns. The main things to sync: user's name, email address, participation status. If a list has FNAME and LNAME, just do fname, lname = User.fullname.split(' ', 1)
  4. Store a sync flag on the Participant model. If a user unsubscribes from the list, they should not be re-subscribed again. Use the sync flag to check if their data needs to be copied to Mailchimp.

jace avatar Feb 07 '13 06:02 jace