Home > Newsletters > Interspire Email Marketer – Integrating with Other Systems

Interspire Email Marketer – Integrating with Other Systems

Update May 6th 2010: I have quite a lot of people asking for my code, but I need to point out it is not complete at all, but more like a half baked attempt to work out this API thing.. I would really like to spend more time on this and write a more definitive guide, but alas, time gets the better of me. Please see my long comment below for the email I send people. The file I refer to is here.

Update January 13th 2010: I had a little breakthrough this evening… It’s possible to use the XML API to call PHP functions in the subscribers.php file. So there is no need to modify the xml.php or subscribers.php files to do some updates like for Custom Fields. I hope to be able to write another blog on this to explain it more, but in the meantime you can contact me to obtain an email I sent to someone earlier that explains it in more detail.

Update December 15th 2009: As stated in the comments below, I believe the IEM API to be more powerful than the Interspire instructions suggest, and as such believe some of my coding and changes are not required, or could be improved. I therefore do not think I should be giving out the scripts anymore as I have been, but instead would like to investigate the subscribers.php API in more detail.



Interspire Email Marketer
(IEM), in my opinion, is the best newsletter system on the market that can be downloaded and installed on your own server. At least, I cannot find any other that comes close to it’s features, and I have looked hard. It does have one drawback though, and that’s the system API does not support integrating it into third party applications so subscribers can update their newsletter preferences from within another system. Interspire stated they don’t provide support on technical aspects of the API, so I have had to create my own API functions until they realise the benefit of this and write one themselves. This blog gives you a quick overview of the files to edit.

Integrating Interspire Email Marketer into a Third Party System

Firstly I have to say I needed help with this. Unfortunately Interspire took a long time to respond with the answer “we do not provide technical support for customization, integration, or the API“! Not only a long response time, but with no help on what is a comparatively expensive system for small businesses (the price has more than doubled since last year).

So with a few days over the weekend and missing all this great sun :( I have written my own functions :)

I initially realised there is no UpdateSubscriber function within the API, and so had to create my own. I now have a third party system (Zencart Shopping Cart) in which account holders can view their newsletter subscriptions and change them such us subscribe or unsubscribe. This will then automatically update the IEM newsletter system. Not only that, if a subscriber changes their email address, or actual address and telephone numbers, then these are also updated in IEM. FANTASTIC! Otherwise customers would need to login to two systems to change details… that’s not good, and is asking for trouble.

So now I have an excellent newsletter system that subscribers can manage their data from with a third party system. Yes, I know this should be straightforward and standard you say, which is why my clients of course asked me to do it, but very surprisingly this was not built into IEM.

The code is too much to go into detail here, only that the following files need updating, based on other functions:-

  • /xml.php
  • /admin/functions/api/subscribers.php

The main functions I created were:-

  • xml.php - case ‘updatesubscriber’ was created to action an UpdateSubscriber call in the XML data passed to IEM
  • subscribers.php – function UpdateSubscriberCustomField() was created to update the Custom fields you have created. This in turn calls a few other functions already there such as UpdateEmailAddress() and ChangeSubscriberFormat().

I do hope Interspire can eventually introduce this into their code as I am sure they would do a better job than I, but in the meantime at least I have a working integration.

Their API documentation can be here .

Alternatively just contact me if you want to know more.



