<?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; xml</title>
	<atom:link href="http://brontoversity.com/tag/xml/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>Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions</title>
		<link>http://brontoversity.com/2010/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/</link>
		<comments>http://brontoversity.com/2010/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:53:48 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=5932</guid>
		<description><![CDATA[
This post only applies to Legacy Version 3 of the API
Since conversions are in many cases the purpose for sending an email, they have been covered in great depth in previous posts. You may to start with the basics of conversion tracking and how to set it up by John Gunther. Also, as Adam Covati recently [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2010/01/nyse2.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2010/01/nyse2.jpg" alt="NYSE" width="250" height="188" /></a></p>
<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>Since conversions are in many cases the purpose for sending an email, they have been covered in great depth in previous posts. You may to start with the basics of <a href="http://brontoversity.com/2009/04/15/how-much-are-your-emails-worth-setting-up-conversion-tracking/" target="_new">conversion tracking and how to set it up</a> by John Gunther. Also, as Adam Covati recently wrote, <a href="http://brontoversity.com/2010/01/14/tracking-non-commerce-goals/" target="_new">a conversion doesn&#8217;t necessarily just mean a purchase</a>.<br />
Don&#8217;t get me wrong, the Bronto reporting tools are great! That said, rather than cover the what and how behind setting up conversion tracking and the reports in the Bronto application, let&#8217;s look into how we can use the API to create a custom reporting app or mash-up that gives you exactly what you want, how you want it, when you want it.</p>
<h3>Whiz-Bang</h3>
<p>So we don&#8217;t know how to get the conversion data yet. First, let&#8217;s determine what we&#8217;re going to get, in order to see what we could possibly build with it. Ultimately, at the individual contact or delivery level, we&#8217;ll be able to retrieve the IP, URL, type, description, revenue, and time created for a conversion. You can group by URL or revenue amount, or add an IP locator to track from where in the world you get the most conversions. Hopefully there will be lots and lots of data, because that means your contacts are clicking through and converting.</p>
<h3>Tools Of The Trade</h3>
<p>If you&#8217;re already using the API to do some contact management or some other custom reporting, then you have most likely already used the functions related to contacts and deliveries, namely <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=2" target="_self"><code>readContacts</code></a> and <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=3" target="_self"><code>readDeliveries</code></a>. In order to get to the conversion data, we&#8217;ll need to reference either a contact or a delivery by ID. Both of these functions return the IDs for their respective objects. Note: all of the object IDs remain static, so if you have a particular contact or delivery you are watching, there is no need to re-read the object to retrieve the ID.</p>
<p>The only other functions we&#8217;ll need are <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=17" target="_self"><code>readStreams</code></a> and <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=18" target="_self"><code>readStreamViews</code></a>. For each object in which you are interested(a contact or a delivery) you need to first call the <code>readStreams</code> function to retrieve the click stream instances. Then for each of these, you will need to call the <code>readStreamViews</code> function with that particular stream ID. Something to consider &#8211; each time you call the <code>readStreams</code> function for a deliveryId you will get all of the click streams, not just the new ones since the last time you called the function.</p>
<h3>If You Write It They Will Come</h3>
<p>Small automatically run applications or scripts are great at getting data and transforming it into a customized format, so you don&#8217;t have to do any of the work manually. As we have seen, the API has the necessary functions to get at all of that great conversion data that you see in the Bronto application. Why not take advantage of it and create your own report-wizard-gizmo-script-gadget-formatter-application?  Let us know how you&#8217;re using the data(and what you named it!)</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2010/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Them What They Want With API Message Tags</title>
		<link>http://brontoversity.com/2009/12/10/give-them-what-they-want-with-api-message-tags/</link>
		<comments>http://brontoversity.com/2009/12/10/give-them-what-they-want-with-api-message-tags/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 21:44:59 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=5627</guid>
		<description><![CDATA[
This post only applies to Legacy Version 3 of the API
If you have been sending personalized messages to your contacts, then you already understand how useful this marketing technique can be.  If you would like to start exploring how to use personal information you have about your contacts, take a look at this post [...]


Related posts:<ol><li><a href='http://brontoversity.com/2010/02/09/feed-me-seymour-using-rss-feeds-can-give-your-message-new-reach/' rel='bookmark' title='Permanent Link: Feed Me, Seymour! Using RSS Feeds Can Give Your Message New Reach'>Feed Me, Seymour! Using RSS Feeds Can Give Your Message New Reach</a> <small>In the past few years, web technology has provided us...</small></li>
<li><a href='http://brontoversity.com/2010/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/' rel='bookmark' title='Permanent Link: Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions'>Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/06/24/using-loop-tags-with-the-api/' rel='bookmark' title='Permanent Link: Using Loop Tags With The API'>Using Loop Tags With The API</a> <small>A very useful, but little known feature in Bronto is...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2009/11/powerlines.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/12/candy.jpg" alt="Powerlines" width="187" height="250" /></a></p>
<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>If you have been sending personalized messages to your contacts, then you already understand how useful this marketing technique can be.  If you would like to start exploring how to use personal information you have about your contacts, take a look at this post by Frank Chapman on <a href="http://brontoversity.com/2009/06/16/getting-personal-with-your-contacts/" target="_blank">Getting Personal With Your Contacts</a>.  But what about those of you that are sending messages with data that isn&#8217;t available until you send the message? API message tags to the rescue!  You can think of API message tags as place holders that you can fill in with data when you send a message through the API. Adam Covati touched on API message tags in <a href="http://brontoversity.com/2009/06/18/owning-automated-messages/" target="_blank">Owning Automated Messages</a>. API message tags are clearly useful in the case of a receipt or some other transactional type of message like the following example.  <a href="http://brontoversity.com/wp-content/uploads/2009/11/powerlines.jpg" target="_new"><img style="padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/12/messagetags.png" alt="Powerlines" width="536" height="270" /></a> You will notice that the message tags can exist within the context of an HTML tag, as is the case with the address fields in the table. The <code>%%#items%%</code> tag could be passed in as a table, or could be a simple list of items.  Since API message tags are just empty place holders, they can be used for anything that you want to contain up to date/personalized information, or data you don&#8217;t have at the time the message is designed.</p>
<h3>Setup</h3>
<p>So let&#8217;s make sure you know how to pass this data in from the development side. If you take a look at the documentation for the <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=104" target="_self"><code>writeDeliveries</code> function</a>, you will notice the optional fields parameter. This is an array of <code>messageField</code> objects which contain the name of the field, the type, and the actual content. The type is the type of message for which the data is destined, not the type of the data. In some cases, the difference between the data you send into an HTML message and the data you send into the text version of the message will be different. A transactional purchase receipt, for instance, would likely contain a list of items purchased. The HTML version of the message might get an HTML table structure, while the text version of the message would get a simple comma separated list of items.</p>
<h3>Passing In HTML</h3>
<p>Wait a minute, HTML? That&#8217;s right! You can pass in more than just a simple name of an item, or a purchase price. You can even make styling or formatting decisions at send time. You would probably want to leave most of the styling to your email designers, but clearly there is the opportunity to do a lot of interesting things with API message tags.</p>
<p>Hopefully you can now see how useful API message tags are. If you have been using the API and wondered what these optional tags were, run to your nearest code editor or IDE and send some messages with personalized information courtesy of API message tags.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2010/02/09/feed-me-seymour-using-rss-feeds-can-give-your-message-new-reach/' rel='bookmark' title='Permanent Link: Feed Me, Seymour! Using RSS Feeds Can Give Your Message New Reach'>Feed Me, Seymour! Using RSS Feeds Can Give Your Message New Reach</a> <small>In the past few years, web technology has provided us...</small></li>
<li><a href='http://brontoversity.com/2010/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/' rel='bookmark' title='Permanent Link: Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions'>Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2010/06/24/using-loop-tags-with-the-api/' rel='bookmark' title='Permanent Link: Using Loop Tags With The API'>Using Loop Tags With The API</a> <small>A very useful, but little known feature in Bronto is...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/12/10/give-them-what-they-want-with-api-message-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Have the Power: Agency Level API Access</title>
		<link>http://brontoversity.com/2009/11/12/i-have-the-power-agency-level-api-access/</link>
		<comments>http://brontoversity.com/2009/11/12/i-have-the-power-agency-level-api-access/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 19:23:42 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[agency]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=5377</guid>
		<description><![CDATA[
This post only applies to Legacy Version 3 of the API
So far, most of the API examples and blog posts that we&#8217;ve written have dealt with a single account. But what if you have an agency account and want to automate tasks or have other needs that require the use of the API? The chances [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
<li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://brontoversity.com/wp-content/uploads/2009/11/powerlines.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/11/powerlines.jpg" alt="Powerlines" width="172" height="250" /></a></p>
<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>So far, most of the API examples and blog posts that we&#8217;ve written have dealt with a single account. But what if you have an agency account and want to automate tasks or have other needs that require the use of the API? The chances are pretty good that you will want to perform these tasks for more than one, or even all of your subaccounts. With agency level API permissions, an agency user has the ability to login to the API and perform tasks in any subaccount just as though it was logged into the subaccount itself.</p>
<h3>Let&#8217;s Get Started</h3>
<p>First, make sure you have an agency user with agency API access turned on.</p>
<p><a href="http://brontoversity.com/wp-content/uploads/2009/11/permissions.jpg" target="_new"><img style="padding: 5px;" src="http://brontoversity.com/wp-content/uploads/2009/11/permissions.jpg" alt="Permissions" width="474" height="212" /></a></p>
<p>Note that this user does not need to have administrator privileges. This allows you to restrict the amount of access this user has in the Bronto web application, while still allowing access to the API.</p>
<p>Now you can login to the API using this username, password, and the sitename from from the Sign In tab of your agency preferences. As with logging into the agency portion of the Bronto web application, you can&#8217;t perform subaccount activities just yet (i.e. updating contacts, sending messages, etc).  You&#8217;ll first need to login to a specific subaccount by using the optional <code>siteId</code> parameter in the <code>login</code> function. This <code>siteId</code> can be retrieved by using the <code>readAccounts</code> function. In fact, this is the only function you&#8217;ll have access to as an agency API user.  Once you have these <code>siteIds</code>, you may choose to store them locally. This way you won&#8217;t have to go through the first step of logging in as the agency user and reading them.</p>
<h3>Keep This In Mind&#8230;</h3>
<p>If your subaccounts change somewhat frequently and you are creating an interface to allow someone in your organization to perform various subaccount activities, you may want to continue to perform the initial agency login and retrieval of <code>siteIds</code> step. Doing this allows you to present an up to date list of all your subaccounts.</p>
<p>Included is a <a title="Agency Level API Example" href="http://brontoversity.com/wp-content/uploads/2009/11/agency_level_api_example.zip" target="_blank">PHP example</a> that shows how you can use a single login function for both agency and subaccount logins. Let us know if you have any questions in the comments section below.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
<li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/11/12/i-have-the-power-agency-level-api-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have Logs Will Travel</title>
		<link>http://brontoversity.com/2009/10/15/have-logs-will-travel/</link>
		<comments>http://brontoversity.com/2009/10/15/have-logs-will-travel/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 18:26:01 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=5049</guid>
		<description><![CDATA[This post only applies to Legacy Version 3 of the API
Using a web service is a little bit like a leap of faith.  You no longer have total control of the code and are depending on the service to perform a chunk of your work flow.  The benefits are obvious, in that you don&#8217;t have [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2009/11/12/i-have-the-power-agency-level-api-access/' rel='bookmark' title='Permanent Link: I Have the Power: Agency Level API Access'>I Have the Power: Agency Level API Access</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>Using a web service is a little bit like a leap of faith.  You no longer have total control of the code and are depending on the service to perform a chunk of your work flow.  The benefits are obvious, in that you don&#8217;t have to develop or maintain<a href="http://brontoversity.com/wp-content/uploads/2009/10/logging.jpg" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/10/logging.jpg" alt="Logging" width="250" height="200" /></a> that code.  The downside is that when something does go wrong, it&#8217;s tempting to blame the web service provider. However, this is not always the case and in the event that something does go wrong, you need a way to determine where the failure was. One way is to use a SOAP testing tool as we&#8217;ve seen in Washing with SOAP part <a href="http://brontoversity.com/2009/06/04/washing-with-soap-part-1/" target="_blank">1</a>, <a href="http://brontoversity.com/2009/07/09/washing-with-soap-part-2/" target="_blank">2</a>, <a href="http://brontoversity.com/2009/07/30/washing-with-soap-part-3/" target="_blank">3</a>.  This is a quick way to verify that the web service is doing what it&#8217;s supposed to.  But if you need to debug your code, then you will need a way to output the SOAP requests and responses that you are sending and receiving.  This will also be valuable information to show to the provider of the web service you are consuming.  So, let&#8217;s look at how to do this in a few different languages.</p>
<h3>PHP Logging Example</h3>
<p>PHP(version 5+) gives you easy access to the last request and response through the SOAP Client object.  The functions <code>__getLastRequest()</code> and <code>__getLastResponse()</code> will return a string representation of the last request and response.  You can either echo this string to standard output, as with the very simple file logger class in this example, or more than likely in your production code you will be logging it to a file.  <a href="http://brontoversity.com/wp-content/uploads/2009/10/logging_examplephp.zip">Get the code</a></p>
<h3>Python Logging Example</h3>
<p>If you&#8217;re using the Suds SOAP library for Python, you can enable logging through Python&#8217;s own logging library.  You won&#8217;t need to directly access the request and response strings. You can also control how much information you receive by setting the logging level. Additionally, the library allows adding a file handler to pipe the output to a log file.  Pretty convenient, right?  <a href="http://brontoversity.com/wp-content/uploads/2009/10/logging_examplepy.zip">Get the code<br />
</a></p>
<h3>Java Logging Example</h3>
<p>With Java, using the JAX-WS SOAP stack, things get slightly more complicated.  If you worked through accessing the SOAP header through the use of a SOAP message handler, then you&#8217;ll be familiar with the process here.  What we&#8217;ll be doing is writing a handler whose purpose is to intercept requests and responses, log them, and then pass them along to the next handler.  Here you will find the handler code, as well as the code to associate it to the binding.  Again, this is for use with Java&#8217;s JAX-WS library.  If you&#8217;re using Apache Axis or some other SOAP library, you will likely have alternate methods to log SOAP messages.  <a href="http://brontoversity.com/wp-content/uploads/2009/10/loghandlerjava.zip">Get the code</a></p>
<p>While some languages are easier than others in terms of logging SOAP messages, you should always write your code with the idea that at some point, something may go wrong. When something does go wrong, you&#8217;ll need a way to investigate what happened.  Without being able to see the SOAP messages that your application and the Bronto API are passing back and forth, you will have a much harder time debugging your code.  So with these examples in hand, go forth and log those SOAP messages.</p>
<p><em>Alex Durzy<br />
Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<li><a href='http://brontoversity.com/2009/11/12/i-have-the-power-agency-level-api-access/' rel='bookmark' title='Permanent Link: I Have the Power: Agency Level API Access'>I Have the Power: Agency Level API Access</a> <small> This post only applies to Legacy Version 3 of...</small></li>
<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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/10/15/have-logs-will-travel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Cleaning: Clearing Contacts From Lists</title>
		<link>http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/</link>
		<comments>http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:31:37 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Did You Know?]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=4805</guid>
		<description><![CDATA[This post only applies to Legacy Version 3 of the API
Did you know we had a function in our API to clear all contacts from a list?  It was recently added and is conveniently called clearLists.  This function will remove the contacts from a list, but it will not remove the contacts themselves [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</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/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>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>Did you know we had a function in our API to clear all contacts from a list?  It was recently added and is conveniently called <code>clearLists</code>.  This function will remove the contacts from a list, but it will not remove the contacts themselves from Bronto.</p>
<p>Here are a couple sample PHP functions that make use of the <code>readLists</code> and <code>clearLists</code> functions.  With these functions you can clear one or more lists of all contacts, without having to individually remove contacts from the lists.</p>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
/**<br />
* clear one or more lists of all contacts<br />
*<br />
* $bapi Binding to the Bronto API<br />
* $lists Array of list ids<br />
*<br />
* returns an array of results<br />
*/<br />
function clear_lists($bapi, $lists)<br />
{<br />
$parameters = array("ids"=&gt;$lists);<br />
$results = $bapi-&gt;clearLists($parameters);<br />
return($results-&gt;return-&gt;result);<br />
}</code></p>
<p>/**<br />
* get the ids for a set of list names<br />
*<br />
* $bapi Binding to the Bronto API<br />
* $list_names The name of the lists to read<br />
*<br />
* returns an array of ids</p>
<p>*/<br />
function get_list_ids($bapi, $list_names)<br />
{<br />
$list_ids = array();</p>
<p>// get all the lists<br />
$attributes = array();<br />
$attributes["label"] = FALSE;<br />
$attributes["activeCount"] = FALSE;</p>
<p>$filter = array();</p>
<p>$parameters = array(&#8220;attributes&#8221;=&gt;$attributes, &#8220;filter&#8221;=&gt;$filter);<br />
$results = $bapi-&gt;readLists($parameters);</p>
<p>// get ids for lists specified in $list_names<br />
$lists = $results-&gt;return-&gt;lists;<br />
foreach($lists as $list)<br />
{<br />
if(in_array($list-&gt;name, $list_names))<br />
{<br />
$list_ids[] = $list-&gt;id;<br />
}<br />
}<br />
return($list_ids);<br />
}</p>
</div>
<p><em>Alex Durzy</em><br />
<em>Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/08/27/who-loves-you/' rel='bookmark' title='Permanent Link: Who Loves You: Getting Open Rates Via The API'>Who Loves You: Getting Open Rates Via The API</a> <small> This post only applies to Legacy Version 3 of...</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/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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/09/24/spring-cleaning-clearing-contacts-from-lists/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Who Loves You: Getting Open Rates Via The API</title>
		<link>http://brontoversity.com/2009/08/27/who-loves-you/</link>
		<comments>http://brontoversity.com/2009/08/27/who-loves-you/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:17:19 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=4391</guid>
		<description><![CDATA[
This post only applies to Legacy Version 3 of the API
You know you can update contacts and schedule deliveries through the Bronto API, but what about access to all that great statistical data such as opens and clicks for your contacts and deliveries?  Let&#8217;s look at the readOpens function and how we might use it [...]


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/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/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/' rel='bookmark' title='Permanent Link: Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions'>Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions</a> <small> This post only applies to Legacy Version 3 of...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/08/opendoor.jpg" alt="Open Door" width="250" height="187" /></p>
<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>You know you can <a href="http://brontoversity.com/2009/07/09/washing-with-soap-part-2/" target="_new">update contacts</a> and <a href="http://brontoversity.com/2009/07/30/washing-with-soap-part-3/" target="_new">schedule deliveries</a> through the Bronto API, but what about access to all that great statistical data such as opens and clicks for your contacts and deliveries?  Let&#8217;s look at the readOpens function and how we might use it to determine who loves you, or at least who loves to open your messages, the most.</p>
<h3>Open Sesame</h3>
<p>The <a href="http://app.bronto.com/api/?q=v3_f_view&amp;fn=View&amp;id=11" target="_new">readOpens</a> function allows us to gather opens at a very granular level, either by contact or delivery id.  Using the results you get back from this function, you can generate a list of the contacts that opened the most emails.  You will need to be aware of the difference between total opens and unique opens.  If you&#8217;ve used the Bronto web application and looked at any of the message reports, you&#8217;re most likely already familiar with this concept.  A contact can open an email multiple times, and depending on your particular use case, you may or may not be interested in this.  For the purposes of this exercise, we&#8217;ll be looking at unique opens.  With a unique open, it doesn&#8217;t matter to us here if a contact opened a single email 20 times, we only want to count the open once.</p>
<p>First, let&#8217;s outline what we need to do in order to accomplish our task, and then we&#8217;ll look at an example in PHP.</p>
<ol>
<li>Login to the API.</li>
<li>Retrieve a list of deliveries for a date range.</li>
<li>Retrieve the opens for each delivery.</li>
<li>Get the contacts that opened the delivery.</li>
<li>Aggregate the total number of emails opened by each contact.</li>
</ol>
<p>Feel free to download this <a href="http://brontoversity.com/wp-content/uploads/2009/08/open_functions.txt" target="_new">script</a>, shown below, and begin tweaking it for your own requirements.</p>
<h4>Getting Opens in PHP</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
/**<br />
* login to the Bronto API<br />
*<br />
* $username Bronto username<br />
* $password Bronto password<br />
* $sitename Bronto sitename<br />
*<br />
* return binding<br />
*/<br />
function login($username, $password, $sitename)<br />
{<br />
$BRONTO_WSDL = 'http://api.bronto.com/?q=mail_3&amp;wsdl';<br />
// Set some defaults<br />
set_time_limit(600);<br />
ini_set("memory_limit", "150M");<br />
ini_set("default_socket_timeout", 300);<br />
ini_set("soap.wsdl_cache_enabled", 0);</code></p>
<p>// creates a handle to bronto API to be used in all subsequent calls<br />
$bapi = new SoapClient( $BRONTO_WSDL, array(&#8220;trace&#8221; =&gt; 1) );</p>
<p>// call login operation to obtain a sessionId<br />
$parameters = array(&#8220;username&#8221; =&gt; $username,<br />
&#8220;password&#8221; =&gt; $password,<br />
&#8220;sitename&#8221; =&gt; $sitename);<br />
$result = $bapi-&gt;login($parameters);</p>
<p>// just return null if there was a problem<br />
if(!$result-&gt;return-&gt;success)<br />
{<br />
return(null);<br />
}</p>
<p>// setup soap header which will be used on all calls to the api<br />
$session_header = new SoapHeader(&#8220;http://api.bronto.com&#8221;,   &#8221;sessionHeader&#8221;,</p>
<p>array(&#8220;sessionId&#8221; =&gt; $result-&gt;return-&gt;sessionId));<br />
$bapi-&gt;__setSoapHeaders(array($session_header));<br />
return($bapi);<br />
}<br />
/**<br />
* read the deliveries for a date range.<br />
*<br />
* $bapi &#8211; binding to bronto api<br />
* $start_date &#8211; the starting date<br />
* $end_date &#8211; the ending date<br />
*<br />
* date/time format: UTC timezone &#8220;yyyy-mm-dd hh:mm:ss&#8221;<br />
* hh:mm:ss is not required to specify a date<br />
*<br />
* return an array of delivery objects<br />
*/<br />
function read_deliveries($bapi, $start_date, $end_date)<br />
{<br />
$attributes = array();<br />
$attributes["status"] = true;</p>
<p>$filter = array();<br />
$filter["criteria"] = array();</p>
<p>$criteria1 = array();<br />
$criteria1["attribute"] = &#8220;start&#8221;;<br />
$criteria1["comparison"] = &#8220;&gt;&#8221;;<br />
$criteria1["value"] = array();<br />
$criteria1["value"]["value"] = $start_date;<br />
$criteria1["value"]["type"] = &#8220;date&#8221;;<br />
$filter["criteria"][] = $criteria1;</p>
<p>$criteria2 = array();<br />
$criteria2["attribute"] = &#8220;start&#8221;;<br />
$criteria2["comparison"] = &#8220;&lt;&#8221;;<br />
$criteria2["value"] = array();<br />
$criteria2["value"]["value"] = $end_date;<br />
$criteria2["value"]["type"] = &#8220;date&#8221;;<br />
$filter["criteria"][] = $criteria2;</p>
<p>$filter["operator"] = &#8220;and&#8221;;</p>
<p>$parameters = array(&#8220;attributes&#8221;=&gt;$attributes, &#8220;filter&#8221;=&gt;$filter);<br />
$results = $bapi-&gt;readDeliveries($parameters);</p>
<p>return($results-&gt;return-&gt;deliveries);<br />
}</p>
<p>/**<br />
* count the unique opens for the given list of deliveries<br />
*<br />
* $bapi &#8211; binding the bronto api<br />
* $deliveries &#8211; list of delivery objects<br />
*<br />
* return array of contact id associated with the number of opened emails<br />
*/<br />
function count_unique_opens_for_deliveries($bapi, $deliveries)<br />
{<br />
// ths list of contacts with the unique open count<br />
$unique_opens = array();</p>
<p>// print a &#8220;working&#8221; message and &#8230;<br />
echo &#8220;Reading opens&#8221;;<br />
foreach($deliveries as $delivery)<br />
{<br />
$opens = read_opens_for_delivery($bapi, $delivery-&gt;id);<br />
if($opens)<br />
{<br />
echo &#8220;.&#8221;;<br />
// get a list of unique contacts that opened this delivery<br />
$contacts = array();<br />
foreach($opens as $open)<br />
{<br />
//if(!array_key_exists($open-&gt;contactId, $contacts))<br />
if(!in_array($open-&gt;contactId, $contacts))<br />
{<br />
//$opens_for_delivery[$open-&gt;contactId] = 1;<br />
$contacts[] = $open-&gt;contactId;<br />
}<br />
}<br />
// aggregate contacts list to unique_opens list<br />
foreach($contacts as $contact)<br />
{<br />
$unique_opens[$contact] += 1;<br />
}<br />
}<br />
}<br />
echo &#8220;n&#8221;;<br />
return($unique_opens);<br />
}<br />
$bapi = login(&#8220;username&#8221;, &#8220;password&#8221;, &#8220;sitename&#8221;);<br />
if(!$bapi)<br />
{<br />
exit(&#8220;Error logging in.  Exiting&#8230;n&#8221;);<br />
}</p>
<p><code>$deliveries = read_deliveries($bapi, "2009-08-01", "2009-08-10");<br />
$unique_opens = count_unique_opens_for_deliveries($bapi, $deliveries);<br />
print_r($unique_opens);</code></p>
</div>
<h3>Now What?</h3>
<p>We now have a list of contact ids along with the number of emails each contact opened. You can use these ids for other operations, such as managing the lists to which the contact is subscribed, or sending the contact a message.  Perhaps you want to base a future email on the number of times a contact has opened previous emails.  If you actually dig a little deeper into the data that is returned by the readOpens function, you will also see that you can get the IP address from which the open originated.  Maybe you want to get a sense for where your emails are being opened most often?  You can use this data along with an ip address lookup service to generate this.</p>
<p>The other way to retrieve open information is by contact id.  If you have a specific contact or list of contacts in which you are interested, you may decide to use this method instead.  Again, you will need to be aware of unique verses total opens, but the process will be fairly similar.  What other information is available you ask?  Next time we&#8217;ll look at link/click data so you can see who loves you enough to click a link.</p>
<p><em>Alex Durzy</em><br />
<em>Support Engineer at Bronto</em></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/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/01/21/keep-your-eye-on-the-sparrow-using-the-api-to-retrieve-conversions/' rel='bookmark' title='Permanent Link: Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions'>Keep Your Eye On The Sparrow: Using The API To Retrieve Conversions</a> <small> This post only applies to Legacy Version 3 of...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/08/27/who-loves-you/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Washing With SOAP: Part 3</title>
		<link>http://brontoversity.com/2009/07/30/washing-with-soap-part-3/</link>
		<comments>http://brontoversity.com/2009/07/30/washing-with-soap-part-3/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 17:22:31 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=3949</guid>
		<description><![CDATA[
This post only applies to Legacy Version 3 of the API
In the first two parts of this series, Washing With SOAP: Part 1 and Washing With SOAP: Part 2, we saw how a SOAP testing tool, such as soapUI, can be used to test and learn about a particular web service; In this case, the [...]


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/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/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>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img style="float: right; padding: 5px 5px 5px 5px;" title="Create API Lists" src="http://brontoversity.com/wp-content/uploads/2009/07/3416808836_38942be509.png" alt="Create API Lists" width="250" height="150" /></p>
<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>In the first two parts of this series, <a href="http://brontoversity.com/2009/06/04/washing-with-soap-part-1/" target="_blank">Washing With SOAP: Part 1</a> and <a href="http://brontoversity.com/2009/07/09/washing-with-soap-part-2/" target="_blank">Washing With SOAP: Part 2</a>, we saw how a SOAP testing tool, such as <a href="http://soapui.com" target="_blank">soapUI</a>, can be used to test and learn about a particular web service; In this case, the Bronto API.  We logged in to the API, created some contacts, and retrieved some contacts.  These operations are useful for keeping a contact database in sync with Bronto.  In this post, we&#8217;ll look at how to actually schedule a delivery.</p>
<h3>Create a List</h3>
<p>You can send to a list, contact, segment, or combinations of all three.  In this case, we&#8217;ll actually be sending to a list that has been created in the Bronto application.  You can manage your lists and segments in the application and send to them from the API, but you&#8217;ll need to obtain the id of the list or segment first.</p>
<h3>Login and Retrieve the List and Messages IDs</h3>
<p>Refer to <a href="http://brontoversity.com/2009/07/09/washing-with-soap-part-2/" target="_blank">Part 2</a> if you need to review how to login and obtain a session ID.  I previously created a list in Bronto called &#8220;mynewsletter&#8221;, and as you can see in the request, I specified this in the filter criteria.  You can also retrieve all of the lists by not specifying any filter criteria, but we know the name of the list, so let&#8217;s use it.  We also need to know the id of the message we want to send, so we need to use the appropriate read operation and filter.  Here I have retrieved a message called &#8220;julynewsletter&#8221;.</p>
<h4>Request &#8211; readLists</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;api:sessionHeader&gt;<br />
&lt;api:sessionId&gt;aaaa1111bbbb2222cccc3333dddd&lt;/api:sessionId&gt;<br />
&lt;/api:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:readLists&gt;<br />
&lt;api:attributes&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:label&gt;true&lt;/api:label&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:activeCount&gt;true&lt;/api:activeCount&gt;<br />
&lt;/api:attributes&gt;<br />
&lt;api:filter&gt;<br />
&lt;!--Zero or more repetitions:--&gt;<br />
&lt;api:criteria&gt;<br />
&lt;api:attribute&gt;name&lt;/api:attribute&gt;<br />
&lt;api:comparison&gt;=&lt;/api:comparison&gt;<br />
&lt;api:value&gt;<br />
&lt;api:type&gt;string&lt;/api:type&gt;<br />
&lt;api:value&gt;mynewsletter&lt;/api:value&gt;<br />
&lt;/api:value&gt;<br />
&lt;/api:criteria&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:operator&gt;&lt;/api:operator&gt;<br />
&lt;/api:filter&gt;<br />
&lt;/api:readLists&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<h4>Response &#8211; readLists</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:readListsResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:lists&gt;<br />
&lt;ns1:id&gt;eeee1111ffff2222gggg3333hhhh&lt;/ns1:id&gt;<br />
&lt;ns1:name&gt;mynewsletter&lt;/ns1:name&gt;<br />
&lt;ns1:label&gt;My Newsletter&lt;/ns1:label&gt;<br />
&lt;ns1:activeCount&gt;2&lt;/ns1:activeCount&gt;<br />
&lt;/ns1:lists&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:readListsResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code></div>
<h4>Request &#8211; readMessages</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;api:sessionHeader&gt;<br />
&lt;api:sessionId&gt;aaaa1111bbbb2222cccc3333dddd&lt;/api:sessionId&gt;<br />
&lt;/api:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:readMessages&gt;<br />
&lt;api:attributes&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:status&gt;true&lt;/api:status&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:messageFolderId&gt;true&lt;/api:messageFolderId&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:content&gt;false&lt;/api:content&gt;<br />
&lt;/api:attributes&gt;<br />
&lt;api:filter&gt;<br />
&lt;!--Zero or more repetitions:--&gt;<br />
&lt;api:criteria&gt;<br />
&lt;api:attribute&gt;name&lt;/api:attribute&gt;<br />
&lt;api:comparison&gt;=&lt;/api:comparison&gt;<br />
&lt;api:value&gt;<br />
&lt;api:type&gt;string&lt;/api:type&gt;<br />
&lt;api:value&gt;julynewsletter&lt;/api:value&gt;<br />
&lt;/api:value&gt;<br />
&lt;/api:criteria&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:operator&gt;&lt;/api:operator&gt;<br />
&lt;/api:filter&gt;<br />
&lt;/api:readMessages&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<h4>Response &#8211; readMessages</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:readMessagesResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:messages&gt;<br />
&lt;ns1:id&gt;gggg1111hhhh2222eeee3333&lt;/ns1:id&gt;<br />
&lt;ns1:name&gt;wysiwygmessage&lt;/ns1:name&gt;<br />
&lt;ns1:status&gt;approved&lt;/ns1:status&gt;<br />
&lt;ns1:messageFolderId&gt;aaaa000000000000000000000000bbbb&lt;/ns1:messageFolderId&gt;<br />
&lt;/ns1:messages&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:readMessagesResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code></div>
<h3>Schedule The Delivery</h3>
<p>You can schedule a delivery to be sent immediately, by specifying &#8220;now&#8221; as the send time, or you can alternately specify a UTC date and time.  Try scheduling the delivery for far enough in the future so that you have time to log into the application and see it in your outbox.  Let&#8217;s schedule something for tomorrow morning at 9:00 AM EDT(13:00 UTC).</p>
<h4>Request &#8211; writeDeliveries</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;api:sessionHeader&gt;<br />
&lt;api:sessionId&gt;a260a7b0e50bbef3b9e5b517d712ccd2&lt;/api:sessionId&gt;<br />
&lt;/api:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:writeDeliveries&gt;<br />
&lt;!--1 or more repetitions:--&gt;<br />
&lt;api:deliveries&gt;<br />
&lt;api:start&gt;2009-07-31 13:00:00&lt;/api:start&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:messageId&gt;</code><code>gggg1111hhhh2222eeee3333</code><code>&lt;/api:messageId&gt;<br />
&lt;!--1 or more repetitions:--&gt;<br />
&lt;api:recipients&gt;<br />
&lt;api:type&gt;list&lt;/api:type&gt;<br />
&lt;api:id&gt;</code><code>eeee1111ffff2222gggg3333hhhh</code><code>&lt;/api:id&gt;<br />
&lt;/api:recipients&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:fromEmail&gt;me@mydomain.com&lt;/api:fromEmail&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:fromName&gt;It's Me&lt;/api:fromName&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:replyEmail&gt;me@mydomain.com&lt;/api:replyEmail&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:optin&gt;&lt;/api:optin&gt;<br />
&lt;/api:deliveries&gt;<br />
&lt;api:handler&gt;<br />
&lt;api:mode&gt;insert&lt;/api:mode&gt;<br />
&lt;/api:handler&gt;<br />
&lt;/api:writeDeliveries&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<h4>Response &#8211; writeDeliveries</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:writeDeliveriesResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:result&gt;<br />
&lt;ns1:id&gt;jjjj1111kkkk2222llll3333&lt;/ns1:id&gt;<br />
&lt;ns1:success&gt;true&lt;/ns1:success&gt;<br />
&lt;ns1:isNew&gt;true&lt;/ns1:isNew&gt;<br />
&lt;/ns1:result&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:writeDeliveriesResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code></div>
<p>If you log into the application, you will see this delivery just as if it had been scheduled in the application.  Now that you&#8217;ve seen how to use some of the most commonly used operations, and have an easy way to access and try out API operations without writing code, go explore some of the other operations.  For instance, you may want to collect open and click data about your contacts and deliveries that can be used in a custom data analysis report.  In an upcoming post we&#8217;ll look at some code that uses the readOpens and readClicks functions.</p>
<p>For informationon on the Bronto API visit <a href="http://api.bronto.com/" target="_new">http://api.bronto.com/</a>, or feel free to leave us a comment in the comments section below.</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/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/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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/07/30/washing-with-soap-part-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Washing With SOAP: Part 2</title>
		<link>http://brontoversity.com/2009/07/09/washing-with-soap-part-2/</link>
		<comments>http://brontoversity.com/2009/07/09/washing-with-soap-part-2/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 13:38:44 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=3090</guid>
		<description><![CDATA[This post only applies to Legacy Version 3 of the API
Last time we discussed how to setup Bronto API access and the benefits of using a SOAP testing tool.  This time we&#8217;ll look at some of the actual requests and responses so you can see what the API can do.
If you already have soapUI installed, [...]


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/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><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p><a href="http://brontoversity.com/2009/06/04/washing-with-soap-part-1/" target="_blank">Last time</a> we discussed how to setup Bronto API access and the benefits of using a SOAP testing tool.  This time we&#8217;ll look at some of the actual requests and responses so you can see what the API can do.</p>
<p>If you already have <a href="http://soapui.com" target="_blank">soapUI</a> installed, go ahead and create a new Project and point it at the <a href="http://api.bronto.com/?q=mail_3&amp;wsdl">Bronto WSDL</a>.</p>
<p><img style="padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/06/newproject.png" alt="New Project" width="440" height="200" /></p>
<p>Expand the project to expose all of the available operations.  Each operation should already have a single request created for you.  The nice thing about a tool like soapUI is that you can invoke the functions and see the XML requests and responses all in the same window.</p>
<p><img style="padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/06/operations.png" alt="Operations" width="451" height="432" /></p>
<h3>Login</h3>
<p>Double click on the login request to see what the parameters for the operation are and edit the request appropriately with your Bronto credentials.  You will find your sitename in Bronto under <strong>Home-&gt;Settings-&gt;General</strong>.  Your login request message should look something like this:<br />
<code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header/&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:login&gt;<br />
&lt;api:username&gt;your_bronto_userid&lt;/api:username&gt;<br />
&lt;api:password&gt;your_password&lt;/api:password&gt;<br />
&lt;api:sitename&gt;your_sitename&lt;/api:sitename&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:siteId&gt;&lt;/api:siteId&gt;<br />
&lt;/api:login&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code><br />
Note that the tool shows all of the parameters, including the optional ones. You can go ahead and remove those if you want to clean up your XML. Now invoke the operation with the green arrow.  If your account is setup correctly, you should get back a response that looks something like the following:<br />
<code><br />
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:loginResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:success&gt;true&lt;/ns1:success&gt;<br />
&lt;ns1:sessionId&gt;aaaabbbbccccddddeeeeffffgggghhhh&lt;/ns1:sessionId&gt;<br />
&lt;ns1:serviceURL&gt;https://api.bm23.com/api/?q=mail_3&lt;/ns1:serviceURL&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:loginResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code><br />
If the login was successful, you will see a value of &#8220;true&#8221; in the success field.  Also, you will want to keep the sessionId that you got back handy – you&#8217;ll need it in all subsequent calls to the web service.</p>
<h3>Create Some Contacts</h3>
<p>Now let&#8217;s create some contacts.  We&#8217;ll create two at the same time here.  The current Bronto API allows up to 1000 in a single request.</p>
<h4>Request</h4>
<h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;api:sessionHeader&gt;<br />
&lt;api:sessionId&gt;aaaabbbbccccddddeeeeffffgggghhhh&lt;/api:sessionId&gt;<br />
&lt;/api:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:writeContacts&gt;<br />
&lt;!--1 or more repetitions:--&gt;<br />
&lt;api:contacts&gt;<br />
&lt;api:email&gt;first@email.address&lt;/api:email&gt;<br />
&lt;api:status&gt;active&lt;/api:status&gt;<br />
&lt;api:msgPref&gt;html&lt;/api:msgPref&gt;<br />
&lt;/api:contacts&gt;<br />
&lt;api:contacts&gt;<br />
&lt;api:email&gt;second@email.address&lt;/api:email&gt;<br />
&lt;api:status&gt;active&lt;/api:status&gt;<br />
&lt;api:msgPref&gt;html&lt;/api:msgPref&gt;<br />
&lt;/api:contacts&gt;<br />
&lt;api:handler&gt;<br />
&lt;api:mode&gt;insertUpdate&lt;/api:mode&gt;<br />
&lt;/api:handler&gt;<br />
&lt;/api:writeContacts&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
</h4>
<h4>Response</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:writeContactsResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:result&gt;<br />
&lt;ns1:id&gt;aaaabbbbccccddddeeeeffffgggghhhh1111&lt;/ns1:id&gt;<br />
&lt;ns1:success&gt;true&lt;/ns1:success&gt;<br />
&lt;ns1:isNew&gt;true&lt;/ns1:isNew&gt;<br />
&lt;/ns1:result&gt;<br />
&lt;ns1:result&gt;<br />
&lt;ns1:id&gt;aaaabbbbccccddddeeeeffffgggghhhh2222&lt;/ns1:id&gt;<br />
&lt;ns1:success&gt;true&lt;/ns1:success&gt;<br />
&lt;ns1:isNew&gt;true&lt;/ns1:isNew&gt;<br />
&lt;/ns1:result&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:writeContactsResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;<br />
</code></div>
<p>Assuming the request is successful, you should see these contacts in the Bronto application.  Of course, there is also a read function that will allow you to retrieve all or some subset of your contacts.</p>
<h3>Read Some Contacts</h3>
<p>Let&#8217;s read all of the active contacts that were created today(edit the date as appropriate).  If you&#8217;re following along, you should get back the two contacts you just created.  If you remove the optional criteria block, you will be returned all of the available contacts (Note: if you have more than 1000 contacts you will be returned groups of 1000, and will need to use the readNext function to get any additional groups).</p>
<h4>Request</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bronto.com"&gt;<br />
&lt;soapenv:Header&gt;<br />
&lt;api:sessionHeader&gt;<br />
&lt;api:sessionId&gt;aaaabbbbccccddddeeeeffffgggghhhh&lt;/api:sessionId&gt;<br />
&lt;/api:sessionHeader&gt;<br />
&lt;/soapenv:Header&gt;<br />
&lt;soapenv:Body&gt;<br />
&lt;api:readContacts&gt;<br />
&lt;api:attributes&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:status&gt;true&lt;/api:status&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:msgPref&gt;true&lt;/api:msgPref&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:created&gt;true&lt;/api:created&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:modified&gt;true&lt;/api:modified&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:source&gt;true&lt;/api:source&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:customSource&gt;true&lt;/api:customSource&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:lists&gt;true&lt;/api:lists&gt;<br />
&lt;/api:attributes&gt;<br />
&lt;api:filter&gt;<br />
&lt;!--Zero or more repetitions:--&gt;<br />
&lt;api:criteria&gt;<br />
&lt;api:attribute&gt;status&lt;/api:attribute&gt;<br />
&lt;api:comparison&gt;=&lt;/api:comparison&gt;<br />
&lt;api:value&gt;<br />
&lt;api:type&gt;string&lt;/api:type&gt;<br />
&lt;api:value&gt;active&lt;/api:value&gt;<br />
&lt;/api:value&gt;<br />
&lt;/api:criteria&gt;<br />
&lt;api:criteria&gt;<br />
&lt;api:attribute&gt;created&lt;/api:attribute&gt;<br />
&lt;api:comparison&gt;&gt;&lt;/api:comparison&gt;<br />
&lt;api:value&gt;<br />
&lt;api:type&gt;date&lt;/api:type&gt;<br />
&lt;api:value&gt;2009-06-02&lt;/api:value&gt;<br />
&lt;/api:value&gt;<br />
&lt;/api:criteria&gt;<br />
&lt;!--Optional:--&gt;<br />
&lt;api:operator&gt;and&lt;/api:operator&gt;<br />
&lt;/api:filter&gt;<br />
&lt;/api:readContacts&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;<br />
</code></div>
<h4>Response</h4>
<div style="border: 1px solid; overflow: auto; height: 225px;"><code><br />
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.bronto.com"&gt;<br />
&lt;SOAP-ENV:Body&gt;<br />
&lt;ns1:readContactsResponse&gt;<br />
&lt;ns1:return&gt;<br />
&lt;ns1:contacts&gt;<br />
&lt;ns1:id&gt;aaaabbbbccccddddeeeeffffgggghhhh1111&lt;/ns1:id&gt;<br />
&lt;ns1:email&gt;first@email.address&lt;/ns1:email&gt;<br />
&lt;ns1:status&gt;active&lt;/ns1:status&gt;<br />
&lt;ns1:msgPref&gt;html&lt;/ns1:msgPref&gt;<br />
&lt;ns1:created&gt;2009-06-02 18:55:49&lt;/ns1:created&gt;<br />
&lt;ns1:modified&gt;2009-06-02 18:55:49&lt;/ns1:modified&gt;<br />
&lt;ns1:source&gt;api&lt;/ns1:source&gt;<br />
&lt;ns1:customSource/&gt;<br />
&lt;/ns1:contacts&gt;<br />
&lt;ns1:contacts&gt;<br />
&lt;ns1:id&gt;aaaabbbbccccddddeeeeffffgggghhhh2222&lt;/ns1:id&gt;<br />
&lt;ns1:email&gt;second@email.address&lt;/ns1:email&gt;<br />
&lt;ns1:status&gt;active&lt;/ns1:status&gt;<br />
&lt;ns1:msgPref&gt;html&lt;/ns1:msgPref&gt;<br />
&lt;ns1:created&gt;2009-06-02 18:55:49&lt;/ns1:created&gt;<br />
&lt;ns1:modified&gt;2009-06-02 18:55:49&lt;/ns1:modified&gt;<br />
&lt;ns1:source&gt;api&lt;/ns1:source&gt;<br />
&lt;ns1:customSource&gt;added from api&lt;/ns1:customSource&gt;<br />
&lt;/ns1:contacts&gt;<br />
&lt;/ns1:return&gt;<br />
&lt;/ns1:readContactsResponse&gt;<br />
&lt;/SOAP-ENV:Body&gt;<br />
&lt;/SOAP-ENV:Envelope&gt;</code></div>
<p>You will find that many of the read and write functions operate similarly to the examples above, so feel free to go ahead and give them a try.  We&#8217;ve already seen an example of an API Triggered Automated Message Rule in <a href="http://brontoversity.com/2009/06/18/owning-automated-messages/" target="_blank">Owning Automated Messages</a>.  Next time we&#8217;ll look at how to schedule a delivery using one of these rules, the API, and our handy SOAP testing tool.<a href="http://brontoversity.com/2009/06/18/owning-automated-messages/" target="_blank"><br />
</a></p>
<p><em>Alex Durzy</em><br />
<em>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/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/2009/07/09/washing-with-soap-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Washing With SOAP: Part 1</title>
		<link>http://brontoversity.com/2009/06/04/washing-with-soap-part-1/</link>
		<comments>http://brontoversity.com/2009/06/04/washing-with-soap-part-1/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 17:25:48 +0000</pubDate>
		<dc:creator>Alex Durzy</dc:creator>
				<category><![CDATA[API Legacy Version 3]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://brontoversity.com/?p=3017</guid>
		<description><![CDATA[This post only applies to Legacy Version 3 of the API
If you have ever integrated your organization&#8217;s application(s) or database(s) with an external data source, chances are you used a web service, or even multiple web services.  These generally come in two flavors: SOAP (Simple Object Access Protocol) and REST (Representational State Transfer).  Search [...]


Related posts:<ol><li><a href='http://brontoversity.com/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>This post only applies to Legacy Version 3 of the API</strong></span></p>
<p>If you have ever integrated<a href="http://brontoversity.com/wp-content/uploads/2009/06/dirtypigs.png" target="_new"><img style="float: right; padding: 5px 5px 5px 5px;" src="http://brontoversity.com/wp-content/uploads/2009/06/dirtypigs.png" alt="Pigs" width="256" height="170" /></a> your organization&#8217;s application(s) or database(s) with an external data source, chances are you used a web service, or even multiple web services.  These generally come in two flavors: SOAP (Simple Object Access Protocol) and REST (Representational State Transfer).  Search around on the Internet and you&#8217;ll find plenty of advocates for one or the other.  When you get right down to it though, both are equally adept at getting a job done, i.e. getting your system to talk to another system.  In the case of Bronto, we provide an API in the form of a SOAP web service.  Visit our <a href="http://api.bronto.com" target="_new">API documentation</a> for more detailed information.</p>
<h3>First Things First: Setting Up API Permissions In Bronto</h3>
<p>To make use of the Bronto service, you will need to create a Bronto user in your account with API access.  To enable API access for a user, go to <strong>Home-&gt;Users</strong> and click on a user or the edit pencil icon to the right of the user.  Once you are on the Edit Permissions page, make sure that API Permissions are enabled on the Other tab.  <a href="http://brontoversity.com/wp-content/uploads/2009/06/permissions.png" target="_new"><img style="padding: 5px;" src="http://brontoversity.com/wp-content/uploads/2009/06/permissions.png" alt="Permissions" width="531" height="124" /></a></p>
<h3>Getting Familiar With SOAP</h3>
<p>SOAP services use XML as their language, and HTTP for the transmission of the messages.  They also “advertise” what operations are available in a file called a WSDL (Web Services Definition Language).  If this sounds complex and painfully hard to program, fear not, because the essence of how to use a SOAP based web service is this: send it a message that tells it to do something, and wait for the response.  When you get around to integrating with your system, you will generally do this in the programming language of your choice (most of the popular languages provide methods to call SOAP services).  If not, you can always resort to constructing the XML messages and sending them over HTTP, just like any other request for a web based resource.  But what do these XML messages look like, and how would one use a SOAP service without knowing a bunch of programmer mumbo jumbo?</p>
<h3>Getting A SOAP Testing Tool</h3>
<p>Simple actually.  Use a SOAP testing tool that&#8217;s independent of your programming language.  Web service documentation is great, but you really care about what that service does with your data, so why not jump in and start using the service right away.  A good testing tool is great for learning the ins and outs of a web service before you even start writing code.  It will also be your best friend when something goes wrong and you&#8217;re not sure if the problem is in your code, or is just the way the web service functions.  Most testing tools, such as <a href="http://soapui.com" target="_new">soapUI</a>, which is freely available for download, allow you to generate the XML messages for a web service by parsing its WSDL.  With soapUI, all you will need to do is create a new project and point it at the <a href="http://app.bronto.com/api/?q=v3_howto_access" target="_new">Bronto WSDL</a>.  A tool like soapUI allows you to utilize and test out a web service without worrying about any coding details.  This is useful before, during, and after the development process.  Once you have explored the operations that the web service provides and feel comfortable with how they work, you can do some coding yourself or try out some of our sample code on <a href="http://api.bronto.com" target="_new">http://api.bronto.com</a>.</p>
<p>Sound good so far?  Interested in learning more?  Stay tuned for part 2 of this blog post series on SOAP.  Next time we&#8217;ll look at what the SOAP requests and responses look like for some of the more commonly used operations.  Until then, go ahead and explore the API yourself, no programming required.</p>
<p><em>Alex Durzy</em><br />
<em>Support Engineer at Bronto</em></p>


<p>Related posts:<ol><li><a href='http://brontoversity.com/2009/10/15/have-logs-will-travel/' rel='bookmark' title='Permanent Link: Have Logs Will Travel'>Have Logs Will Travel</a> <small>This post only applies to Legacy Version 3 of the...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://brontoversity.com/2009/06/04/washing-with-soap-part-1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
