Salsa Scoop
The Ins and Outs of Salsa's API
The Ins and Outs of Salsa's API
Submitted Mon Aug 20 2007 14:42:46 GMT-0400 (EDT)
I first came across Salsa's API quite by accident. As the lead programmer for TriggerID, I was looking to try and integrate one of our products, CampaignWindow, with Salsa for the Young Democrats of America. Many YD chapters around the country are using CampaignWindow for their web presence but also use Salsa (known internally as DEMopolis) for their membership lists, etc.
In poking around Salsa I noticed it had a link in the footer for Developers which contained cut-and-paste code for a form clients could use on their site to add users. Wondering if I might be able to automate this, on a hunch I did a Google search for "DIA API" and came across this. [The non-Google path to our documentation hive is here. -ed.]
This was a gold mine, listing all tables and associated field names, and though the documentation was all geared towards how to interface with your data via web forms, I decided to try and see if a silent HTTP POST would work too. Setting up a test was easy enough, but due to not knowing one crucial piece of information, it didn't work and I spent several hours trying to figure out what I did wrong. Here's the initial code (in ColdFusion):
After banging my head against the wall for awhile, I finally realized that I needed a chapter_key as well and the test went through. Then it was time to get it integrated into our products and this was a snap. Now a client can input their organization and chapter keys into their control panel of campaignwindow and any user that joins their mailing list, registers, or contributes gets added to the client's Supporter table on Salsa. Perusing the wiki for other places to interface, I also added it so that any event is also auto-posted. After getting the test working, integrating it this way only took an hour, max. We're looking to interface with other tables on Salsa, and will probably tackle Contributions next. I also decided to take it a step further and integrate it with another product of ours, a new political social networking site adonkeyandanelephantwalkintoabar.com -- I'm really excited by this aspect as it breaks the silo that currently exists with social networking sites. You gain friends and supporters on them, but there the information stays unless you like to do a lot of cutting and pasting. Now when anyone "friends" a group or candidate on our socnet, and the candidate or group has input their org and chapter keys, the user's contact information gets added to the candidate/group's supporter table. Here's a screenshot of the edit profile section where a candidate or group can integrate their profile with Salsa/DIA: Here's hoping that some of the other platforms and large data sites (hint to DNC!) take a cue from Salsa and open up their applications for such data-sharing, as it really helps free up activists' time and energy for, well, activism, plus makes them more efficient and effective in their online work :-)<cfhttp url="http://www.democracyinaction.com/dia/api/process.jsp" method="post" resolveurl="no">
<cfhttpparam type="formfield" name="organization_KEY" value="1">
<cfhttpparam type="formfield" name="table" value="supporter">
<cfhttpparam type="formfield" name="First_Name" value="Test">
<cfhttpparam type="formfield" name="Last_Name" value="User">
<cfhttpparam type="formfield" name="Email" value="angela@campaignwindow.com">
<cfhttpparam type="formfield" name="redirect" value="http://adonkeyandanelephantwalkintoabar.com">
</cfhttp>
Comments
Business Administration Writing Services
blogs
blogs
James
Boatman
바카라사이트
918kiss
pg
slot
pgslot
พีจี
bslot
Slotbetauto
Please login to post comments