Author: Laurence Cope Categories: Newsletters Tags:
  1. June 2nd, 2009 at 10:21 | #1

    Hey Laurence

    First off , great work ! It’s indeed a shame that Interspire doesn’t provide a more fully equiped API :(

    I found your post on the interspire forum and followed your link.

    I’m actually considering building a Middleware solution for the Interspire email marketing platform that would allow XML calls to the Middleware , which then runs queries directy on the database and returns XML data …

    I have actually lost a very big client for exactly this reason :(

    Kind regards
    Bram Van Daele
    Managing director – Teneo – http://www.teneo.be

  2. July 1st, 2009 at 20:28 | #2

    Thanks for the post. I was researching Interspire when I found this post. I am consider buying an email marketing software, but I think I like http://www.omnistarmailer.com a lot better then Interspire, can you post this and see if your reads have any info on Omnistar Mailer

  3. July 6th, 2009 at 21:36 | #3

    @chuck
    I am happy for anyone to post suggestions of other newsletter systems, I am always on the look out for something else at a good price. I looked at Omnistar (briefly) and although the pricing is a lot more reasonable, my initial impressions are that Interpsire is still the leading system in its field. I look forward to a competitor system that is either equal at a lower price, or that will drive the Interspire prices down.

  4. James
    November 11th, 2009 at 19:34 | #4

    I am trying to create a scriptable import tool that will export and import from IEM. At first i tried to use the xml api. I dont think its possible. Do you think this is possible to do using a method like you did. Also would you be willing to share your source with me. Thanks for the article.

  5. Stephen
    November 18th, 2009 at 03:28 | #5

    I was wondering if you have done any work with SugarCRM and if through your work have found any way to integrate the two together. I am having a hard time finding a product that will fulfill my crm needs for my real estate business coupled with a product to continuously send monthly newsletters and track open rates etc. Thanks!

  6. Mark
    November 20th, 2009 at 02:48 | #6

    Hi Laurence,
    Thanks for posting your experience on customizing Interspire. Would you be willing to share your source code for your customization?
    Thanks.

  7. December 15th, 2009 at 18:17 | #7

    Thanks for everyones interest with this… I have had quite a lot of enquiries. But since writing this post, I have taken a closer look at the subscribers.php file and believe it is a lot more powerful than the Interspire API suggests. I therefore think some of my updates int he xml.php and subscribers.php file would be unnecessary and could be handled using the API already. I ideally would like to go through the subscribers.php file to see what it can handle, and maybe post a blog on that, but as we all know time is limited! So in the meantime I dont think it wise for me to give the script out without going through the subscribers.php file in more detail. I’ll update this post.

  8. December 15th, 2009 at 18:20 | #8

    @Stephen I have tried SugarCRM but for the needs of my clients it was too overblown. So we tried vTiger. But I am not aware of any integration with IEM. If none exist then using the API it can be created.

  9. February 25th, 2010 at 18:49 | #9

    I would be interested in something to integrate Joomla and IEM. Is it possible?

  10. February 25th, 2010 at 20:36 | #10

    Hi Carlos

    There are two options to integrate with Joomla, option 2 is probably the easiest…

    1) Create a Joomla Plugin. The plugin would intercept the registration details and add them to the IEM using the XML code that IEM supply on their API help site. If you dont use a Joomla Plugin you would have to hack the registration code in Joomla, so a plugin is best. Maybe read up on plugin development, or look at other user plugins to see how it works.

    OR

    2) You could use Community Builder because there is a plugin for Community Builder already developed, and I use it for some of my sites (although I have customised it for my own use). This may be better because you can then add a checkbox for someone to sign in due to legal requirements. The CB Plugin can be purchased at low cost and is in the Joomla Extensions directory http://extensions.joomla.org/extensions/extension-specific/community-builder-extensions/community-builder-ads/7493. Using Community Builder means you can ask for more fields at registration also if you wish.

  11. May 6th, 2010 at 12:55 | #11

    I have quite a lot of people asking for my code, but I need to point out it is not complete at all, but more like a half baked attempt to work out this API thing.. I would really like to spend more time on this and write a more definitive guide, but alas, time gets the better of me.

    So here is an email I sent to a few other people regarding integrating with Zencart, that tries to explain it more. Until I write another blog update and spend a little more time on it, this is all I have I am afraid. But hopefully explains how it works.. If you email me for the file and more info, you wont get anything more than this at the moment I am afraid, so I hope you can make some sense of this and it is helpful.

    The key to find out what functions you can call is to look into the subscribers.php file and find out the all the function names. Then you can call these using an XML call.

    ******************************************

    I think I have had a good breakthrough tonight… I needed to work on the site I originally did when I wrote the blog. I originally had to change some IEM files to make updating Custom fields work. But I updated IEM to the latest version recently for which my code did not work… so I decided to see if I can get away with not changing IEM code (so future updates work OK).

    It turns out you can use the XML API to call the PHP API functions found in /admin/functions/api/subscribers.php. So you can see all the possible functions in this file such as “SaveSubscriberCustomField()”. The problem I had was how to call this PHP function using the XML call. If you have the system on the same server you are integrating I think you can include the Interspire PHP files into your other system so you can call this PHP function directly… but my systems are on a different server so I need to use the XML via CURL. In the xml.php file within the “switch ($handlerMethod)” for the default case, is a little script that says “if the XML method does not exist, use the PHP function of same name”. So I just found out how to use the XML to call the functions in the subscribers.php file such as “SaveSubscriberCustomField()”. This means I do NOT need to modify IEM files which I wanted to avoid, and why I dont want to give the files out.

    One problem though is to update Custom Fields only one XML call can be made per custom field (I think) so I have to loop through an array of all the custom field data and send the XML call each time. This is not good due to multiple CURL operations each time a change is made, it would probably increase time and resources, but I cant see how to pass all the data in one XML call.

    So I should update the blog sometime to describe this with an example, although I am really busy. But i get a lot of people asking so I should get round to it sometime.

    In the meantime I have attached a class file I have created that I include in my Zencart files, in each page for creating an account, editing an account, changing newsletter subscriptions and updating address book and contact details. On each of these page files I call the relevant class methods. I include the file as follows:-

    require(‘iem_subscriber_update.php’);
    $iem_update = new IemUpdater();

    Then I can call the functions in my system as follows:-

    $iem_update->iemEditExistingUser($iem_newsletter_user, $customer);

    You can see I pass some arrays of data to these functions which is passed to IEM.

    I also do a lot of coding before calling these functions to process the data into correct formats, check if the email address has changed etc. These are in specific Zencart files and may be different for every system to integrate with.

    It STILL needs improvement… for example… I have not yet used the function to get the subscriber ID based on Email address, I have been storing the subscriber ID in my Zencart database for use when changing newsletter data, which is not good. I need to use the email address to retrieve the ID from IEM. Also, I store Custom Data in my Zencart database, but there may be a function to get it from IEM which is also the best way.

    There is also some customer specific code in the file, such as in the iemAddSubscriberToList() function. I need to streamline this function like the others and take the customer specific code out back into Zencart.

    *********************************************************

    Hope this helps until I am able to write an explanation on my blog.

  1. No trackbacks yet.