
Vertical Response API Usage in ColdFusion
A sample application that demonstrates how to build basic
functionality using the Vertical Response API and ColdFusion.
About This Sample
Thanks to Jill Crimmins @ Locus Interactive for helping us get started with this sample code.This sample application implements several high-level features
and illustrates how to leverage the Vertical Response API. The sample
implements the following functionality:
- Logging into the Vertical Response system and attaining a
SessionID
- Creating a list
- Adding a record to the list
- Create an email campaign using the freeform
- Add HTML & text content to the campaign
- Attach list to campaign
- Send a test email for the campaign
- Launch campaign
- Get list of sent campaign
- Display each campaign's statistics
Prerequisites & Notes
- Create a Vertical Response account (http://www.verticalresponse.com/)
- Contact
us to have your account enabled for API access.
- OPTIONAL:
Vertical Response should have provided you with a
certificate and a passphrase.
- The sample was tested on Mac OS X
- This sample will work on ColdFusion 6.1 and above.
Running The Sample
- Download and extract the VRAPI_ColdFusion.zip file contents and place them in the wwwroot folder
- Open VRAPI_lifecycle.cfm solution in a text editor.
- Enter your access identifiers
- From line 4, 9-10
vr = createObject("webservice",
"https://api.verticalresponse.com/wsdl/1.0/VRAPI.wsdl"); // WSDL
location
StructInsert(vr_loginarray, "username", ""); //username
StructInsert(vr_loginarray, "password", ""); // password
- open VRAPI_Reporting.cfm
and modify lines 4, 9-10
vr = createObject("webservice",
"https://api.verticalresponse.com/wsdl/1.0/VRAPI.wsdl"); // WSDL
location
StructInsert(vr_loginarray, "username", ""); //username
StructInsert(vr_loginarray, "password", ""); // password
- In VRAPI_Reporting.cfm
modify lines 33, 38, 42
StructInsert(NVPair_email, "value", ""); //enter an email address value
StructInsert(NVPair_fn, "value", ""); // enter First Name value
StructInsert(NVPair_fn, "value", ""); // enter Last Name value
- Some variables are required for the test application to
work. First Name, Last Name, Email Address are 3 variables that are
used to add a member to the list and to send test messages.