veda-consulting-company / uk.co.vedaconsulting.mailchimp

Other
22 stars 43 forks source link

Multiple CiviCRM contacts with the same e-mail address #195

Closed johanv closed 8 years ago

johanv commented 8 years ago

If an e-mailadress in mailchimp is found multiple times in CiviCRM (except when it is only once primary e-mail address), the extension will not add a contact to the CiviCRM group.

In our CiviCRM instance, we have a lot of young children (we are a youth organisation), and those children often have the same e-mail address as one of their parents. So a lot of our mailchimp members don't appear in the CiviCRM group.

I think matching could be improved as follows:

  1. if the e-mail address is unique in CiviCRM, use the contact of the unique e-mail address.
  2. if the e-mail address is not unique, but there is only one contact with the same e-mail address, the same first name and the same last name, use that contact.
  3. if the e-mail address is only used once as primary address in CiviCRM, use the contact with the e-mail address as primary addres.

1 and 3 are already implemented in the extension. We use a patch for 2. I will send a pull request in a minute, if you like this, you can merge it.