<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FanMail Marketing &#124; Blog &#187; ExactTarget</title>
	<atom:link href="http://blog.fanmailmarketing.com/tag/exacttarget/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fanmailmarketing.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 19:16:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Creating A Data Filter Via SOAP API In ExactTarget Using PHP</title>
		<link>http://blog.fanmailmarketing.com/creating-a-data-filter-via-soap-api-in-exacttarget-using-php/</link>
		<comments>http://blog.fanmailmarketing.com/creating-a-data-filter-via-soap-api-in-exacttarget-using-php/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 13:30:54 +0000</pubDate>
		<dc:creator>Nick Holdren</dc:creator>
				<category><![CDATA[Code Tutorials]]></category>
		<category><![CDATA[Data Filter]]></category>
		<category><![CDATA[ExactTarget]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://blog.fanmailmarketing.com/?p=2614</guid>
		<description><![CDATA[A newly added (or just now documented) feature of the ExactTarget SOAP API is the creation of Data Filters. A Data Filter is simply a set of simple logical operators strung together to create a query like filter. What really makes this powerful is that all ExactTarget accounts have Data Filters, which makes this a [...]]]></description>
			<content:encoded><![CDATA[<p>A newly added (or just now documented) feature of the ExactTarget SOAP API is the creation of Data Filters. A Data Filter is simply a set of simple logical operators strung together to create a query like filter. What really makes this powerful is that all ExactTarget accounts have Data Filters, which makes this a viable solution across the ExactTarget realm. And, it also can be used to replace simple query activities that would normally be needed without the need for AIM to be turned on. </p>
<pre>
$wsdl = 'https://webservice.exacttarget.com/etframework.wsdl';

/* Create the Soap Client */
$client = new ExactTargetSoapClient($wsdl, array('trace'=>1));

/* Set username and password here */
$client->username = "username";
$client->password = "password";

$sf_1 = new ExactTarget_SimpleFilterPart();
$sf_1->Property = "First Name";
$sf_1->SimpleOperator = ExactTarget_SimpleOperators::equals;
$sf_1->Value = "Nick";

$sf_1 = new SoapVar($sf_1, SOAP_ENC_OBJECT, 'SimpleFilterPart', "http://exacttarget.com/wsdl/partnerAPI");

$sf_2 = new ExactTarget_SimpleFilterPart();
$sf_2->Property = "First Name";
$sf_2->SimpleOperator = ExactTarget_SimpleOperators::equals;
$sf_2->Value = "Mike";

$sf_2 = new SoapVar($sf_2, SOAP_ENC_OBJECT, 'SimpleFilterPart', "http://exacttarget.com/wsdl/partnerAPI");

$cf = new ExactTarget_ComplexFilterPart();
$cf->LeftOperand = $sf_1;
$cf->LogicalOperator = ExactTarget_LogicalOperators::_OR;
$cf->RightOperand = $sf_2;

$cf = new SoapVar($cf, SOAP_ENC_OBJECT, 'ComplexFilterPart', "http://exacttarget.com/wsdl/partnerAPI");

$fd = new ExactTarget_FilterDefinition();
$fd->Name = "My Filter Name";
$fd->CustomerKey = "my_filter_key";
$fd->Description = "My API Filter";
$fd->DataFilter = $cf;

$object = new SoapVar($fd, SOAP_ENC_OBJECT, 'FilterDefinition', "http://exacttarget.com/wsdl/partnerAPI");

$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.fanmailmarketing.com/creating-a-data-filter-via-soap-api-in-exacttarget-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using The Lookup Function In Server-side Javascript</title>
		<link>http://blog.fanmailmarketing.com/using-the-lookup-function-in-server-side-javascript/</link>
		<comments>http://blog.fanmailmarketing.com/using-the-lookup-function-in-server-side-javascript/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 14:00:43 +0000</pubDate>
		<dc:creator>Nick Holdren</dc:creator>
				<category><![CDATA[Code Tutorials]]></category>
		<category><![CDATA[ExactTarget]]></category>
		<category><![CDATA[Lookup]]></category>
		<category><![CDATA[Server-side Javascript]]></category>

		<guid isPermaLink="false">http://blog.fanmailmarketing.com/?p=1887</guid>
		<description><![CDATA[When using dynamic content within emails on the ExactTarget platform it is often useful to pull data from Data Extensions in order to populate content. Since the Retrieve function is not available within emails, therefore, developers are forced to use the Lookup function. At first glance, the ExactTarget wiki sample code (found here) is a [...]]]></description>
			<content:encoded><![CDATA[<p>When using dynamic content within emails on the ExactTarget platform it is often useful to pull data from Data Extensions in order to populate content. Since the Retrieve function is not available within emails, therefore, developers are forced to use the Lookup function. At first glance, the ExactTarget wiki sample code (<a href="http://wiki.memberlandingpages.com/010_ExactTarget/020_Content/Server-Side_JavaScript/Server-side_JavaScript_Syntax_Guide/Data_Extension_Server-Side_JavaScript_Functions" target="_blank">found here</a>) is a little misleading in that it suggests that only one column from the selected Data Extension can be searched on. Below is the sample code for a simple Lookup:</p>
<pre>
var testDE = DataExtension.Init("testDE");
var data = testDE.Rows.Lookup(["Age"], [25], 2, "LastName");
</pre>
<p>The first two arguments of the function are the column to search and then the value to search for. It is very simple, but what gets overlooked is that the first two parameters actually accept array data types as their arguments. This means that multiple columns can be searched on for their respective values! Take a look at what I mean:</p>
<pre class="brush:javascript">var testDE = DataExtension.Init("testDE");
var data = testDE.Rows.Lookup(["Age", "Zipcode"], [25, "45014"], 2, "LastName");</pre>
<p>This will return all records where the age equals 25 and the zipcode equals 45014. Using multi-column lookups will help return smaller record sets, which cuts down on additional filtering and load time. Hopefully, this will be useful in extending the functionality and efficiency of your ExactTarget emails. Click <a href="http://etpartnerlabs.com/wp-content/uploads/2011/08/JavascriptMultiColumnLookupExample.html" target="_blank">here</a> to download the entire source code example.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fanmailmarketing.com/using-the-lookup-function-in-server-side-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using TreatAsContentArea With External APIs</title>
		<link>http://blog.fanmailmarketing.com/using-treatascontentarea-with-external-apis/</link>
		<comments>http://blog.fanmailmarketing.com/using-treatascontentarea-with-external-apis/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 14:00:51 +0000</pubDate>
		<dc:creator>Nick Holdren</dc:creator>
				<category><![CDATA[Code Tutorials]]></category>
		<category><![CDATA[ExactTarget]]></category>
		<category><![CDATA[AMPScript]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[TreatAsContentArea]]></category>

		<guid isPermaLink="false">http://blog.fanmailmarketing.com/?p=2401</guid>
		<description><![CDATA[If already don&#8217;t know about ExactTarget AMPScript TreatAsContentArea function, well you definitely should. It is an essential tool when sending large scale emails where several different sets of content are to be sent out depending on attributes of a subscriber. What makes TACA (TreatAsContentArea) so unique and useful is that is a caching function for [...]]]></description>
			<content:encoded><![CDATA[<p>If already don&#8217;t know about ExactTarget AMPScript TreatAsContentArea function, well you definitely should. It is an essential tool when sending large scale emails where several different sets of content are to be sent out depending on attributes of a subscriber. What makes TACA (TreatAsContentArea) so unique and useful is that is a caching function for content. What does this mean? And, how does this apply to my ExactTarget email sends? Well let&#8217;s look at a theoretical situation where I want to send a weather forecast to everyone of my subscribers in the United States based on state.</p>
<p>What TACA Does For Us</p>
<p>As you know there are 50 states within the US and thus I will have to generate 50 different types of content, one for each state. Now, I can send the email without using TACA and it will work just fine, but it will not be the most efficient. Imagine if I wanted to send an email to every single person in the US (approx 300 million people). This would mean I would have to generate the content for every subscriber, which as you can imagine would really slow this send down. Enter TACA. What if I could cache the content for each state and then send? This is exactly what TACA allows us to do. Let&#8217;s take a look at some theoretical code.</p>
<p>1. First, the TACA syntax: TreatAsContentArea(&#8220;unique_key&#8221;, &#8220;content&#8221;, &#8220;impression_region&#8221;)</p>
<p>The first parameter is the unique identifier for the content. In our theoretical case we could use the state abbreviation, which is easily found by pulling it from the subscriber&#8217;s attributes. As for the content, we could use a pre-generated content area or a lookup from a content area. Finally, the last parameter defines the impression region for the content.</p>
<p>2. How Exactly Does TACA work?</p>
<p>This is probably the simplest thing about TACA and makes everything make sense. For each unique key that TACA uses it caches the content for that key. When that key is used later during the send the data is pulled from cache rather than evaluating the content parameter. For example, say our first subscriber lives in California. The first time through TACA, we give it a unique key of CA based off the subscriber&#8217;s attribute. The next subscriber is from Ohio, so their key is OH. The third subscriber is from California, so TACA takes initiative here. When we again insert CA as the key for the third subscriber, it pulls from cache the CA key and doesn&#8217;t evaluate the content parameter twice. Likewise, any subsequent duplicate key will retrieve the cached content.</p>
<p>3. How to use with External APIs?</p>
<p>The idea of caching when using external APIs is very very important. In our theoretical situation recall we wanted to send to approx. 300 million people, but most APIs don&#8217;t let us hit their API more that a couple thousand times an hour if that. So what do you do? Cache it. In our example case we only have 50 possible combinations, so if we were to use the weather.com API, why would we want to ping the API 300 million times when we only have to do it 50 times. This is the true beauty of TACA. Let&#8217;s take an example:</p>
<p>TreatAsContentArea(&#8220;OH&#8221;, HTTPGet(&#8220;http://weather.com/get/?state=oh), &#8220;weather&#8221;)</p>
<p>This will retrieve data from the &#8220;theoretical&#8221; API endpoint and store it under the key OH. However, we need to make one addition in order to mitigate the risk of HTML content being retrieved by TACA and then rendering it. We want to encode the content prior to caching it. We&#8217;ll use Base64Encode and then Base64Decode when we want to use the content.</p>
<p>Set @weather = TreatAsContentArea(&#8220;OH&#8221;, Base64Encode(HTTPGet(&#8220;http://weather.com/get/?state=oh)), &#8220;weather&#8221;)<br />
Set @weather = Base64Decode(@weather)</p>
<p>This will let you retrieve the data from the API without going over on your API usage!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fanmailmarketing.com/using-treatascontentarea-with-external-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use the Lookup Function In AMPScript</title>
		<link>http://blog.fanmailmarketing.com/using-the-lookup-function-in-ampscript/</link>
		<comments>http://blog.fanmailmarketing.com/using-the-lookup-function-in-ampscript/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 14:00:35 +0000</pubDate>
		<dc:creator>Nick Holdren</dc:creator>
				<category><![CDATA[Code Tutorials]]></category>
		<category><![CDATA[AMPScript]]></category>
		<category><![CDATA[ExactTarget]]></category>
		<category><![CDATA[Lookup]]></category>

		<guid isPermaLink="false">http://blog.fanmailmarketing.com/?p=1879</guid>
		<description><![CDATA[I would like to start by saying that AMPScript is a very powerful tool to use when creating dynamic emails within ExactTarget. It is well documented and has a diverse range of functionality to do the very simplest tasks to the most complex. One of the most common uses is to access data within Data [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to start by saying that AMPScript is a very powerful tool to use when creating dynamic emails within ExactTarget. It is well documented and has a diverse range of functionality to do the very simplest tasks to the most complex. One of the most common uses is to access data within Data Extensions for creating dynamic content within emails. ExactTarget provides several different methods to lookup this data, but fails to detail one important aspect and that is multi-conditional lookups. Let&#8217;s take a look at what ExactTarget provides us for a basic lookup call using the syntax Lookup(Data Extension, Order By Column, Condition Column, Condition Value):</p>
<pre>%%=Lookup("PostalCode", "City", "PostalCode", 46016)=%%</pre>
<p>This is a single condition lookup that targets the &#8220;PostalCode&#8221; data extension, sorts by &#8220;City&#8221;, and finds only cities with &#8220;PostalCode&#8221; equaling 46016. But what if I wanted to find cities with &#8220;PostalCode&#8221; equaling 46016 and 45236? Without a multi-conditional lookup I would have to look over the result set of the first lookup and perform lookups for each of those results. That route is very time consuming and will slow down the send time of the email greatly. What ExactTarget fails to mention about their Lookup function is that they are all multi-conditional. The real syntax should be: Lookup(DE,Order,Condition<sub>1</sub>,Value<sub>1</sub>&#8230;Condition<sub>n</sub>, Value<sub>n</sub>). This would then make our lookup for multiple postal codes as such:</p>
<pre>%%=Lookup("PostalCode", "City", "PostalCode", 46016, "PostalCode", 45236)=%%</pre>
<p>This will create the multi-conditional lookup that we were wanting and like the proposed syntax one can create infinitely many conditions. Hope this helps in creating your dynamic emails!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fanmailmarketing.com/using-the-lookup-function-in-ampscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExactTarget SOAP API Wrapper</title>
		<link>http://blog.fanmailmarketing.com/exacttarget-soap-api-wrapper/</link>
		<comments>http://blog.fanmailmarketing.com/exacttarget-soap-api-wrapper/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 13:00:05 +0000</pubDate>
		<dc:creator>Nick Holdren</dc:creator>
				<category><![CDATA[Code Tutorials]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[ExactTarget]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://blog.fanmailmarketing.com/?p=1871</guid>
		<description><![CDATA[Although having the ability to wrap the entire SOAP API would be nice I found it nearly impossible. However, I&#8217;ve made a simplified version that allows one to act on ExactTarget objects. It allows for Create, Update, Delete, Retrieve, and Upsert of an object. Again, it is simple but it will save in writing a [...]]]></description>
			<content:encoded><![CDATA[<p>Although having the ability to wrap the entire SOAP API would be nice I found it nearly impossible. However, I&#8217;ve made a simplified version that allows one to act on ExactTarget objects. It allows for Create, Update, Delete, Retrieve, and Upsert of an object. Again, it is simple but it will save in writing a few lines of code. And, anyone is more than welcome to contribute code!</p>
<p>Enough with the intro get to it!<br />
<a href="https://github.com/jhwatchtower/ExactTarget-SOAP-API-Wrapper">Download the ExactTarget SOAP API Wrapper</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fanmailmarketing.com/exacttarget-soap-api-wrapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

