Updated: New Version 0.99 - Still unfinished

Yes, it is still an unfinished version (v.0.99) I only implemented methods we actually needed for client work. If anything is missing and you add to it, please share with the rest of us.

Available Methods for interaction with Mailchimp API

  • isEmail
  • login (depricated in MCApi.1.2)
  • listBatchSubscribe
  • ListBatchUnsubscribe
  • listInterestGroupAdd
  • ListInterestGRoupDel
  • ListMemberinfo
  • ListMembers
  • lists
  • listInterestGroups
  • listSubscribe
  • listUnsubscribe
  • CampaignContent
  • campaigns
  • campaignStats
  • CampaignAbuseReports
  • CampaignClickStats
  • CampaignHardBounces
  • campaignSoftBounces
  • campaignUnsubscribes
  • CampaignEmailStatsAIMAll
  • createCampaign
  • listTemplates

Earlier this week a fellow programmer pointed out to me just how far behind the posted version of this CFC was, that I had to jump to action and share my updated version, that we us now since December 2010.

The 1.2 invocation code

I still need to read up about v1.3 changes of the API.
<cfset apiKey = "GetYourOwnAPIKey">
<cfset url= "http://#listlast(application.mc.apiKey, "-")#.api.mailchimp.com/1.2/">
<cfset output = "xml">
<cfset mp = createObject("component","components.mailchimp099").init(apiKey,url,output)>
You need to replace "GetYourOwnAPIKey" with your account's API Key. You'll find it on Mailchimp under Account Settings > APIKeys https://us1.admin.mailchimp.com/account/api

For a query recordset of all your lists:
<cfset qryMylists = mp.lists(apikey)>

For Groups of a specific list
<cfset interestgroups = mp.listInterestGroups(apikey,listid)>
   
<ul>
<cfloop from="1" to="#ArrayLen(interestgroups.groups)#" index="g">
   <cfoutput><li>#interestgroups.groups[g]#</li></cfoutput>
</cfloop>
</ul>

A set of Templates:
<cfset qryMyTemplates = mp.listTemplates(application.mc.apikey)>
These examples should get you started.

Feel free to email (bph@idxtools.org) me with suggestions, corrections and other comments. Or stop by our IDXTools blog and leave a comment.

You can also follow me on Twitter: @bph

Stay in touch!

Includes now AIM stats

The major update is the inclusion of the "campaignEmailStatsAIMAll" method. In order to use this method, you would need to have AIM Reporst enabled on your MailChimp account.

It's an upgrade that cost around $49 one-time fee. It will enable you to retrieve MailChimp stats on a subscriber basis and this CFWrapper method will help you update your own CRM system with the Mailchimp history data.

Other updates were mostly basic code clean-up and error inclusion for the methods "login" and "campaignEmailStatsAIMAll"

(+) testCampaignAIMStats.cfm to test your AIM stats

(+) testCampaigns.cfm includes now a link to AIM stats per campaign.

(+) mailChimp.cfc with added methods.

Note: There have been users downloading the cfc and I would really like some feedback if it's working not working, something missing...

Happy New Year! May the force be with you!

Today's updates

(-) Interestgroups method, now returns a structure
(-) CampaignAbuseReports method, all tested now
(-) (+) Added CampaignUnsubscribes method
(+) Added CampaignHardBounces method
(+) Added CampaignSoftBounces method
(-) Improved the flow for the various methods in the test files
(+) Added test.cfm as starting point for your test.

Updated compontent and test templates

(-) fixed a typo in return type.
(+) better flow of test templates for lists, member and campaign information(read: Getting Started)
(-) fixed CampaignStats method
(-) return member struct for listMemberinfo method.
(-) display all stats values in testCampaignStats
(+) added CampaignAbuseReports method (test mode)
(+) added CampaignClickStats method (test mode)
( CampaignClicks call doesn't return URLs from API. Bug report sent to MailChimp (11/14 10:45 pm))
(+) added testStatsDetails.cfm

BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress