Reputation: 548
I use mailchaimp automation workflow on a landing page to send emails to my customers.
The automation workflow is :
This workflow work great the first time but if my visitor subscribe a second time (because he forgot) i have this error when i call my trigger :
Array ( [type] => http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/ [title] => Bad Request [status] => 400 [detail] => You’ve already sent this email to the subscriber. [instance] => )
Any idea how allow my visitor to ask the same email multiple time ?
Upvotes: 4
Views: 3572
Reputation: 1435
As of March 2018 this is still a limitation/issue. According to MailChimp's support team: "The only campaigns that can be sent to any contacts more than once are certain date-based automations."
There are a few options:
Remove the contact from the list after the email has been sent. Adding it again should create a new subscriber id, making it eligible for resend. If MailChimp is being used to manage the contact list, you can add the contact to a parallel list that is not used for sending.
Create a duplicate automation with the trigger type "manually added to workflow". This allows you to have one list and one workflow, but it means you have to keep track of how many times you have resent the message so that you can call the correct automation. Also, if you only make 3 automations, for example, you can only send the message up to 3 times.
Create a separate campaign/list for resend. This is more tedious to configure, since you have to create the new campaign and list N times for the number of times you want to be able to resend. Plus you either have to track how many times it has been resent or query MailChimp to determine in which lists the contact is present. On the up-side, it gives the ability to send a more customized "resent" message.
Upvotes: 5
Reputation: 75
When you subscribe a new user, make sure that you check that email hasn't already been subscribed. If they have, return an error to them saying "This email has already been subscribed".
The API call to read/GET a subscriber is here: https://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#read-get_lists_list_id_members_subscriber_hash
When you call that in PHP, check the response 'status' - if the value is 'subscribed' then you display your error, otherwise you can make the call for subscribing the user.
Remember that when using the GET call the subscriber hash you use in this email should be calculated like this:
$subscriber_hash = md5( strtolower ( $email ) );
Upvotes: -2