<?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>Brontoversity &#187; Developer</title>
	<atom:link href="http://brontoversity.com/category/developer/feed/" rel="self" type="application/rss+xml" />
	<link>http://brontoversity.com</link>
	<description>Product Education for Bronto's Email Marketing Application</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:57:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clear that List using the API v4</title>
		<link>http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/</link>
		<comments>http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 19:00:28 +0000</pubDate>
		<dc:creator>Andrew Kanes</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Did You Know?]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[new feature]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=8175</guid>
		<description><![CDATA[
Last fall, Alex explained how to Clear Contacts From Lists in v3 of the API. You now have the same ability in v4 API using the clearLists function. All you need to do is specify the list id returned from the addLists or readLists function. After you call clearLists, all your contacts will be removed [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/' rel='bookmark' title='Permanent Link: Spring Cleaning: Clearing Contacts From Lists'>Spring Cleaning: Clearing Contacts From Lists</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
<li><a href='http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/' rel='bookmark' title='Permanent Link: Create a Header Without Logging into Bronto'>Create a Header Without Logging into Bronto</a> <small>Did you know you can now create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/07/carstobecrushed.jpg"><img style="padding: 5px 5px 5px 5px; float: right;" title="carstobecrushed" src="http://brontoversity.com/wp-content/uploads/2010/07/carstobecrushed.jpg" alt="" width="238" height="161" /></a></p>
<p>Last fall, Alex explained how to <a href="http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/" target="_blank">Clear Contacts From Lists</a> in v3 of the API. You now have the same ability in v4 API using the <code>clearLists</code> function. All you need to do is specify the list id returned from the <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=102" target="_blank">addLists</a> or <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=6" target="_blank">readLists</a> function. After you call <code>clearLists</code>, all your contacts will be removed from the list, however, they will remain in Bronto.</p>
<p>Here is a sample SOAP message that would clear two lists.</p>
<pre class="brush:[php]">
<div id="_mcePaste">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;
   &lt;soapenv:Header&gt;
      &lt;v4:sessionHeader&gt;
         &lt;sessionId&gt;b058d5e0-7cb4-4578-b16f-a4c049079207&lt;/sessionId&gt;
      &lt;/v4:sessionHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v4:clearLists&gt;
         &lt;list&gt;
            &lt;id&gt;0bbb03ec0000000000000000000000038e93&lt;/id&gt;
         &lt;/list&gt;
         &lt;list&gt;
            &lt;id&gt;0bbb03ec00000000000000000000000390d0&lt;/id&gt;
        &lt;/list&gt;
      &lt;/v4:clearLists&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</div>
</pre>
<p>This PHP script would create a SOAP message like this.</p>
<pre class="brush:[php]">&lt;?php
/**
 * This example will clear two lists of all contacts on those lists.
 * You must edit the code to refer to the list id you wish to clear.
 */

$client = new SoapClient('https://api.bronto.com/v4?wsdl', array('trace' =&gt; 1, 'features' =&gt; SOAP_SINGLE_ELEMENT_ARRAYS));
setlocale(LC_ALL, 'en_US');

try {
        $token = "#####API TOKEN###########";

        print "logging in&lt;br&gt;";
        $sessionId = $client-&gt;login(array('apiToken' =&gt; $token))-&gt;return;

        $session_header = new SoapHeader("http://api.bronto.com/v4",
                           'sessionHeader', array('sessionId' =&gt; $sessionId));
        $client-&gt;__setSoapHeaders(array($session_header));

        $ids = array(array('id' =&gt; '0bbb03ec0000000000000000000000038e93'),
                   array('id' =&gt; '0bbb03ec00000000000000000000000390d0'));

        $res = $client-&gt;clearLists($ids)-&gt;return;

        if ($res-&gt;errors) {
                print "There was a problem clearing your lists:&lt;br&gt;";
                print $res-&gt;results[$res-&gt;errors[0]]-&gt;errorString . "&lt;br&gt;";
        } else {
                print "Lists have been cleared&lt;br&gt;";
        }
} catch (Exception $e) {
        print "uncaught exception\n";
        print_r($e);
}
?&gt;</pre>
<p>Now you are able to quickly and easily clear your lists without having to find everyone on the list. We do suggest you exercise caution when using this function, as there is no rewind button. I hope you find this new functionality useful. Let us know if you have any questions.</p>
<p><span style="font-family: Verdana, sans-serif; line-height: 20px; color: #111111;"><em>Andrew Kanes<br style="padding: 0px; margin: 0px;" />Support Engineer at Bronto</em></span></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/' rel='bookmark' title='Permanent Link: Spring Cleaning: Clearing Contacts From Lists'>Spring Cleaning: Clearing Contacts From Lists</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
<li><a href='http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/' rel='bookmark' title='Permanent Link: Create a Header Without Logging into Bronto'>Create a Header Without Logging into Bronto</a> <small>Did you know you can now create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Loop Tags With The API</title>
		<link>http://brontoversity.com/2010/06/24/using-loop-tags-with-the-api/</link>
		<comments>http://brontoversity.com/2010/06/24/using-loop-tags-with-the-api/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 18:12:41 +0000</pubDate>
		<dc:creator>John Gunther</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[addDeliveries]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[loop tags]]></category>
		<category><![CDATA[transactional]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7850</guid>
		<description><![CDATA[A very useful, but little known feature in Bronto is loop tags. loop tags allow you to access specially noted API Message tags as an array. This an especially handy feature to use in conjunction with transactional messages. For example, if you are using transactional messages to send receipts and you need to send back [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/12/10/give-them-what-they-want-with-api-message-tags/' rel='bookmark' title='Permanent Link: Give Them What They Want With API Message Tags'>Give Them What They Want With API Message Tags</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/05/20/using-readdeliveries-in-api-version-4/' rel='bookmark' title='Permanent Link: Using readDeliveries In API Version 4'>Using readDeliveries In API Version 4</a> <small>In version 4 of the API, we have updated the...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/Clothoid-loop-on-Flickr-Photo-Sharing.png"><img src="http://brontoversity.com/wp-content/uploads/2010/06/Clothoid-loop-on-Flickr-Photo-Sharing.png" alt="" title="Clothoid loop on Flickr - Photo Sharing!" width="256" height="324" style="float:right; padding:5px 5px 5px 5px;" /></a>A very useful, but little known feature in Bronto is <code>loop</code> tags. <code>loop</code> tags allow you to access specially noted API Message tags as an array. This an especially handy feature to use in conjunction with transactional messages. For example, if you are using transactional messages to send receipts and you need to send back a receipt containing multiple purchases (say if a contact purchases more than one item from you during a single visit), you can use <code>{loop}</code> tags to create an array containing the relevant receipt information for each item purchased.</p>
<h3>Using Loop Tags</h3>
<h4>To make use of <code>loop</code> tags:</h4>
<ol>
<li> Add <code>{loop}{/loop}</code> tags to the dynamic code in a message as shown below. Notice the <code>%%#item_#%%</code> portion of the code. This a modified API Message Tag used specifically in <code>loop</code> tags.
<pre class="brush:[php]">						{dynamic_code}
						{loop}
						%%#item_#%%
						{/loop}
						{/dynamic_code}</pre>
<p><em>Click the image below to enlarge</em></p>
<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/loop_tags-4.png" target="_new"><img class="alignnone size-full wp-image-7912" title="loop_tags-4" src="http://brontoversity.com/wp-content/uploads/2010/06/loop_tags-4.png" alt="" width="529" height="288" /></a></p>
<p><strong>TIP:</strong> In the example above, notice how the Dynamic Code and <code>loop</code> tags have been placed inside of an HTML table. This was done so the content brought in via the <code>loop</code> tags will display nicely in a table. It is perfectly ok to do this, but we recommend turning off the WYSIWYG editor (as is the case above) when working with Dynamic Code and HTML. The WYSIWYG editor attempts to correct what it sees as mistakes in HTML and will thus produce unintended results if it encounters Dynamic Code embedded in HTML. To turn off the WYSIWYG editor, click <strong>WYSIWYG Editor Off</strong> next to the Subject Line text box.</li>
<li> Depending on which version of the API you are using, call either <code><a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=104" target="_new">addDeliveries</a></code> (Version 4) or <code><a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=104" target="_new">writeDeliveries</a></code> (Legacy Version 3). When you call <code>writeDeliveries</code> or <code>addDeliveries</code>, the array of fields you specify in the function will look for the special loop API message tags and replace them with the content you specify for each <code>messagefieldObject</code>. Essentially, the <code>loop</code> tags will loop through each <code>messagefieldObject</code> specified in the function call. For each <code>messageFieldObject</code> encountered in the loop, the content added for each <code>messagefieldObject</code> will be added to the message, starting with the first array item, and continuing until the last item in the array is encountered. If no <code>content</code> value is added for a <code>messageFieldObject</code>, then that particular <code>messageFieldObject</code> will be skipped over in the loop. Below you can find a modified version of the code example found on the <code>addDeliveries</code> page of the API site. This code sends a message containing the example <code>loop</code> tags above, and replaces them with some generic content.
<p><strong>NOTE:</strong> The code example below applies only to version 4 of the API, but you can use it as reference for using <code>loop</code> tags with the <code>writeDeliveries</code> function in legacy version 3 of the API.</p>
<p><em>To easily copy the code below, move your mouse over the top right corner of the code example. Four buttons will appear. Click View Source or Copy To Clipboard to copy the code below in plain text format without line numbers.</em></p>
<div style="width: 535px; height: 300px; overflow: auto; align: left;">
<pre class="brush:[php]">/**
 * This example will create a delivery to send a message to a single contact.
 * This example also contains code to add content via loop tags to the message and
*  assumes the message already has the appropriate loop tags added.
 * You must edit the code to refer to the message name you wish to send, and change
 * the email address of the contact to be a valid contact in your account.
 */

$client = new SoapClient('https://api.bronto.com/v4?wsdl', array('trace' =&gt; 1, 'features' =&gt; SOAP_SINGLE_ELEMENT_ARRAYS));

setlocale(LC_ALL, 'en_US');

try {
	$token = "ADD YOUR API TOKEN HERE";

	print "logging in\n";
	$sessionId = $client-&gt;login(array('apiToken' =&gt; $token))-&gt;return;

	$session_header = new SoapHeader("http://api.bronto.com/v4", 'sessionHeader', array('sessionId' =&gt; $sessionId));
	$client-&gt;__setSoapHeaders(array($session_header));

	// get the id of the message you wish to send.  It would be more
	// efficient to hardcode the ID here, and you may choose to do that based
	// on your own usage scenario(s).
	$messageFilter = array('name' =&gt; array('operator' =&gt; 'EqualTo', 'value' =&gt; 'NAME OF YOUR MESSAGE HERE',),);
	$message = $client-&gt;readMessages(array('pageNumber' =&gt; 1,'includeContent' =&gt; false, 'filter' =&gt; $messageFilter))-&gt;return[0];
	if (!$message) {
		print "There was an error retrieving your message.\n";
		exit;
	}

	// get the id of the contact you will be sending to.  It would be
	// more efficient to hardcode the ID here, and you may choose to do that
	// based on your own usage scenario(s).
	$contactFilter = array('email' =&gt; array('operator' =&gt; 'EqualTo', 'value' =&gt; 'RECIPIENT_EMAIL@EXAMPLE.COM'),);
	$contact = $client-&gt;readContacts(array('pageNumber' =&gt; 1, 'includeLists' =&gt; false, 'filter' =&gt; $contactFilter))-&gt;return[0];
	if (!$contact) {
		print "There was an error retrieving your contact.\n";
		exit;
	}

	// make delivery start timestamp
	$now = date('c');

	$recipientObject = array('type' =&gt; 'contact', 'id' =&gt; $contact-&gt;id);
	/*
	Create an array of delivery parameters including the content
	which will be displayed by the loop tags added in the example
	message.
	*/
	$delivery = array();
	$delivery['start'] = $now;
	$delivery['messageId'] = $message-&gt;id;
	$delivery['fromName'] = 'API Robot';
	$delivery['fromEmail'] = 'api_test@example.com';
	$delivery['recipients'] = array($recipientObject);
       /*
        Notice below that when you reference the name of the loop tag via the API, be sure to leave
        of the "%%# _#%%" portion of the tag. You will build an array using individual API message
        tags which are named as follows: &lt;basename&gt;_&lt;number&gt;. For example, name =&gt; item_1,
        rather than name =&gt; %%#item_#%%.
        */
	$delivery['fields'][] = array('name' =&gt; 'productname_1', 'type' =&gt; 'html', 'content' =&gt; 'A Cool Shirt');
	$delivery['fields'][] = array('name' =&gt; 'productname_2', 'type' =&gt; 'html', 'content' =&gt; 'Some Nice Shoes');
	$delivery['fields'][] = array('name' =&gt; 'productname_3', 'type' =&gt; 'html', 'content' =&gt; 'A Trendy Hat');
	$delivery['fields'][] = array('name' =&gt; 'productprice_1', 'type' =&gt; 'html', 'content' =&gt; '$20.99');
	$delivery['fields'][] = array('name' =&gt; 'productprice_2', 'type' =&gt; 'html', 'content' =&gt; '$50.99');
	$delivery['fields'][] = array('name' =&gt; 'productprice_3', 'type' =&gt; 'html', 'content' =&gt; 'FREE!');
	$deliveries[] = $delivery;

	$parameters = array('deliveries' =&gt; $deliveries);

	$res = $client-&gt;addDeliveries($parameters)-&gt;return;
	if ($res-&gt;errors) {
		print "There was a problem scheduling your delivery:\n";
		print $res-&gt;results[$res-&gt;errors[0]]-&gt;errorString . "\n";
	} else {
		print "Delivery has been scheduled.  Id: " . $res-&gt;results[0]-&gt;id . "\n";
	}
} catch (Exception $e) {
	print "uncaught exception\n";
	print_r($e);
}</pre>
</div>
</li>
<li> In order to see if your <code>{loop}</code> tags are functioning as expected, we suggest scheduling some test deliveries and viewing the results. <code>{loop}</code> tags get processed at send time, so you won&#8217;t be able to view the end result of adding in these tags in a message previews or a dynamic preview. Below is an example of what the message above will look like after it has been sent and the content called via the <code>loop</code> tag has been added:
<p><em>Click on the image below to enlarge</em></p>
<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/loop_tags_added-2.png" target="_new"><img class="alignnone size-full wp-image-7913" title="loop_tags_added-2" src="http://brontoversity.com/wp-content/uploads/2010/06/loop_tags_added-2.png" alt="" width="503" height="128" /></a></li>
</ol>
<h3>Conclusion</h3>
<p>That was a lot of information to cover, and working with <code>loop</code> is probably not something you should try and tackle unless you are comfortable using the API. However, with the right know how, incorporating <code>loop</code> tags into your email marketing program should be a straight forward process that can allow you to do some pretty powerful things. If you have any questions, feel free to leave them in the comments section below.</p>
<p><em><br />
John Gunther<br />
Technical Writer/eLearning Specialist at Bronto<br />
Editor of Brontoversity<br />
</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/12/10/give-them-what-they-want-with-api-message-tags/' rel='bookmark' title='Permanent Link: Give Them What They Want With API Message Tags'>Give Them What They Want With API Message Tags</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/05/20/using-readdeliveries-in-api-version-4/' rel='bookmark' title='Permanent Link: Using readDeliveries In API Version 4'>Using readDeliveries In API Version 4</a> <small>In version 4 of the API, we have updated the...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/06/24/using-loop-tags-with-the-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Token, Token, Who Wants a Token?</title>
		<link>http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/</link>
		<comments>http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 21:29:55 +0000</pubDate>
		<dc:creator>Andrew Kanes</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7699</guid>
		<description><![CDATA[Another new feature of version 4 of the Bronto API is the ability for Agency accounts to create tokens programatically. We have already talked about how to add new accounts and how to add new users, and now with newly released function addApiTokens, Agency accounts can add tokens without having to log into the Bronto application. In this [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
<li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/brisbanebridge.jpg"><img style="float: right;padding: 5px 5px 5px 5px" src="http://brontoversity.com/wp-content/uploads/2010/06/brisbanebridge.jpg" alt="" width="270" height="191" /></a>Another new feature of version 4 of the Bronto API is the ability for Agency accounts to create tokens programatically. We have already talked about <a href="http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/" target="_new">how to add new accounts</a> and <a href="http://brontoversity.com/2010/06/11/may-i-have-another-user/" target="_blank">how to add new users</a>, and now with newly released function <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=113" target="_blank">addApiTokens</a>, Agency accounts can add tokens without having to log into the Bronto application. In this post I will take a look at the new functions that allow Agency accounts to manage their tokens.</p>
<p>As with our other API functions, there is not only the ability to <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=113" target="_blank">add</a>, but also to <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=23">read</a>, <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=410">update</a> and <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=510">delete</a> API Tokens. These functions give API users the ability to manipulate their API Tokens just as a user logged into the web application is able to.</p>
<h3>Let&#8217;s Jump In</h3>
<p>First let&#8217;s take a look at an example of a SOAP message to create a token:</p>
<div style="height: 300px;overflow: auto;border: 1px solid"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:addApiTokens&gt;<br />
&lt;tokens&gt;<br />
&lt;name&gt;Name of Token&lt;/name&gt;<br />
&lt;permissions&gt;7&lt;/permissions&gt;<br />
&lt;active&gt;true&lt;/active&gt;<br />
&lt;accountId&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/accountId&gt;<br />
&lt;/tokens&gt;<br />
&lt;/v4:addApiTokens&gt;<br />
&lt;/soap:Body&gt;<br />
&lt;/soap:Envelope&gt;<br />
</code></div>
<p>The response message that is returned by the API will contain the Id of the newly created token and will look like this:</p>
<div style="height: 300px;overflow: auto;border: 1px solid">
<p><code> </code><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;<br />
&lt;soap:Body&gt;<br />
&lt;ns2:addApiTokensResponse xmlns:ns2="http://api.bronto.com/v4"&gt;<br />
&lt;return&gt;<br />
&lt;results&gt;<br />
&lt;id&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/id&gt;<br />
&lt;isNew&gt;true&lt;/isNew&gt;<br />
&lt;isError&gt;false&lt;/isError&gt;<br />
&lt;errorCode&gt;0&lt;/errorCode&gt;<br />
&lt;/results&gt;<br />
&lt;/return&gt;<br />
&lt;/ns2:addApiTokensResponse&gt;<br />
&lt;/soap:Body&gt;<br />
&lt;/soap:Envelope&gt;<br />
</code></p>
</div>
<p>You can then use the Id to reference that token, for instance when using the <code>readApiTokens</code>.</p>
<div style="height: 300px;overflow: auto;border: 1px solid"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:readApiTokens&gt;<br />
&lt;tokens&gt;<br />
&lt;filter&gt;<br />
&lt;id&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/id&gt;<br />
&lt;/filter&gt;<br />
&lt;pageNumber&gt;1&lt;/pageNumber&gt;<br />
&lt;/tokens&gt;<br />
&lt;/v4:readApiTokens&gt;<br />
&lt;/soap:Body&gt;<br />
&lt;/soap:Envelope&gt;<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif"><span style="font-family: monospace, 'Times New Roman', 'Bitstream Charter', Times, serif"><br />
</span><br />
</span></code></div>
<p>You can also use the filters available for <code>readApiTokens</code> to search for tokens based on their name, or return all the tokens available to a sub-account or an entire agency. Of course, after you create the API Token, you are now able to use it to <a href="http://brontoversity.com/2010/03/18/logging-into-the-new-api-v4-0/" target="_blank">log into the API</a>. We hope you find this new functionality useful and please let us know if you have any questions.</p>
<p><em>Andrew Kanes</em><br />
<em>Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
<li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>May I Have Another User</title>
		<link>http://brontoversity.com/2010/06/11/may-i-have-another-user/</link>
		<comments>http://brontoversity.com/2010/06/11/may-i-have-another-user/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:00:57 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Did You Know?]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[Bronto]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7667</guid>
		<description><![CDATA[As part of version 4 of the Bronto API, we have added the ability to programatically manage your account. This is especially useful for agency and groups accounts that are bringing new client accounts online and want to minimize the amount of manual intervention. We have already discussed how to add new accounts, but what [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
<li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/06/machinery.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2010/06/machinery.jpg" alt="Machinery" width="250" height="187" /></a>As part of version 4 of the Bronto API, we have added the ability to programatically manage your account. This is especially useful for agency and groups accounts that are bringing new client accounts online and want to minimize the amount of manual intervention. We have already discussed <a href="http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/" target="_new">how to add new accounts</a>, but what good is an account without users?  Prior to version 4 of the API, you had to login to the Bronto web app in order to view or add users(logins). So let&#8217;s take a look at the new functions that allow you to manage your users.</p>
<p>As is standard, we have included <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=112" target="_new">create</a>, <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=22" target="_new">read</a>, <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=409" target="_new">update</a>, and <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=509" target="_new">delete</a> functions for logins. We have also made an effort to make the objects that are accessible through the API very closely mirror their web application counterparts. In other words, creating a contact, message, account, login, etc through the API should feel very similar to creating one in the application.</p>
<p>The quickest way to get a sense for an object and its parameters is to read one or more that have already been created.  So check out the <a title="readLogins" href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=22" target="_blank">readLogins</a> function and give it a try with an empty filter. Here&#8217;s an example SOAP request/response generated from <a title="soapui" href="http://www.soapui.org" target="_blank">soapui</a>:</p>
<div style="height: 300px; overflow: auto; border: 1px solid;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:readLogins&gt;<br />
&lt;filter&gt;<br />
&lt;/filter&gt;<br />
&lt;pageNumber&gt;1&lt;/pageNumber&gt;<br />
&lt;/v4:readLogins&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;</code></p>
<p><code><br />
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;<br />
&lt;soap:Body&gt;<br />
&lt;ns2:readLoginsResponse xmlns:ns2="http://api.bronto.com/v4"&gt;<br />
&lt;return&gt;<br />
&lt;username&gt;xxxxxxxxx&lt;/username&gt;<br />
&lt;password&gt;xxxxxxxxx&lt;/password&gt;<br />
&lt;contactInformation&gt;<br />
&lt;firstName&gt;my&lt;/firstName&gt;<br />
&lt;lastName&gt;name&lt;/lastName&gt;<br />
&lt;email&gt;my@email.address&lt;/email&gt;<br />
&lt;phone&gt;1234567890&lt;/phone&gt;<br />
&lt;country&gt;US&lt;/country&gt;<br />
&lt;/contactInformation&gt;<br />
&lt;permissionAgencyAdmin&gt;false&lt;/permissionAgencyAdmin&gt;<br />
&lt;permissionAdmin&gt;false&lt;/permissionAdmin&gt;<br />
&lt;permissionApi&gt;true&lt;/permissionApi&gt;<br />
&lt;permissionUpgrade&gt;false&lt;/permissionUpgrade&gt;<br />
&lt;permissionFatigueOverride&gt;false&lt;/permissionFatigueOverride&gt;<br />
&lt;permissionMessageCompose&gt;true&lt;/permissionMessageCompose&gt;<br />
&lt;permissionMessageApprove&gt;false&lt;/permissionMessageApprove&gt;<br />
&lt;permissionMessageDelete&gt;false&lt;/permissionMessageDelete&gt;<br />
&lt;permissionAutomatorCompose&gt;false&lt;/permissionAutomatorCompose&gt;<br />
&lt;permissionListCreatSend&gt;true&lt;/permissionListCreatSend&gt;<br />
&lt;permissionListCreate&gt;false&lt;/permissionListCreate&gt;<br />
&lt;permissionSegmentCreate&gt;true&lt;/permissionSegmentCreate&gt;<br />
&lt;permissionFieldCreate&gt;true&lt;/permissionFieldCreate&gt;<br />
&lt;permissionFieldReorder&gt;false&lt;/permissionFieldReorder&gt;<br />
&lt;permissionSubscriberCreate&gt;true&lt;/permissionSubscriberCreate&gt;<br />
&lt;permissionSubscriberView&gt;true&lt;/permissionSubscriberView&gt;<br />
&lt;/return&gt;<br />
&lt;/ns2:readLoginsResponse&gt;<br />
&lt;/soap:Body&gt;<br />
&lt;/soap:Envelope&gt;<br />
</code></p>
</div>
<p>All of the permissions should look familiar if you have had a chance to edit a user&#8217;s permissions in the application. Hence, when you create a login object through the API, you can specify those same permissions. Here is what the SOAP request for the addLogins function looks like.</p>
<div style="height: 300px; overflow: auto; border: 1px solid;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:addLogins&gt;<br />
&lt;accounts&gt;<br />
&lt;username&gt;&lt;/username&gt;<br />
&lt;password&gt;&lt;/password&gt;<br />
&lt;contactInformation&gt;<br />
&lt;organization&gt;&lt;/organization&gt;<br />
&lt;firstName&gt;&lt;/firstName&gt;<br />
&lt;lastName&gt;&lt;/lastName&gt;<br />
&lt;email&gt;&lt;/email&gt;<br />
&lt;phone&gt;&lt;/phone&gt;<br />
&lt;address&gt;&lt;/address&gt;<br />
&lt;address2&gt;&lt;/address2&gt;<br />
&lt;city&gt;&lt;/city&gt;<br />
&lt;state&gt;&lt;/state&gt;<br />
&lt;zip&gt;&lt;/zip&gt;<br />
&lt;country&gt;&lt;/country&gt;<br />
&lt;notes&gt;&lt;/notes&gt;<br />
&lt;/contactInformation&gt;<br />
&lt;permissionAgencyAdmin&gt;&lt;/permissionAgencyAdmin&gt;<br />
&lt;permissionAdmin&gt;&lt;/permissionAdmin&gt;<br />
&lt;permissionApi&gt;&lt;/permissionApi&gt;<br />
&lt;permissionUpgrade&gt;&lt;/permissionUpgrade&gt;<br />
&lt;permissionFatigueOverride&gt;&lt;/permissionFatigueOverride&gt;<br />
&lt;permissionMessageCompose&gt;&lt;/permissionMessageCompose&gt;<br />
&lt;permissionMessageApprove&gt;&lt;/permissionMessageApprove&gt;<br />
&lt;permissionMessageDelete&gt;&lt;/permissionMessageDelete&gt;<br />
&lt;permissionAutomatorCompose&gt;&lt;/permissionAutomatorCompose&gt;<br />
&lt;permissionListCreatSend&gt;&lt;/permissionListCreatSend&gt;<br />
&lt;permissionListCreate&gt;&lt;/permissionListCreate&gt;<br />
&lt;permissionSegmentCreate&gt;&lt;/permissionSegmentCreate&gt;<br />
&lt;permissionFieldCreate&gt;&lt;/permissionFieldCreate&gt;<br />
&lt;permissionFieldReorder&gt;&lt;/permissionFieldReorder&gt;<br />
&lt;permissionSubscriberCreate&gt;&lt;/permissionSubscriberCreate&gt;<br />
&lt;permissionSubscriberView&gt;&lt;/permissionSubscriberView&gt;<br />
&lt;/accounts&gt;<br />
&lt;/v4:addLogins&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<p>With these new functions in hand, you will be able to automate the management of your account, whereas previously this was only possible by logging into the Bronto web application.  We hope you find them useful and welcome any feedback.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
<li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/06/11/may-i-have-another-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Direct Unsubscribe Grows Up</title>
		<link>http://brontoversity.com/2010/05/18/direct-unsubscribe-grows-up/</link>
		<comments>http://brontoversity.com/2010/05/18/direct-unsubscribe-grows-up/#comments</comments>
		<pubDate>Tue, 18 May 2010 18:33:47 +0000</pubDate>
		<dc:creator>Lucas Weber</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Did You Know?]]></category>
		<category><![CDATA[Direct Unsubscribe]]></category>
		<category><![CDATA[email unsubscribe]]></category>
		<category><![CDATA[unsubscribe]]></category>
		<category><![CDATA[unsubscribe link]]></category>
		<category><![CDATA[unsubscribe page]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7481</guid>
		<description><![CDATA[In the beginning, our Direct Unsubscribe feature was tucked away in the Advanced Form Settings of your default Bronto Unsubscribe page. It simply allowed you to add a snippet of code to a page on your site, and any email address passed to the page containing the snippet would be automatically unsubscribed from your Bronto account. [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/02/23/are-you-aware-of-direct-unsubscribe/' rel='bookmark' title='Permanent Link: Are You Aware of Direct Unsubscribe?'>Are You Aware of Direct Unsubscribe?</a> <small>Typically contacts in Bronto can unsubscribe by either clicking the...</small></li>
<li><a href='http://brontoversity.com/2009/10/27/abandonment-issues-use-direct-update-to-get-over-them/' rel='bookmark' title='Permanent Link: Abandonment Issues?  Use Direct Update to Get Over Them!'>Abandonment Issues?  Use Direct Update to Get Over Them!</a> <small>In my last post, DIY Integrations II: Direct Update, I...</small></li>
<li><a href='http://brontoversity.com/2010/04/23/adding-contacts-to-a-specific-list-with-direct-add/' rel='bookmark' title='Permanent Link: Adding Contacts To A Specific List With Direct Add'>Adding Contacts To A Specific List With Direct Add</a> <small>A few months ago, Lucas Weber wrote a post called...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/05/unsub_missile.png"><img class="alignright size-full wp-image-7489" src="http://brontoversity.com/wp-content/uploads/2010/05/unsub_missile.png" alt="Unsubscribe" width="280" height="211" /></a>In the beginning, our Direct Unsubscribe feature was tucked away in the Advanced Form Settings of your default Bronto Unsubscribe page. It simply allowed you to add a snippet of code to a page on your site, and any email address passed to the page containing the snippet would be automatically unsubscribed from your Bronto account. This worked well for those users that were aware of its existence, but the time has come to bring the Direct Unsubscribe feature into the light of day. Read on to find out how you can leverage the new found power of Direct Unsubscribe.</p>
<h3>What&#8217;s New?</h3>
<p>First of all, those of you who are currently using the Direct Unsubscribe snippet as it is now will be able to continue to do so without any changes being made. Your contacts will still be able to use your form, enter their email address, click submit, and (once their email address is appended to the Direct Unsubscribe snippet) unsubscribe.</p>
<p>The big change that has been made to Direct Unsubscribe is that it can now use a Bronto tracking cookie to automatically pull in the email address of the contact who clicked on a link in a message you sent from Bronto and unsubscribe that individual. This is great for people who would like to implement a truly one-click unsubscribe process that uses a custom unsubscribe landing page. The other change is that we&#8217;ve moved the feature from the unsubscribe page out to the Data Exchange area (Home tab &gt; Settings &gt; Data Exchange).</p>
<p style="text-align: center;"><a href="http://brontoversity.com/wp-content/uploads/2010/05/d_unsub.jpg"><img class="aligncenter size-full wp-image-7493" src="http://brontoversity.com/wp-content/uploads/2010/05/d_unsub.jpg" alt="Where to find Direct Unsubscribe" width="360" height="239" /></a></p>
<h3>How To Use It</h3>
<p>Using Direct Unsubscribe is actually pretty simple, but like any of our snippet based integrations, it can require some web programming knowledge. To get the snippet just go to the Home tab &gt; Settings &gt; Data Exchange and check the Direct Unsubscribe checkbox.  This will expand the box and reveal the code.  You&#8217;ll notice that the code does not include any area for email address. This is because it can now be used without using the Bronto tracking cookie. In other words, you can unsubscribe contacts even if they arrive at your unsubscribe page from a source other than a message you send via Bronto. If you would like to append the email address manually, just add the following to the very end of the snippet:</p>
<p><code>&amp;email=email@example.com</code></p>
<p>Of course you will need to replace email@example.com with the email address of the person who wants to unsubscribe. This can be done by pulling the email address that the recipient enters into the form on your end. If you append an email address yourself, it will always take precedence over the the cookie used to identify the email address.</p>
<p>So that is an overview of the new and improved  Direct Unsubscribe feature, if you are currently using this feature or if you have any questions, please let us know!</p>
<p><em>Lucas Weber<br />
Bronto Client Services</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/02/23/are-you-aware-of-direct-unsubscribe/' rel='bookmark' title='Permanent Link: Are You Aware of Direct Unsubscribe?'>Are You Aware of Direct Unsubscribe?</a> <small>Typically contacts in Bronto can unsubscribe by either clicking the...</small></li>
<li><a href='http://brontoversity.com/2009/10/27/abandonment-issues-use-direct-update-to-get-over-them/' rel='bookmark' title='Permanent Link: Abandonment Issues?  Use Direct Update to Get Over Them!'>Abandonment Issues?  Use Direct Update to Get Over Them!</a> <small>In my last post, DIY Integrations II: Direct Update, I...</small></li>
<li><a href='http://brontoversity.com/2010/04/23/adding-contacts-to-a-specific-list-with-direct-add/' rel='bookmark' title='Permanent Link: Adding Contacts To A Specific List With Direct Add'>Adding Contacts To A Specific List With Direct Add</a> <small>A few months ago, Lucas Weber wrote a post called...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/05/18/direct-unsubscribe-grows-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personalize Your Contacts, Storing Field Data With The API</title>
		<link>http://brontoversity.com/2010/05/13/personalize-your-contacts-storing-field-data-with-the-api/</link>
		<comments>http://brontoversity.com/2010/05/13/personalize-your-contacts-storing-field-data-with-the-api/#comments</comments>
		<pubDate>Thu, 13 May 2010 19:00:09 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[add contacts]]></category>
		<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[Version 4]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7428</guid>
		<description><![CDATA[OK, so your integration is running. You&#8217;re adding contacts at a dizzying pace, and then your marketing team wants to send some personalized messages and&#8230;whoops, all you have are email addresses. You neglected to push any customer data that could be used to personalize a message; first name, last name, favorite soda, etc.  Whatever [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/09/29/diy-integrations-ii-updating-contact-field-information-with-direct-update/' rel='bookmark' title='Permanent Link: DIY Integrations II: Updating Contact Field Information With Direct Update'>DIY Integrations II: Updating Contact Field Information With Direct Update</a> <small> Integrating your website or database with a third party...</small></li>
<li><a href='http://brontoversity.com/2010/02/18/welcome-friend-adding-new-contacts-using-the-api/' rel='bookmark' title='Permanent Link: Welcome Friend! Adding New Contacts Using the API'>Welcome Friend! Adding New Contacts Using the API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/04/23/adding-contacts-to-a-specific-list-with-direct-add/' rel='bookmark' title='Permanent Link: Adding Contacts To A Specific List With Direct Add'>Adding Contacts To A Specific List With Direct Add</a> <small>A few months ago, Lucas Weber wrote a post called...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2010/05/field.jpg" alt="Corn Field" width="250" height="166" />OK, so your integration is running. You&#8217;re adding contacts at a dizzying pace, and then your marketing team wants to send some personalized messages and&#8230;whoops, all you have are email addresses. You neglected to push any customer data that could be used to personalize a message; first name, last name, favorite soda, etc.  Whatever data you have gathered from your contacts could potentially be useful in developing a bulk message that seems less bulky.</p>
<p>You know that this data can be imported using a csv file and the import tool in the Bronto web app, but how about with the API?  We talked about adding contacts using version 3 in <a href="http://brontoversity.com/2010/02/18/welcome-friend-adding-new-contacts-using-the-api/">Welcome Friend! Adding New Contacts Using the API</a>, but let&#8217;s look at the <a href="http://app.bronto.com/api/?q=v4_o_view&amp;fn=View&amp;id=4 target="><code>contactObject</code></a> to see how we might use it to add or update contacts with version 4.</p>
<p>Let&#8217;s first look at the fields portion (in bold) of the <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=100" target="_new"><code>addContacts</code></a> SOAP request message below(note: <code>updateContacts</code> uses the same contact object and <code>readContacts</code> returns the same object).</p>
<div style="border: 1px solid; overflow: auto; height: 225px;">
<p>&lt;contacts&gt;<br />
&lt;id&gt;&lt;/id&gt;<br />
&lt;email&gt;&lt;/email&gt;<br />
&lt;status&gt;&lt;/status&gt;<br />
&lt;msgPref&gt;&lt;/msgPref&gt;<br />
&lt;source&gt;&lt;/source&gt;<br />
&lt;customSource&gt;&lt;/customSource&gt;<br />
&lt;created&gt;&lt;/created&gt;<br />
&lt;modified&gt;&lt;/modified&gt;<br />
&lt;deleted&gt;&lt;/deleted&gt;<br />
&lt;listIds&gt;&lt;/listIds&gt;<br />
<strong>&lt;fields&gt;<br />
&lt;fieldId&gt;&lt;/fieldId&gt;<br />
&lt;content&gt;&lt;/content&gt;<br />
&lt;/fields&gt;</strong><br />
&lt;numSends&gt;&lt;/numSends&gt;<br />
&lt;numBounces&gt;&lt;/numBounces&gt;<br />
&lt;numOpens&gt;&lt;/numOpens&gt;<br />
&lt;numClicks&gt;&lt;/numClicks&gt;<br />
&lt;numConversions&gt;&lt;/numConversions&gt;<br />
&lt;conversionAmount&gt;&lt;/conversionAmount&gt;<br />
&lt;/contacts&gt;</p>
</div>
<p>You might never need to actually look at a SOAP message or a WSDL if your IDE/SOAP library takes care of that for you, but it can definitely be helpful when trying to understand how the requests and responses are passed back and forth. Most of the attributes are self descriptive and using them is hopefully straight forward. The fields attribute however takes a little more explaining.</p>
<p>In the WSDL you will see that it is defined as:</p>
<p><code>&lt;xs:element maxOccurs="unbounded" minOccurs="0" name="fields" nillable="true" type="tns:contactField"/&gt;</code></p>
<p>This tells us that the fields item is a group of zero or more <code>contactField objects</code>. In most programming languages, that type of structure would be represented as an array of <code>contactField</code> objects. These <code>contactField</code> objects in turn contain two items; <code>fieldId</code> and <code>content</code>. The <code>content</code> is the actual data that you want to store and the <code>fieldId</code> is a static id that is assigned to each of your fields when they are created. The <code>fieldId</code> can be retrieved using the <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=4"><code>readFields</code></a> function. Since the <code>fieldId</code>s are static, it probably makes sense to go ahead and store these locally so they do not need to be read each time you want to use them. The easiest thing to do is to call <code>readFields</code> once with an empty filter and store the field information in a configuration file. That way, adding or removing fields will not require changes to your code.</p>
<p>With this information in hand, it will hopefully make more sense on how you would go about passing in contact information. So don&#8217;t leave those fields empty any more.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/09/29/diy-integrations-ii-updating-contact-field-information-with-direct-update/' rel='bookmark' title='Permanent Link: DIY Integrations II: Updating Contact Field Information With Direct Update'>DIY Integrations II: Updating Contact Field Information With Direct Update</a> <small> Integrating your website or database with a third party...</small></li>
<li><a href='http://brontoversity.com/2010/02/18/welcome-friend-adding-new-contacts-using-the-api/' rel='bookmark' title='Permanent Link: Welcome Friend! Adding New Contacts Using the API'>Welcome Friend! Adding New Contacts Using the API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/04/23/adding-contacts-to-a-specific-list-with-direct-add/' rel='bookmark' title='Permanent Link: Adding Contacts To A Specific List With Direct Add'>Adding Contacts To A Specific List With Direct Add</a> <small>A few months ago, Lucas Weber wrote a post called...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/05/13/personalize-your-contacts-storing-field-data-with-the-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a Header Without Logging into Bronto</title>
		<link>http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/</link>
		<comments>http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 19:05:53 +0000</pubDate>
		<dc:creator>Andrew Kanes</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[footers]]></category>
		<category><![CDATA[headers]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=7266</guid>
		<description><![CDATA[Did you know you can now create headers and footers using the API instead of logging into the Bronto application? As part of the new API, we have introduced a function called addHeaderFooters.
This new function, and its associated functions deleteHeaderFooters, readHeaderFooters and updateHeaderFooters, allows you to manipulate the name and contents of your headers and footers from [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
<li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img style="padding: 5px 5px 5px 5px;float: right" src="http://brontoversity.com/wp-content/uploads/2010/04/3529534404_3a565309f8.jpg" alt="frowzy-headed Fishers" width="250" height="177" />Did you know you can now create headers and footers using the API instead of logging into the Bronto application? As part of the new API, we have introduced a function called <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=108" target="_blank">addHeaderFooters</a>.</p>
<p>This new function, and its associated functions <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=503" target="_blank">deleteHeaderFooters</a>, <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=5" target="_blank">readHeaderFooters</a> and <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=403" target="_blank">updateHeaderFooters</a>, allows you to manipulate the name and contents of your headers and footers from outside the Bronto application. The arguments are <code>name</code>, <code>html</code>, <code>text</code> and <code>isHeader</code>. These allow you to specify the name of the header or footer, the html and plain text content of the header or footer, and how it should be used.</p>
<p>Do you design your headers and footers in an external application and then log into Bronto to create your header and paste in your content? Using these four functions, you can create, modify, read, and delete headers and footers from an external, customized application. Now you can avoid the process of cutting and pasting your content into Bronto by sending a SOAP message like this</p>
<div style="border: 1px solid;overflow: auto;height: 225px;padding: 10px">
<p><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;840ae3a0-2e4f-478e-bc54-0f2e9bebce26&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:addHeaderFooters&gt;<br />
&lt;footers&gt;<br />
&lt;name&gt;Header Created using the API&lt;/name&gt;<br />
&lt;html&gt;This is the &lt;b&gt;HTML content&lt;/b&gt; of the new header&lt;/html&gt;<br />
&lt;text&gt;This is the Text content of the new header&lt;/text&gt;<br />
&lt;isHeader&gt;true&lt;/isHeader&gt;<br />
&lt;/footers&gt;<br />
&lt;/v4:addHeaderFooters&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></p>
</div>
<p><br/></p>
<p>
Here is some sample PHP code to generate this SOAP message:
</p>
<div style="border: 1px solid;overflow: auto;height: 225px;padding: 10px"><code><br />
$sessionId = $client-&gt;login(array('apiToken' =&gt; $token))-&gt;return;</code></p>
<p><code>$session_header = new SoapHeader("http://api.bronto.com/v4",<br />
'sessionHeader',<br />
array('sessionId' =&gt; $sessionId));<br />
$client-&gt;__setSoapHeaders(array($session_header));</code></p>
<p><code>$html = 'This is the &gt;b&gt;HTML content&gt;/b&gt; of the new header';<br />
$text = 'This is the Text content of the new header';</code></p>
<p><code>$header = array('name' =&gt; 'Header Created using the API',<br />
'html' =&gt; $html,<br />
'text' =&gt; $text,<br />
'isHeader' =&gt; 'true');</code></p>
<p><code> $res = $client-&gt;addHeaderFooters(array($header))-&gt;return;<br />
</code></p>
</div>
<p><br/><br />
If you have any questions, feel free to leave them in the comments section below.</p>
<p><em>Andrew Kanes<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/05/27/agencies-can-create-new-accounts-using-the-api/' rel='bookmark' title='Permanent Link: Agencies Can Create New Accounts Using The API'>Agencies Can Create New Accounts Using The API</a> <small>Last month we discussed how to create headers and footers...</small></li>
<li><a href='http://brontoversity.com/2010/07/22/clear-that-list-using-the-api-v4/' rel='bookmark' title='Permanent Link: Clear that List using the API v4'>Clear that List using the API v4</a> <small> Last fall, Alex explained how to Clear Contacts From...</small></li>
<li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the New readContacts Function</title>
		<link>http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/</link>
		<comments>http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 19:29:18 +0000</pubDate>
		<dc:creator>Andrew Kanes</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[API version 4]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=6961</guid>
		<description><![CDATA[Over the past few weeks, we have looked at how to login to the new API and how to filter result sets. Now we are going to take a closer look at how to work with the updated readContacts function, and see what new information is provided to us in the result. As was mentioned [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/03/25/filtering-result-sets/' rel='bookmark' title='Permanent Link: Filtering Result Sets'>Filtering Result Sets</a> <small>Did you know that all of the read functions available...</small></li>
<li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
<li><a href='http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/' rel='bookmark' title='Permanent Link: Create a Header Without Logging into Bronto'>Create a Header Without Logging into Bronto</a> <small>Did you know you can now create headers and footers...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/04/reading_faxed_newspaper.jpg"><img style="padding: 5px 5px 5px 5px; float: right;" src="http://brontoversity.com/wp-content/uploads/2010/04/reading_faxed_newspaper.jpg" alt="" width="300" height="246" /></a>Over the past few weeks, we have looked at how to <a href="http://brontoversity.com/2010/03/18/logging-into-the-new-api-v4-0/" target="_new">login</a> to the new API and how to <a href="http://brontoversity.com/2010/03/25/filtering-result-sets/" target="_new">filter</a> result sets. Now we are going to take a closer look at how to work with the updated <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=2" target="_new">readContacts function</a>, and see what new information is provided to us in the result. As was mentioned in  <a href="http://brontoversity.com/2010/03/25/filtering-result-sets/" target="_new">Filtering Result Sets</a>, all of the read functions in version 4 of the Bronto API, including readContacts, have the option to include a filter based on selected criteria.  You can find out what criteria are available by looking at the <a href="http://app.bronto.com/api/?q=v4_o_view&amp;fn=View&amp;id=108" target="_new">contactFilter</a></p>
<h3>Using the contactFilter</h3>
<p>Lets say you were interested in all active contacts created after June 1, 2009 at 6am ET.  You would create a SOAP message like:</p>
<div style="border: 1px solid; overflow: auto; height: 225px; padding: 10px;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:v4=”http://api.bronto.com/v4″&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;v4:sessionHeader&gt;<br />
&lt;sessionId&gt;&lt;/sessionId&gt;<br />
&lt;/v4:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;v4:readContacts&gt;<br />
&lt;filter&gt;<br />
&lt;type&gt;AND&lt;/type&gt;<br />
&lt;status&gt;active&lt;/status&gt;<br />
&lt;created&gt;<br />
&lt;operator&gt;After&lt;/operator&gt;<br />
&lt;value&gt;2009-06-01T06:00:00-05:00&lt;/value&gt;<br />
&lt;/created&gt;<br />
&lt;/filter&gt;<br />
&lt;includeLists&gt;false&lt;/includeLists&gt;<br />
&lt;fields&gt;&lt;/fields&gt;<br />
&lt;pageNumber&gt;1&lt;/pageNumber&gt;<br />
&lt;/v4:readContacts&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<p></br><br />
Using the readContacts function, you can also filter on criteria such as email address, modified date, which lists or segments the contacts are on, message format preference, source and customSource. You can also specify if the contacts should match all or any of the filter criteria by defining the filter type as an AND or an OR.</p>
<h3>Aggregate Information Returned by the readContact Function</h3>
<p>The updated readContact function also returns aggregate information for each contact. The results now include numSends, numBounces, numOpens, numClicks, numConversions and conversionAmount. These metrics tell you the total number of deliveries sent to a contact, the number of times deliveries sent to a contact that have bounced, the number of opens recorded for the contact, the number of clicks recorded for the contact, the total number of times a contact has converted, and the total amount of any conversions. This is in addition to all the other information about a contact that is returned.</p>
<p>Let us know if you have any suggestions or questions in the comments section below!</p>
<p><em>Andrew Kanes<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/03/25/filtering-result-sets/' rel='bookmark' title='Permanent Link: Filtering Result Sets'>Filtering Result Sets</a> <small>Did you know that all of the read functions available...</small></li>
<li><a href='http://brontoversity.com/2010/06/17/token-token-who-wants-a-token/' rel='bookmark' title='Permanent Link: Token, Token, Who Wants a Token?'>Token, Token, Who Wants a Token?</a> <small>Another new feature of version 4 of the Bronto API...</small></li>
<li><a href='http://brontoversity.com/2010/04/29/create-a-header-without-logging-into-bronto/' rel='bookmark' title='Permanent Link: Create a Header Without Logging into Bronto'>Create a Header Without Logging into Bronto</a> <small>Did you know you can now create headers and footers...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Filtering Result Sets, Part 2</title>
		<link>http://brontoversity.com/2010/04/01/filtering-result-sets-part-2/</link>
		<comments>http://brontoversity.com/2010/04/01/filtering-result-sets-part-2/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:23:04 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[Bronto]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=6887</guid>
		<description><![CDATA[Last time we looked at the basics of Filtering Result Sets.  This time we&#8217;ll look at another great new filtering mechanism that was added to version 4 of the Bronto API.  In the past many of these types of filtering operations had to be performed by reading the entire contact database and then [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/03/25/filtering-result-sets/' rel='bookmark' title='Permanent Link: Filtering Result Sets'>Filtering Result Sets</a> <small>Did you know that all of the read functions available...</small></li>
<li><a href='http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/' rel='bookmark' title='Permanent Link: Using the New readContacts Function'>Using the New readContacts Function</a> <small>Over the past few weeks, we have looked at how...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/03/monkeys.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2010/03/monkeys.jpg" alt="Monkey" width="250" height="165" /></a>Last time we looked at the basics of <a href="http://brontoversity.com/2010/03/25/filtering-result-sets/" target="_new">Filtering Result Sets</a>.  This time we&#8217;ll look at another great new filtering mechanism that was added to version 4 of the Bronto API.  In the past many of these types of filtering operations had to be performed by reading the entire contact database and then filtering locally.  In some cases, with a large contact database, this operation could potentially take much longer than desired due to the increased number of back and forth calls over the internet that was required.</p>
<p>If you used the previous version of the API you may have used the filtering that was available.  You had the option to check equality(=) for all data types as well as inequalities(&gt;, &lt;, &gt;=, &lt;=) with numeric and date types. In version 4 of the API we have added some very useful <a href="http://app.bronto.com/api/?q=v4_o_view&amp;fn=View&amp;id=106" target="_new">filter operators</a>.  Let&#8217;s take a closer look at a couple of the new operators.</p>
<h3>To The Operators Jeeves</h3>
<p>StartsWith / EndsWith can be used as a string comparison and are especially useful when trying to filter down your contacts by matching a portion of their email address.  For instance, let&#8217;s say you wanted to see how engaged contacts with only yahoo.com have been.  You could use the EndsWith operator and &#8220;yahoo.com&#8221; as the value to request just these contacts.  Once you have these contacts you can use the aggregated statistics that are returned to create a customized report with just the information that you need.</p>
<h3>But Wait, There&#8217;s More&#8230;</h3>
<p>So you actually want all of the contacts <em>except</em> those yahoo.com addresses?  You&#8217;re in luck, you can change that EndsWith operator to DoesNotEndWith.    Why stop there?  You can add additional filters to crop that list down even more.  You only want contacts that signed up this year?  Add a filter using the new SameYearAs operator?  Want to get contacts that signed up specifically between two dates?  Check out the Before / After and BeforeOrSameDay / AfterOrSameDay.</p>
<p>With this version of the API we have made an effort to open up the filtering to give you more options.  As your contact database grows this will be increasingly important to you.  Hopefully you will find these additional possibilities helpful.  Let us know what you think!</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/03/25/filtering-result-sets/' rel='bookmark' title='Permanent Link: Filtering Result Sets'>Filtering Result Sets</a> <small>Did you know that all of the read functions available...</small></li>
<li><a href='http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/' rel='bookmark' title='Permanent Link: Using the New readContacts Function'>Using the New readContacts Function</a> <small>Over the past few weeks, we have looked at how...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/04/01/filtering-result-sets-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtering Result Sets</title>
		<link>http://brontoversity.com/2010/03/25/filtering-result-sets/</link>
		<comments>http://brontoversity.com/2010/03/25/filtering-result-sets/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 18:07:32 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Version 4]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[API version 4]]></category>
		<category><![CDATA[Bronto]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=6795</guid>
		<description><![CDATA[Did you know that all of the read functions available in the Bronto API have the option to include a filter based on selected criteria? Do you want to limit the number of results you get from a read request? Do you only need one or a few specific records? Do you only want records [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/04/01/filtering-result-sets-part-2/' rel='bookmark' title='Permanent Link: Filtering Result Sets, Part 2'>Filtering Result Sets, Part 2</a> <small>Last time we looked at the basics of Filtering Result...</small></li>
<li><a href='http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/' rel='bookmark' title='Permanent Link: Using the New readContacts Function'>Using the New readContacts Function</a> <small>Over the past few weeks, we have looked at how...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/03/filter.jpg" target="_new"><img style="float: right;padding: 5px 5px 5px 5px" src="http://brontoversity.com/wp-content/uploads/2010/03/filter.jpg" alt="Coffee Filter" width="250" height="166" /></a>Did you know that all of the read functions available in the Bronto API have the option to include a filter based on selected criteria? Do you want to limit the number of results you get from a read request? Do you only need one or a few specific records? Do you only want records that were created between two dates? If you are using or have used version 3 of the API, these concepts will be familiar. For Version 4, we have made filtering even more powerful!</p>
<h3>What&#8217;s New In Version 4?</h3>
<p>Gone is the universal readFilter with its readCriteria attributes. In version 4, each read function has its own filter object with associated named criteria parameters. As with V3, you can still opt to perform the read with an empty filter in order to retrieve all of the available records for that request. In some cases, this may be the desired effect. However, in other cases, filtering the returned results is essential. The objects that you will probably want to filter most are contacts, since this is likely your largest set of objects.</p>
<h3>Filtering Contacts</h3>
<p>Let&#8217;s take a look at the options available in the filter for the readContacts function. On <a href="http://api.bronto.com" target="_new">api.bronto.com</a>, you will find the <a href="http://app.bronto.com/api/?q=v4_o_view&amp;fn=View&amp;id=108" target="_new">contactFilter</a> object that is one of the parameters of the <a href="http://app.bronto.com/api/?q=v4_f_view&amp;fn=View&amp;id=2" target="_new">readContacts (Click here for example code)</a> function. The parameters of the various filter objects correlate to their associated object. All of the parameters you see in the contactFilter object are all in the contact object itself, except for one. That is the <em>type</em> parameter. This parameter takes on the same role as the <em>operator</em> parameter in V3. That is, it allows you to set multiple criteria and join them with an AND or OR operator. We have also added some new operators that allow for more advanced filtering. Take a look at the comparisons that are now available in the <a href="http://app.bronto.com/api/?q=v4_o_view&amp;fn=View&amp;id=106" target="_new">filterOperator</a>.</p>
<p>If you want to give it a try without writing any code and don&#8217;t yet have a handy SOAP testing tool, see <a href="http://brontoversity.com/2009/06/04/washing-with-soap-part-1/" target="_new">Washing With SOAP</a>.  You&#8217;ll also want to review <a href="http://brontoversity.com/2010/03/18/logging-into-the-new-api-v4-0/" target="_new">Logging into the API v4.0</a>. Once you have done that, you can go ahead and pick out your favorite read function and start trying out some of the different filtering parameters.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/04/01/filtering-result-sets-part-2/' rel='bookmark' title='Permanent Link: Filtering Result Sets, Part 2'>Filtering Result Sets, Part 2</a> <small>Last time we looked at the basics of Filtering Result...</small></li>
<li><a href='http://brontoversity.com/2010/04/08/using-the-new-readcontacts-function/' rel='bookmark' title='Permanent Link: Using the New readContacts Function'>Using the New readContacts Function</a> <small>Over the past few weeks, we have looked at how...</small></li>
<li><a href='http://brontoversity.com/2010/06/11/may-i-have-another-user/' rel='bookmark' title='Permanent Link: May I Have Another User'>May I Have Another User</a> <small>As part of version 4 of the Bronto API, we...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/03/25/filtering-result-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
