PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Mailchimp API failed calls

  1. Since converting my registration form to GravityForms, I integrated my Mailchimp signup into it as well. However, if I log into my mailchimp account and look at the historical API call by day (under Account->API Keys) I see that I have a high number of "failed calls" ~70%. What does gravity forms do when an API call fails? Is there some sort of log that I can look at to troubleshoot my settings? Is there a hook that I tie into so I can have it email me whenever their is a failed call?

    Posted 12 years ago on Friday August 26, 2011 | Permalink
  2. Gravity Forms does not log failed calls. The MailChimp API integration is one way. We make an API call and we pass it the field values. That is the extent of the integration. It's not two way, we don't receive information back from MailChimp.

    Does MailChimp have any information as to why a call failed? Do they fail it if an email already exists? If so that could be one cause. Because Gravity Forms wouldn't know if an email exists, it just sends any data you've configured when a form is submitted.

    Posted 12 years ago on Monday August 29, 2011 | Permalink
  3. Mailchimp just says whether the result was a success or not...they rely on the application to get a return value and then make a determination as to the problem. It would be great if they allowed you to troubleshoot from the website.

    However, I think I figured out what is going on. I spoke with customer support at Mailchimp a couple of days ago and they told me that any failed API calls are the result of problems with the request (bad formatting, improper call, etc.) If someone is already subscribed, it won't fail. After playing around with this, I think that is incorrect...I believe it will actually fail if there is a problem.

    In the meantime, I've added the following code to the export_feed method to have a note added to the entries that are involved with Mailchimp in order to get an idea of what is happening with the various entries (borrowed from the paypal plugin):

    if($current_user && $user_data = get_userdata($current_user->ID)){
                $user_id = $current_user->ID;
                $user_name = $user_data->display_name;
    RGFormsModel::add_note($entry["id"], $user_id, $user_name, sprintf(__("Status for subscription: %s", "gravityforms"), $retval));

    Will let you know if this truly is a problem

    Posted 12 years ago on Monday August 29, 2011 | Permalink
  4. The note is actually a very good idea. We can look into doing something like that with our email marketing add-ons where possible. We do that for the PayPal Add-On. Let me know if you uncover anything with it.

    Posted 12 years ago on Monday August 29, 2011 | Permalink
  5. So far it's worked well. It at least gives me an avenue to do some troubleshooting.

    Posted 12 years ago on Friday September 23, 2011 | Permalink