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

Other
22 stars 43 forks source link

New emails added via push to Mailchimp are shown as deleted & have incomplete info #311

Open scoobird opened 5 years ago

scoobird commented 5 years ago

Using Wordpress.

After adding a CiviCRM contact to CiviCRM groups synced with the full list and also an interest group, and running push sync from Civi to Mailchimp: the sync appears to succeed, the contact's email appears in Mailchimp, the email appears to be subscribed to the mailing list and interest group. However, the contact's first name and last name are not synced. And in Mailchimp, when viewing the contact a warning message appears: "This contact is deleted."

In the logs, I see the first name and last name are being sent as merge_fields in the body of the PUT request.

I cannot discern any pattern with the email addresses locations, bulk mail settings, or contacts in CiviCRM that is influencing this behavior. It seems to affect all emails that are new to Mailchimp.

Any help with workarounds or clues would be helpful! Please let me know if more info is needed. Thanks!

scoobird commented 5 years ago

Hello, just following up here. This issue was caused by a required custom Merge field in Mailchimp, giving the following response to the API request:

                [field] => MMERGE6
                [message] => Please enter a value

The response was logged in the mailchimp logs, but resulted in the error state I described. I would suggest an improvement that either checks for required merge fields and prevents the sync from starting, or a bigger improvement that allows mapping CiviCRM contact/email/address fields to merge fields for the linked group.