Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › How to go about Interspire Email Marketer Integration
Tagged: autoresponder, emailmarketer, estore, IEM to eStore, integration, Interspire, wordpress
- This topic has 12 replies, 6 voices, and was last updated 10 years, 5 months ago by jacobspaulsen.
-
AuthorPosts
-
October 3, 2010 at 8:26 am #1959mikru2010Member
I use Interspire Email Marketer as Autresponder and would like to integrate it with estore.
They have an xml api.
A pdf docu to it can be found here [http://is.gd/fI2Kc]
I’m not wexperienced with apis and have only basic programming know-how, so i hope someone here can point me in the right direction …
October 7, 2010 at 1:54 am #25026amin007ParticipantThe file that you will need to modify in eStore is called “eStore_auto_responder_handler.php”. This file has two functions that you will be interested in. These two functions are:
1. eStore_item_specific_autoresponder_signup
2. eStore_global_autoresponder_signup
These functions will automatically get called when eStore does the post payment processing and eStore will provide the following details of the customer to these functions:
– first name
– last name
– email address
You need to place your Interspire email marketing signup code inside these functions. To be more specific you will need to place something like the following (I got this sample code from the integration document you provided). You will need to place your username and usertoken in the code.. just read the code and you will understand as it’s a fairly simple piece of code:
$xml = '<xmlrequest>
<username>admin</username>
<usertoken>d467e49b221137215ebdab1ea4e046746de7d0ea</usertoken>
<requesttype>subscribers</requesttype>
<requestmethod>AddSubscriberToList</requestmethod>
<details>
<emailaddress>'.$emailaddress.'</emailaddress>
<mailinglist>1</mailinglist>
<format>html</format>
<confirmed>yes</confirmed>
<customfields>
<item>
<fieldid>1</fieldid>
<value>'.$firstname.' '.$lastname.'</value>
</item>
</customfields>
</details>
</xmlrequest>
';
$ch = curl_init('http://www.yourdomain.com/IEM/xml.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
$result = @curl_exec($ch);
if($result === false) {
echo "Error performing request";
}
else {
$xml_doc = simplexml_load_string($result);
echo 'Status is ', $xml_doc->status, '<br/>';
if ($xml_doc->status == 'SUCCESS') {
echo 'Data is ', $xml_doc->data, '<br/>';
} else {
echo 'Error is ', $xml_doc->errormessage, '<br/>';
}
}January 28, 2011 at 2:15 am #25027ChrisMemberHi Amin:
When I get the specific API code from Vertical Response (similar to above – although I believe they have a PHP version, not sure), do I need to copy it at the bottom of both of these functions you’ve listed, or just the last one (Global function)? Also, should I leave the MailChimp, GetResponse, AWeber code in there and just copy mine below that?
1. eStore_item_specific_autoresponder_signup
2. eStore_global_autoresponder_signup
January 28, 2011 at 4:11 am #25028amin007ParticipantIf you are only using the global option then you only need to worry about the function that handles the global one. I have updated this post with some more details which might be helpful:
Can My Autoresponder/Email Marketing Manager be Integrated with Your Plugins?
Check the “Some info for developers” section.
July 26, 2011 at 11:48 am #25029VisualMarketingMemberHas anyone actually created the estore to Interspire AutoResponder functionality yet? We are looking into this but no use recreating the wheel if its already been done.
November 20, 2011 at 9:50 am #25030mikru2010MemberI was able to add a subscriber via the XML Api to a prodiuct specific contact list.
But no matter what i try only the E-Mail shows up in the contact list, not the name.
(Still the customer name and email are added to estore properly)
Thus i need advice / sample how to fill <customfiels> with customer name for free product.
Here is the excerpt from API and previous instruction how to use it with estore:
<customfields>
<item>
<fieldid>1</fieldid>
<value>’.$firstname.’ ‘.$lastname.'</value>
</item>
</customfields>
However, the above code does not put customer name on the list.
I also tried combinations of
<fieldid>REAL NAME of field used in Interspire contact list</fieldid>
and
<fieldid>name</fieldid>
with
<value>’.$firstname.’ ‘.$lastname.'</value>
and
<value>’.$customer_name.'</value>
But no combination puts the name on the contact list in Email-Marketer – all i get is the email.
November 20, 2011 at 12:15 pm #25031mikru2010MemberI also noticed an attempt by estore to send several emails trying to sign-up my subscriber to aweber – which is odd, as i don’t use aweber and just try to figure out integrating my own autoresponder script (Email-Marketer)
“This is an automatic email that is sent to AWeber for member signup purpose”
Estore also seems to split the listname up into severla lists / emails.
For instance my list in Email-Marketer is named like this:
Word1 Word2 Word3-Word4 Word5.
Estore seems to treat each of these words (and even the “-” as separate lists and sends / tries to send subscriber mail to lists Word1, Word2, Word3, Word4, Word5 and even to the “-” between Word3 and Word4.
And the emails aren’t adressed to aweber, but to my own server like “Word1@myserver.net> etc.
Is this perhaps caused by storing a listname in the Autoresponder Settings of the product?
November 20, 2011 at 10:28 pm #25032adminKeymasterYou won’t be able to do this integration unless you are a developer and understand PHP code well. You can contact us to get a custom job done or hire a freelance developer who will be able to do this for you.
November 25, 2011 at 5:10 pm #25033mikru2010MemberJust let me know what i should put in to the api to get the name transmitted by it, as email is getting transmitted fine.
Obviously your previous suggestion (s. earlier in this thread) isn’t transmitting the customer name:
<customfields>
<item>
<fieldid>1</fieldid>
<value>’.$firstname.’ ‘.$lastname.'</value>
</item>
</customfields>
So what input for “fieldid” and “Value” would you suggest?
Could it be that it’s not working because your plugin just has a “name” field for the free product squeeze and does not differentiate between first- and lastname?
November 25, 2011 at 5:13 pm #25034mikru2010MemberIt would also help to know where exactly to place the code in the fuctions you named.
November 25, 2011 at 10:59 pm #25035adminKeymasterI am pretty sure the plugin is sending the name data fine but if you look closely you will see that this interspire guys do not have a dedicated variable for “name” (they have one for email address).
They are using a custom field for name but you could be sending any data using that custom field. So my guess is that on your list or settings section of Interspire, you will need to specify what this “fieldid” with a value of “1” means so it knows that the value that comes via filedid 1 is name value.
December 3, 2011 at 9:12 pm #25036mikru2010MemberOk, i was able to figure out how to get the customer name transmitted to my list.
Hope this helps others with integrating Interspire Emailmarketer too.
Here is the part from the api for the name, and how i filled it:
<customfields>
<item>
<fieldid>14</fieldid>
<value>’.$firstname.’ ‘.$lastname.'</value>
</item>
</customfields>
As fieldid, you simply set the id of the custom field you use for the customer name on your list in Emailmarketer.
Here’s how to go about it:
Step 1: create a custom field in Emailmarketer (or decide which existing one to use) for representing the customer name on your list.
Step 2: create a sign-up form for your list and add the customfield from Step 1
Step 3: Get html for your list and identify the field id for your custom field. Look for CustomFields[xx] – where xx represents the number of your custom field
Step 4: insert your custom field id (number xx) into api code as shown above
Step 5: set estore variables as “<value>”; for instance
<value>’.$firstname.’ ‘.$lastname.'</value>
if you want to use first – and lastname like me.
Perhaps ‘.$CustomerName.’ will work too (haven’t tested that)
One last hint:
I simply inserted the (complete) api code after line 277
$retrieved_product = WP_eStore_Db_Access::find(WP_ESTORE_DB_PRODUCTS_TABLE_NAME, $cond);
in the auto_responder_handler php
and left the rest of the code unchanged.
That worked like a charm
But i don’t know though if there might be a better place to insert the code.
Good luck with your Interspire integration
June 6, 2014 at 8:54 pm #25037jacobspaulsenMemberI see this thread is a little old but I thought I would add an option here that may be much simpler. Here is a plugin that will pass any new WordPress user to IEM. It maps each WP Meta Field with an IEM Custom field. Super easy to use and install.
[www.iemaddons.com]
-
AuthorPosts
- You must be logged in to reply to this topic.