Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Achieve Mailchimp List + External Database List Status Synchronization?

I'm new to the world of MailChimp and custom API integrations so please bear with me. I'm also an internet marketer (not a developer),

so please bear with me even more ;)

The Situation:


We have a platform with user accounts, data etc. Currently this platform utilizes custom, on-platform newsletter system and list management. This on-platform system doesn't work...at all :(. So,

we're migrating the whole system to MailChimp.

The Problem:


We need to make sure that our newsletter list is updated both on our site (LAMP stack) and MailChimp.

Essentially, we want the following to happen:

  1. If a user subscribes/unsubscribes/updates their newsletter subscription from within their profile on our platform, that MailChimp receives this information
  2. If someone subscribes/unsubscribes/updates their MailChimp Subscription from merge tags in emails or self-hosted form items, that this information gets pushed back to our database

Simply, both lists would remain equal, independent, and updated.

We have 3 newsletter types in 3 languages each. In order to create filters for each of these newsletters we will 1) create three groups and 2) create segments within each of these groups based on user language preferences, which come from our database. We use Zoho CRM to

import into MailChimp

The Question:


How do we do it? (Kidding...) What are the necessary API calls that we need to make to ensure that we can synchronize our platform's MySQL columns that pertain to list management with MailChimp?

What is the best way to provide form elements on MailChimp that users can use to administer their subscription statuses from within our platform. (We have three newsletter types, and as soon as a user updates something on our site, we want that not only to 1) go to mailchimp (the easy part), but 2) come back to our website and update our own MySQL database columns.

What would be the most seamless and least-hair-pulling way to make sure that we can keep Zoho CRM, our site and MailChimp updated with the most recent subscription data. I was thinking:

  1. Export from our site into Zoho
  2. Import from Zoho Into MailChimp
  3. Pull data from MailChimp back into our website (just the status of newsletter subscriptions)

My idea is that we would iterate this process weekly or so. Is this ok or just way off the mark?

Many, many thanks in advance and I'm happy to clarify anything.

like image 213
Ryan Avatar asked Feb 02 '11 22:02

Ryan


1 Answers

First, I think you need a developer.

Second, I don't know Zoho, but, here's what I do know...

The MailChimp API provides everything you need. The use of web hooks will also help maintain that sync. In the past I have had a similar situation in which:

  1. When a user subscribes (to the list or opts in/out of groups) the information on the MailChimp list is updated using the listSubscribe API call with double_optin=False and update_existing=True. We were doing the double-optin on our side and the update_existing allows both subscriptions and updating the group.

  2. A web hook was setup to capture subscribes, unsubscribes, and profile updates and update our database. The way I was doing this, is using listMemberInfo in the web hook to make sure I got the opt-in IP and time as well.

  3. I had a weekly cron that ran through all our users and synced them up just in case MailChimp was down when a user subscribed or something else along those lines. A little extra peace of mind.

All that being said, I recently spent an entire weekend re-coding the software on our end to not longer need to maintain the redundant data. MailChimp has the subscription status, period. We only store the email address, last known status, optin time, and optin IP on our end. Any time the user makes a change on our site, it is immediately sent to MailChimp and anytime we query the user's subscription status it comes from MailChimp.

For example, our "email settings" form is loaded by a call to listMemberInfo and then the form handler saves the information to MailChimp with a call to listUpdateMember or listSubscribe. The MailChimp API will even pass what types of form fields to use for the groups (checkbox, select, radio).

like image 64
Micah Carrick Avatar answered Sep 28 '22 12:09

Micah Carrick