Who autoresponder sent to?

5 views
Skip to first unread message

Ken Louf

unread,
Jun 26, 2009, 5:15:41 PM6/26/09
to MailChimp API Discuss
With campaignNotOpenedAIM() and campaignOpenedAIM() we can get all the
email addresses that a campaign has sent to. What we want to do is
retrieve the list of e-mail addresses that an autoresponder has sent
to, but only for the last time the autoresponder was sent. Am i
completely missing an easy way to do this, or is the only way to do
this is to segment the list based on the same rules as the
autoresponder?

Thanks,
Ken

jesse

unread,
Jun 26, 2009, 6:32:35 PM6/26/09
to MailChimp API Discuss
Ken -
The main issue you are running into is that we have not officially
made the API support all of the Autoresponder functionality. In fact
until 10 days ago when a user asked, none of the campaignStats methods
even worked for Autoresponders, though we quickly opened that up since
it was a quick and easy change to allow that.

There are two approaches you can try that should work to varying
degrees - both require using the start/limit parameters and tracking
where you are in the paging, then picking back up from there the next
time you need to collect data. While the lists should consistently
return data in the same order, it is possible for that to change if a
list member is completely deleted, so you may want to giving yourself
a little padding. The 2 methods you can use to do this are
campaignOpenedAIM() and campaignEmailStatsAIMAll(). For the former, if
you need to detect multiple opens, it returns the number of times
opened. For the latter, you can sum the number of opens for the same
effect or look at the timestamps returned for opens.

An alternative is to skip the paging and simple pull all of the opens
for an Autoresponder and deal with new opens using the same data.

Honestly I'm not sure how segmenting the list (assuming you mean
creating multiple lists) would help in this situation.

If I've overlooked something or raised more questions for you, let me
know.


jesse

Ken Louf

unread,
Jun 29, 2009, 10:54:36 AM6/29/09
to MailChimp API Discuss
Thanks Jesse,

Trying to use campaignEmailStatsAIMAll(), but am getting an
InvalidCastException - we are using the ,NET API Wrapper DLL, API
v1.1 :

Unable to cast object of type 'System.Object[]' to type
'CookComputing.XmlRpc.XmlRpcStruct'.

I know the .NET wrapper hasn't been updated as much as the PHP wrapper
- did something change somewhere and the .NET API wrapper just hasn't
been updated or am I missing something?

just doing a simple loop through and it is breaking in the api wrapper
on the call to campaignEmailStatsAIMAll()

MCCampaign[] campaigns = mcApiWrapper.campaigns();
foreach (MCCampaign campaign in campaigns)
{
MCAIMEmail[] aimEmails = mcApiWrapper.campaignEmailStatsAIMAll
(campaign.id);
foreach (MCAIMEmail aimEmail in aimEmails)
{
...
}
}

Thanks for any help you can provide,
Ken

jesse

unread,
Jun 30, 2009, 4:53:20 PM6/30/09
to MailChimp API Discuss
Ken -
Apparently I didn't get anywhere near the realm of testing that
function when I added it. I spent some time today and got the DLL and
test exe updated so it works correctly now. You will need to grab the
new version from the downloads page:
http://www.mailchimp.com/api/downloads/


jesse

Ken Louf

unread,
Jul 1, 2009, 10:18:47 AM7/1/09
to MailChimp API Discuss
Awesome - Thank you Jesse.

-Ken
Reply all
Reply to author
Forward
0 new messages