You are on page 1of 107

Interact Campaign

Interact Web Services API


Developer Guide

Responsys Interact
January 2011

900 Cherry Ave. 5th Floor | San Bruno, CA 94066 | 650.745.1700 | www.responsys.com

Table of Contents

Table of Contents
INTERACT WEB SERVICES API

Interact API Functionality

Whats New in the Interact API for Interact Campaign 5.16 (January 2011)

10

Whats New in the Interact API for Interact Campaign 5.14 (June 2010)

10

Whats New in the Interact API for Interact Campaign 5.13 (January 2010)

10

Whats New in the Interact API for Interact Campaign 5.12 (September 2009)

11

Whats New in the Interact API for Interact Campaign 5.11 (July 2009)

12

Whats New in the Interact API for Interact Campaign 5.10 (April 2009)

13

Whats New in the Interact API for Interact Campaign 5.9 (February 2009)

14

Whats New in the Interact API for Interact Campaign 5.8 (October 2008)

15

Whats New in the Interact API for Interact Campaign 5.7.1 (September 2008)

16

Interact API URLs

18

Security Considerations

18

Web Service Standards Compliance

19

Development Environments

19

Interact Platform Maintenance and Downtime

19

Backward Compatibility

19

INTERACT PLATFORM AND DATA MODEL OVERVIEW

20

INTERACT OBJECT AND DATA MODEL

20

Campaigns

21

Forms

21

Data Sources

21

Documents

22

Interact API Guide

Page 2 of 107

Responsys Confidential

Table of Contents

INTERACT API GETTING STARTED

23

General Steps

23

For Java Applications

23

For C# Applications

28

INTERACT API CALLS

30

SESSION MANAGEMENT API CALLS

30

Login

30

Logout

32

GetServerTimestamp

34

FOLDER MANAGEMENT API CALLS

35

CreateFolder

35

DeleteFolder

37

ListFolders

39

ListFolderContents

41

ListFolderObjects

43

ImportFolder

46

ExportFolder

48

DATA MANAGEMENT API CALLS

50

CreateDataSource

50

UpdateDataSource

52

UpdateDataSourceUsingMultipleColumns

53

AppendDataSource

54

CopyDataSource

55

CopyDataSourceToTable

56

CreateSQLDataSource

57

Interact API Guide

Page 3 of 107

Responsys Confidential

Table of Contents

DeleteDataSource

58

TruncateTable

59

DownloadDataSourceByTimestamp

60

DownloadDataSource

61

PurgeDataSourceByTimestamp

62

PurgeDataSource

63

ScrubDataSource

64

CheckResult

65

Cancel

66

AddIndex

67

DeleteIndex

68

ListIndexes

69

GetDataSourceSchema

70

GetDataSourceRecordCount

71

CONTENT MANAGEMENT API CALLS

72

UploadDocument

72

RemoveDocument

73

CopyDocument

74

ShowDocument

75

CAMPAIGN MANAGEMENT API CALLS

76

CreateCampaign

76

CopyCampaign

77

DeleteCampaign

78

GetCampaignProperties

79

SetCampaignProperties

80

Interact API Guide

Page 4 of 107

Responsys Confidential

Table of Contents

LaunchCampaign

81

UnScheduleCampaign

82

GetCampaignStatus

82

StopCampaign

83

TriggerFormRules

84

GetLiveReportMetrics

85

GetReportOptions

86

GetCampaignsInDatamart

87

GetLaunchesInDatamart

89

RunLaunchReport

91

RunTriggeredMessageReport

92

INTERACT API TYPE DEFINITIONS

93

PRIMITIVE TYPE DEFINITIONS

93

boolean

93

string

93

int and long

93

dateTime

93

INTERACT API TYPE DEFINITIONS

94

CampaignInfo

94

CampaignLaunchType

94

CampaignProperties

94

CampaignPurpose

96

CampaignState

96

CampaignType

96

CampaignVariable

96

Interact API Guide

Page 5 of 107

Responsys Confidential

Table of Contents

CharacterEncoding

97

ClickThru

97

ClickthroughCount

97

DataSourceProperties

97

Document

98

DocumentFile

98

DocumentType

98

EmailFormat

99

Field

99

FieldMap

99

FilterObjectType

99

FolderContentType

99

FolderImport

99

FolderObject

100

FormData

100

HtmlData

100

Index

100

InteractObject

100

InteractObjectType

101

IntermediateResult

101

LaunchInfo

101

LiveReportMetrics

102

LiveReportPeriod

102

Log Table

102

LogTableType

103

LoginResult

103

Interact API Guide

Page 6 of 107

Responsys Confidential

Table of Contents

OptOut

103

OptOutMode

103

PurgeDataSourceProperties

104

RecipientLocale

104

RecordCount

105

Report

106

ReportOptions

106

ReportResult

106

ResponsePeriod

107

ScrubProperties

107

ScheduleFrequency

107

Interact API Guide

Page 7 of 107

Responsys Confidential

Interact API Functionality

Interact Web Services API


The Interact Web Services Application Programming Interface (Interact API) gives your developers standardsbased access to many of the data, content, and campaign management features of Responsys Interact Campaign.
With the Interact API, you can build your own bi-directional data transfers, campaign management customization
applications, and other applications that need to interface with your Interact account from a remote location.
You may want to use the Interact API to:
Synchronize or replicate data between Interact and your enterprise systems
Build your own campaign creation workflow.
Build your own reporting dashboard that is driven from report metrics and data downloaded from Interact.
A conceptual diagram of the use of the Interact API is shown below.

Because the Interact API is based on service-oriented architecture (SOA) and industry-standard technologies like
SOAP and WSDL, your developers can use their choice of development tools to gain programmatic access to your
organizations Responsys Interact account. The Interact API enables easy integration of your enterprise systems
with the campaigns and data stored in your Responsys Interact account, enabling greater automation of marketing
tasks and processes.

Interact API Guide

Page 8 of 107

Responsys Confidential

Interact API Functionality

Interact API Functionality


The Interact API supports a subset of the functionality of the Interact user interface as outlined below.
Session Management
Login/Logout of a Web Services session
Get the Interact platform timestamp for data synchronization logic
Folder and Interact Object Management
Create or deleting folders
Import or export Interact folder archive files
Retrieve folder and folder object information
List and Data Management
Create, append, update or delete records in table data source by uploading delimited text files
Delete records based on timestamp comparisons
Create SQL view objects
Download and purge data
Copy, scrub, delete, or truncate a data source
Obtain data object schema information
Add, delete, or list indexes on a table
Content Management
Upload a message document and image files
Copy or delete a document
Campaign Management
Create a campaign, or change its properties
Copy or delete a campaign
Launch, stop a launch, or unschedule a campaign
Get campaign launch status
Get report metrics for a campaign
Form Management
Trigger form rules to insert/update a record in an existing table and/or trigger a message from a campaign.

Interact API Guide

Page 9 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.16 (January 2011)

Whats New in the Interact API for Interact Campaign 5.16 (January 2011)
The 5.16 Interact Campaign release introduces the following enhancements and bug fixes:
1. New API call for copying a filter, SQL, or Join view to a static table: copyDataSourceToTable()
2.
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Whats New in the Interact API for Interact Campaign 5.14 (June 2010)
The 5.14 Interact Campaign release introduces the following enhancements and bug fixes:
3. New API call for copying a filter, SQL, or Join view to a static table: copyDataSourceToTable()
4. Fix for a defect that caused an unexpected expection when uncompressed files of sizes greater 10 MBs
were used with the appendDataSource API call. (Defect #7191)
5. Fix for a defect where client applications were unable to unschedule campaign launches for accounts that
contained a time zone setting other than Pacific Time. (Defect #7193)
6. The downloadDataSourceByTimestamp() no longer requires a restriction operator for timestamp or
equality comparisons. Specifically, this call can now be used to download all records from a data source.
(Defect #7325)
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Whats New in the Interact API for Interact Campaign 5.13 (January 2010)
The 5.13 Interact Campaign release introduces several new API calls, some behavior changes, and a number of
bug fixes.
1. Interact Login restrictions: Client Login IP restrictions that are managed via the Interact Account Admin
page now also apply to API sessions as well as UI sessions.
2. You can no longer attempt concurrent merge or purge operations on the same data source. If this is
attempted, an error message will be returned.
3. New API call for downloading a compressed file of data by timestamp filtering:
downloadDataSourceByTimestamp()
4. New API call for purging data from a data source: purgeDataSourceByTimestamp()

Interact API Guide

Page 10 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.12 (September 2009)

Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Whats New in the Interact API for Interact Campaign 5.12 (September 2009)
No changes were made to the Interact API for the 5.12 Interact Campaign release.

Interact API Guide

Page 11 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.11 (July 2009)

Whats New in the Interact API for Interact Campaign 5.11 (July 2009)
The 5.11 Interact Campaign release introduces one new API call and a number of bug fixes.
1. A new Interact API call has been added to allow for deleting records in bulk from a data source:
purgeDataSource()
2. A number of bugs have been fixed:
a. updateDataSource() call did not support pipe delimited zip file (6258).
b. appendDataSource() call was no properly handling field mappings where the incoming field had a
different name than the target table column (6223, 6153).
c. appendDataSource() call was not properly generating TIMESTAMP_ values for appended records
if the target table contained any field with memo field type (6246).
d. updateDataSource() was not working correctly if the delimited text file had different number or
different order of columns than the destination datasource (6202).
e. When an incoming data file contained a TIMESTAMP_ field, the field mapping was performed
incorrectly when creating or uploading into a data source (6243).
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Interact API Guide

Page 12 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.10 (April 2009)

Whats New in the Interact API for Interact Campaign 5.10 (April 2009)
The 5.10 Interact Campaign release introduces several new API calls, and a number of bug fixes.
1. New calls have been added to the Interact API.
a. Reporting APIs
i. getReportOptions()
ii. getCampaignsInDatamart()
iii. getLaunchesInDatamart()
iv. runLaunchReport()
v. runTriggeredMessageReport()
b. Data merge API for multicolumn match rules: see updateDataSourceUsingMultipleColumns()
2. Behavior changes: Campaign launch limits: a campaign can no longer be launched with a frequency
greater than once every 15 minutes. For high frequency launching applications, Responsys Real-Time
Messaging or Form-based triggering should be considered. Contact your account manager or Responsys
Support for more information about these triggering options.
3. Bug fixes and performance enhancements
a. The performance and stability of merge operations with the updateDataSource call has been
improved (3933, 5754, 5890).
b. Creation of SQL objects is now fixed for edge cases where a table alias is a portion of a column
name (5845).
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Interact API Guide

Page 13 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.9 (February 2009)

Whats New in the Interact API for Interact Campaign 5.9 (February 2009)
The 5.9 Interact Campaign release introduces several new API calls, and a number of bug fixes.
1. New calls have been added to the Interact API:
a. listFolderObjects
b. triggerFormRules
c. getLiveReportMetrics
2. New restrictions Maximum concurrent Interact API logins: a limit on the number of concurrent logins
has been implemented to better protect the Interact platform from inadvertant abuse by client applications
that would lead to performance degradation for all client applications. This limit is set to 10 by default. If
your integration projects require a higher limit, contact Responsys Support to discuss increasing this limit
for your account.
3. Bug fixes:
a. Data is not appended or updated if the incoming field name does not match the target field name
(5373).
b. TIMESTAMP_ field values are not generated in some cases for append and update operations
(5157).
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Interact API Guide

Page 14 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.8 (October 2008)

Whats New in the Interact API for Interact Campaign 5.8 (October 2008)
The 5.8 Interact Campaign release introduces several new API calls, and a number of bug fixes.
1. New calls have been added to the Interact API:
a. getServerTimestamp
b. truncateTable
c. addIndex
d. deleteIndex
e. listIndexes
2. Bug fixes:
a. When copyDataSource is called, data extraction keys are now copied to the new data source.
b. From Address for a campaign can now be changed with the setCampaignProperties call. Note:
The From Address must already be defined for use in your Interact Campaign account.
Note: Additions to the Interact API for this release did not necessitate a versioning of the WSDL. Therefore, your
client applications do not have to be migrated to new web service endpoint URL, and should continue to use the
WSDL and web service endpoint introduced in the 5.7 release of Interact Campaign.

Interact API Guide

Page 15 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.7.1 (September 2008)

Whats New in the Interact API for Interact Campaign 5.7.1 (September 2008)
The Responsys Interact 5.7.1 release introduces a series of enhancements and bug fixes for the Interact Interact
API.
1. New Web Service Endpoint URLs and WSDLs have been introduced to support this new Interact API
version. The Web Service Endpoint URLs for the previous Interact API version will continue to be
supported and your existing client applications should not be impacted. You should make plans to migrate
to the new Interact API version to take advantage of recent enhancements.
2. Data APIs that involve file handling are now based on W3C SOAP Message Transfer Optimization
Mechansism (MTOM) as opposed to previous versions of these APIs which were based on MIME and
DIME attachments. This enhancement and other bug fixes should eliminate previously observed issues
with the upload of large data files.
3. Support for synchronous Data API options has been removed. New Data API calls are now based on an
asynchronous approach where a data file upload is initiated with one API call and the progress toward
completion of that upload is checked with another API call. For more information on these changes, refer
to the Data Management and checkResult API calls described in this guide.
4. Login API call now returns an session ID string that should be placed in the SOAP header of all
subsequent API calls to authenticate the client application request.
5. CampaignProperties object has been extended to include new property access:
a. It now supports retrieving the Interact Campaign identifier as well as the setting and getting an
External Campaign identifier.
b. CampaignProperties now includes campaignPurpose property which takes an enum with values of
PROMOTIONAL or TRANSACTIONAL.
6. Superfluous namespaces have been removed from the SOAP responses of API calls to make the XML
more readable and compact.
7. A number of new obects have been introduced to allow cleaner API calls: InteractObject. For example,
previously separate object types included AcknowledgmentDocument, Attachment, ClickTrack,
DistributionList, FollowUp, ResponseDB, SeedList, SupplementalDataSource, and
SuppressionDataSource. Since these are merely Interact obects with a folder and name property, a more
generic obect, called the InteractObject is now used for these former objects.
8. We have added the following new enumerated types for enhanced usability:
a. CampaignType (STANDARD, FORM, REALTIME) used in createCampaign.
b. ScheduleFrequency (ONCE, DAILY, WEEKLY, MONTHLY) used in launchCampaign.
c. LogTableType (SENT, FAILED) used in the LogTable element.
d. DocumentType (AOL, HTML, TEXT) used in the Document element.
e. OptOutMode (NONE, ONE_STEP, TWO_STEP, USER_URL) used in the OptOut element.
f.

FieldType (STR25, STR50, STR255, STR1000, MEMO, NUMBER, INTEGER, TIMESTAMP),


used in Field element.

g. FolderContentType (DATA, CAMPAIGN, DOCUMENT, REPORT, RULE, ALL_TYPES) used


instead of the contentType string.
Interact API Guide

Page 16 of 107

Responsys Confidential

Whats New in the Interact API for Interact Campaign 5.7.1 (September 2008)

h. FolderContentType (DATA, CAMPAIGN, DOCUMENT, REPORT, RULE, ALL_TYPES used


instead of the contentType string in listFolderContents API.
i.

RecipientLocale (all supported locale strings)

9. Added the following new elements


a. New string element optOutURL in the OptOut complexType. The new element will be used if the
mode is USER_URL.
b. New element Field which contains fieldName string & fieldType enum, used in the
DataSourceProperties.
c. New locale element in DocumentFile complexType.
10. Bug fixes:
a. When a campaign is launched via an API call, the conversion tracking property is no longer set to
false (4025).
b. When a campaign is created from campaign template that includes link tracking and its document
is changed, link tracking is no longer disabled (4057).
c. Use of setCampaignProperties to set a Link Table that was created with an API copy operation is
now possible (4115).
11. Java sample code has been revised based on the use of Apache Axis2 1.4 to generate Java stub classes
(previous samples were based on Axis 1.x).

Interact API Guide

Page 17 of 107

Responsys Confidential

Interact API URLs

Interact API URLs


When your account is enabled for access to the Interact API, the Responsys Support team will provide you with
the Interact API URLs needed to develop your projects. Interact API URLs for several available Responsys
Interact instances are provided below for preliminary reference only.
Responsys Interact Pod

Web Service API URLs

Interact 1 Pod
(interact1.responsys.net)

https://ws1.responsys.net/webservices57/services/ResponsysWS57
https://ws1.responsys.net/webservices57/services/ResponsysWS57?wsdl

Interact 3 Pod
(interact3.responsys.net)

https://ws3.responsys.net/webservices57/services/ResponsysWS57
https://ws3.responsys.net/webservices57/services/ResponsysWS57?wsdl

Interact 4 Pod
(interact4.responsys.net)

https://ws4.responsys.net/webservices57/services/ResponsysWS57
https://ws4.responsys.net/webservices57/services/ResponsysWS57?wsdl

Interact EMEA Pod


(interact.ruk1.net)

https://ws.ruk1.net/webservices57/services/ResponsysWS57
http://ws.ruk1.net/webservices57/services/ResponsysWS57?wsdl

Security Considerations
Communications between your client application and the Interact Campaign Interact API can be secured by using
the Secure Sockets Layer (SSL) protocol for HTTP requests and responses. This is a standard approach for
securing internet-based communications and was designed to prevent eavesdropping, tampering, and message
forgery. It secures communications over the internet by cryptographic methods based on a 128-bit encryption and
is a standard approach for securing SOAP-based Web service transactions.

Interact API Guide

Page 18 of 107

Responsys Confidential

Web Service Standards Compliance

Web Service Standards Compliance


The Interact API was implemented in compliance with the following specifications.
Simple Object Access Protocol (SOAP) 1.1
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
Web Service Description Language (WSDL) 1.1
http://www.w3.org/TR/2001/NOTE-wsdl-20010315
WS-I Basic Profile 1.1
http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html

Development Environments
The Interact API works with modern SOAP development environments, including, but not limited to, Visual
Studio .NET 2005 and Apache Axis. Development platforms vary in their SOAP implementations.
Implementation differences in certain development platforms might prevent access to some or all of the features in
the API. If you are using Visual Studio for .NET development, we recommend that you use Visual Studio 2003 or
higher.

Interact Platform Maintenance and Downtime


The Responsys Interact platform will undergo maintenance downtimes on a monthly or bi-monthly schedule.
During these downtimes, Interact Campaign login sessions will not be available. Attempts to create a login session
will return an error and client applications will need to take the appropriate action, which may include alerts to
support staff, integration job queuing, and/or scheduled re-attempts.

Backward Compatibility
Responsys supports backward compatibility as new versions of the Interact API are released. The Interact API is
backward compatible in that an application created to work with a given Interact API version will continue to
work with that same Interact API version in future platform releases. Specifically, the Interact API endpoint URL
is versioned so that different Interact API versions have different endpoint URLs. Your applications will continue
to work with the Interact API endpoint URLs of previous releases and you have the opportunity to migrate your
client applications to the newer Interact API version endpoint URLs to leverage enhanced functionality on a
schedule that meets your needs.
Responsys does not guarantee that an application written against one Interact API version will work with future
API versions since changes in method signatures and data representations are often required as we continue to
enhance the Interact platform; however, we strive to keep the Interact API consistent from version to version with
minimal if any changes required to port applications to newer Interact API versions. When an API version is to be
deprecated, advance end-of-life notice will be given at least 6 months before support for the API version is ended.
Responsys will directly notify customers using API versions planned for deprecation.

Interact API Guide

Page 19 of 107

Responsys Confidential

Backward Compatibility

Interact Platform and Data Model Overview


Since 1998, Responsys has been a technology leader and innovator in the marketing industry, delivering highquality campaign management software as a service over the Internet. Best known as the industrys #1-ranked
email marketing solution, Responsys Interact today is a comprehensive on-demand marketing platform with a
fully integrated suite of software applications all built from the ground up on a single-instance, multi-tenant
architecture.

Interact Object and Data Model


In the Interact Campaign user interface, you create and manage a variety of application objects that are needed to
execute your marketing programs. The Interact Campaign object model consists of the following types of objects.
Campaigns Allow users to execute individual email campaigns in batch or triggered modes
Forms Allow users to collect data via web forms
Data sources Allow users to store or filter data for a variety of purposes
Distribution lists tables Store recipient audience records
Campaign Supplemental data sources Store miscellaneous data that can be used for a multi-table
relational schema in a campaign for message content personalization and individualization.
Link tables Store link tracking information.
Campaign event tracking log tables Store recipient-level data on how recipients respond to given
campaigns.
SQL objects Represent a SQL view on a base table.
Documents Consist of re-usable creative content in the form of HTML and Text document objects that
are available for use in any Campaign or Form.
Folder Allow users to manage their various marketing projects by placing application objects in a series
of user-defined folders
The Interact API provides programmatic control over many of these objects, allowing client application developers
to create, change, or remove these objects to accomplish any given marketing automation goal. A brief discussion
of these objects is provided below. More information about these objects and their use in Interact Campaign is
available via the Interact Campaign documentation and training materials.

Interact API Guide

Page 20 of 107

Responsys Confidential

Campaigns

Campaigns
Campaign objects define the basic behavior of an email campaign in terms of audience, message, and settings. A
campaign can be launched in bulk immediately or scheduled for launch. The Campaign object has properties such
as:
General properties name, description, categorization, etc.
Audience distribution list and suppression lists
Message from header, reply-to header, subject header, HTML/Text message documents
Settings tracking options, auto-close behavior, default variables, campaign event log table, etc.

Forms
Form objects provide functionality for hosting web forms and processing submitted data. Forms can be used as
preference centers or general purpose surveys. Data collected from Forms can be merged into any table. Form
responses can also trigger follow-up emails to responders.

Data Sources
Data source objects come in the form of tables, filters, or SQL views and can be used for a variety of purposes in
Interact Campaign, including:
Distribution Lists Contain recipient records and can be used to define the audience of a campaign.
Supplemental Data Contain data that can be joined with a distribution list or queried by dynamic
content template functions to personalize and individualize a campaign message.
Campaign Event Tracking Log Data Contain recipient event data such as Sent, Opened, Clicked,
etc. that are generated by the Interact Campaign platform as recipients are involved in and respond to
various campaign messages.
Link Tracking Data or Link Tables Contain data needed to track links in a campaign message. At a
minimum, columns for a link name and a link destination URL are required for use of a link table in a
campaign.
An account can have any number of data sources, but it is recommended that a central contact list be created for a
given marketing objective. Ideally, a central list is created and updated using registration and preference center
web forms and/or daily FTP-based file feeds for situations where the recipient data is managed out side of Interact
Campaign. This central list table can then be filtered or queried to generate campaign distribution list segments
that drive individual campaign audience targeting.
Supplemental data sources are often used to store data that is not oriented around the definition of a list recipient
identity, but used instead for supplementing a list with additional recipient profile attributes via a join based on
some related key field (called the Data Extraction Key). Any given table schema is completely user-defined and,
as a result, data source tables can be used for a wide variety of uses, ranging from segmentation and message
personalization to storing campaign recipient level campaign event records.

Interact API Guide

Page 21 of 107

Responsys Confidential

Documents

When several tables are used to represent a multi-table relational marketing database where a variety of queries or
joins are made on the tables involved, users should create the proper indexes to prevent unwanted performance
impacts associated with full table scans on the tables being queried or joined.

Documents
Document objects define the creative content that can be used for Campaigns and Forms. There are two subtypes
of document object: HTML and Text. Example: An email campaign usually consists of an HTML and Text
document reference. The campaign will handle the packaging of HTML-only, Text-only, or Multi-part emails
automatically based on the recipient profile. Documents can be re-used across multiple campaigns and forms as
well as copied, edited, and deleted via the Interact Campaign user interface.

Interact API Guide

Page 22 of 107

Responsys Confidential

General Steps

Interact API Getting Started


To use this guide, you should have a basic familiarity with software development, SOAP-based Web Services and
the Interact Campaign user interface. Brief instructions for getting started with the Interact API in a Java or C#
application are provided in this section.

General Steps
In general, any Interact API client application project will involve the following steps.
1. Use the Interact API web services definition language (WSDL) document to generate supporting code for
executing SOAP-based client calls on the Interact API. Your development environment tool of choice
should provide support for accomplishing this step.
2. Use the Login call to establish a session with the Interact API. The Login call will return a session
identifier that should be placed in the SOAP header of all subsequent Interact API calls.
3. Use the available Interact API calls to accomplish a desired integration objective. If your client application
is inactive for longer than two hours, the session identifier will become invalid and your client application
will need to make a new Login call to start a new session.
4. Use the Logout call to end the Interact API session.

For Java Applications


1. Download the WSDL document and name the downloaded file ResponsysWS.wsdl and place it
somewhere in your project directory.
2. Use the Apache Axis2 WSDL2Java utility, as described on the Apache Axis2 web site, to generate Web
Services API stub classes:
%AXIS2_HOME%\bin\WSDL2Java -uri ResponsysWS5.7.wsdl -wv 1.1 -u -d
adb -s -p responsys.ws57.client -sp
Assuming the following environment variables are defined:

AXIS2_HOME = C:\axis2-1.4 (or location of the Apache Axis2 Standard Distribution)

AXIS2_LIB

AXIS2CLASSPATH =
%AXIS2_LIB%\axis.jar;%AXIS2_LIB%\jaxrpc.jar;%AXIS2_LIB%\saaj.jar;
%AXIS2_LIB%\commons-logging.jar;%AXIS2_LIB%\commonsdiscovery.jar;%AXIS2_LIB%\wsdl4j.jar

= %AXIS2_HOME%\lib

3. In your Java application, make sure that the generated Interact API stub classes are available to your
project build path.

Interact API Guide

Page 23 of 107

Responsys Confidential

For Java Applications

4. Import the following WSDL2Java-generated packages or specific classes needed for your client
application calls:
import responsys.ws57.*;
import responsys.ws57.client.*;
import responsys.ws57.fault.*;

5. Instantiate a Web service stub object:


ResponsysWS57Stub stub;
stub = new ResponsysWS57Stub(endPointURL);

6. Maintain session between requests with the following statement:


stub._getServiceClient().getOptions().setManageSession(true);
7. Instantiate a new Login request object and call the login method of the stub object:
Login login = new Login();
login.setUsername(username);
login.setPassword(password);
LoginResponse loginresponse = stub.login(login);
LoginResult loginResult = loginresponse.getResult();

8. Retrieve the sessionId string from the login result.


String sessionId = loginResult.getSessionId();
SessionHeader sessionHeader;
sessionHeader = new SessionHeader();
sessionHeader.setSessionId(sessionId);

9. Submit this sessionId with all following Web service calls.


ListFoldersResponse folders;
folders = stub.listFolders(new ListFolders(), sessionHeader);

10. Continue with client application logic.


11. In the event of an exception, alert appropriate staff and take followup action as needed.
12. Logout of the session when the client application tasks are complete.
13. Schedule the client application to run on a given frequency.

Interact API Guide

Page 24 of 107

Responsys Confidential

For Java Applications


package client.test;
import
import
import
import
import
import
import

java.io.File;
java.rmi.RemoteException;
org.apache.axis2.Constants;
javax.activation.DataHandler;
javax.activation.FileDataSource;
responsys.ws57.*;
responsys.ws57.client.*;

public class APITest {


ResponsysWS57Stub service;
SessionHeader sessionHeader;
public static void main(String[] args) {
APITest runTest = new APITest();
runTest.sampleCode();
}
private void sampleCode() {
try {
service = new ResponsysWS57Stub("...WS URL...");
Login login = new Login();
login.setUsername("XXXXX");
login.setPassword("YYYYY");
LoginResponse response = service.login(login);
String sessionId = response.getResult().getSessionId();
System.out.println("Login session token: " + sessionId);
if (sessionId != null) {
sessionHeader = new SessionHeader();
sessionHeader.setSessionId(sessionId);
// Set timeout that is appropriate for the maximum expected duration of API
calls (2 minutes)
service._getServiceClient().getOptions().setManageSession(true);
service._getServiceClient().getOptions().setTimeOutInMilliSeconds(
1000 * 60 * 2);
// MTOM code to support SOAP calls involving delimited text file uploads
service._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);
service._getServiceClient().getOptions().setProperty(Constants.Configuration.CACHE_ATTACHMENTS,
Constants.VALUE_TRUE);
service._getServiceClient().getOptions().setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD,
"4000");
// List folders example
ListFolders listFolders = new ListFolders();
ListFoldersResponse listFoldersResponse = service.listFolders(listFolders,
sessionHeader);
String[] folders = listFoldersResponse.getResult();
if (folders != null) {
for (String folder : folders) {
System.out.println("Folder Name = " + folder);
}
}

// Update table example

Interact API Guide

Page 25 of 107

Responsys Confidential

For Java Applications


FieldMap[] fieldMap = new FieldMap[3];
fieldMap[0] = new FieldMap();
fieldMap[0].setColumnNameInFile("CUSTOMER_ID");
fieldMap[0].setColumnNameInTable("CUSTOMER_ID");
fieldMap[0].setOverrideIfNull(true);
fieldMap[1] = new FieldMap();
fieldMap[1].setColumnNameInFile("EMAIL_ADDRESS");
fieldMap[1].setColumnNameInTable("EMAIL_ADDRESS");
fieldMap[1].setOverrideIfNull(true);
fieldMap[2] = new FieldMap();
fieldMap[2].setColumnNameInFile("FIRSTNAME");
fieldMap[2].setColumnNameInTable("FIRSTNAME");
fieldMap[2].setOverrideIfNull(true);
Field[] fields = new Field[3];
fields[0] = new Field();
fields[0].setFieldName("CUSTOMER_ID");
fields[0].setFieldType(FieldType.INTEGER);
fields[1] = new Field();
fields[1].setFieldName("EMAIL_ADDRESS");
fields[1].setFieldType(FieldType.STR255);
fields[2] = new Field();
fields[2].setFieldName("FIRSTNAME");
fields[2].setFieldType(FieldType.STR50);
DataSourceProperties properties = new DataSourceProperties();
properties.setFields(fields);
properties.setDelimitedBy("COMMA");
properties.setEnclosedBy("DOUBLE_QUOTE");
properties.setCharacterEncoding(CharacterEncoding.ISO_8859_1);
properties.setFolderName("Whats_New_In_5-10");
properties.setTableName("Customer_List");
properties.setCsvFileName("C:\\API_TEST\\data\\retail_list.csv");
File fileObj = new File("C:\\API_Test\\data\\retail_list.csv");
FileDataSource fds = new FileDataSource(fileObj);
DataHandler dataHandler = new DataHandler(fds);
properties.setCsvFileData(dataHandler);
UpdateDataSource updateDataSource = new UpdateDataSource();
updateDataSource.setProperties(properties);
updateDataSource.setMapping(fieldMap);
updateDataSource.setMatchColumnName("CUSTOMER_ID");
System.out.println("Starting table update");
UpdateDataSourceResponse updateDataSourceResponse =
service.updateDataSource(updateDataSource, sessionHeader);
RecordCount dataSrcResult = null;
IntermediateResult irws = null;
CheckResult checkResult = new CheckResult();
while (true) {
dataSrcResult = updateDataSourceResponse.getResult();
checkResult.setIntermediateResultKey(dataSrcResult.getKey());
irws = service.checkResult(checkResult, sessionHeader).getResult();
if (irws.getFinished()) {
if (irws.getComplete()) {
System.out.println("Record Count: " + ((RecordCount) irws).getCount());
break;
}
}
// wait for 10 minutes before next check
System.out.println("Sleep for bit ...");
Thread.sleep(10*60000);
}
System.out.println("Completed table update");

Interact API Guide

Page 26 of 107

Responsys Confidential

For Java Applications


// SQL data source example
CreateSQLDataSource createSQLDataSource = new CreateSQLDataSource();
createSQLDataSource.setFolderName("Whats_New_In_5-10");
createSQLDataSource.setSqlDataSrcName("Purchasers");
String[] baseFolders = new String[1];
String[] baseDataSources = new String[1];
baseFolders[0] = "Whats_New_In_5-10";
baseDataSources[0]="Customer_List";
createSQLDataSource.setBaseFolders(baseFolders);
createSQLDataSource.setBaseDataSources(baseDataSources);
createSQLDataSource.setSqlQuery("SELECT customer_id, email_address from
Customer_List WHERE num_purchases > 0");
createSQLDataSource.setOverwrite(true);
createSQLDataSource.setEmailAddressField("EMAIL_ADDRESS");
createSQLDataSource.setDataExtractionKey("CUSTOMER_ID");
service.createSQLDataSource(createSQLDataSource, sessionHeader);
System.out.println("Done with SQL creation");
// Logout
service.logout(new Logout(), sessionHeader);
}
} catch (RIFault rf) {
System.out.println("Exception Code = " + rf.getFaultMessage().getExceptionCode());
System.out.println("Exception Msg = " +
rf.getFaultMessage().getExceptionMessage());
} catch (RemoteException re) {
System.out.println("Remote Exception: " + re.toString());
} catch (InterruptedException e) {
System.out.println("Exception: " + e.toString());
} finally {
// Log out to clean up session.
}
}
}

Interact API Guide

Page 27 of 107

Responsys Confidential

For C# Applications

For C# Applications
1. Download the WSDL document and name the downloaded file ResponsysWS.wsdl.
2. Generate the web services proxy code needed to support your client applications calls on the Interact API:
a. Either open the command window from the Visual Studio menu or include the .NET Frameworks
bin directory in PATH environment variable.
b. Then, use the wsdl utility by running the command wsdl ResponsysWS.wsdl on the command
line.
c. This will generate a single .cs file. Copy this file to your project directory for use in your client
application.
3. Make sure you include references to the following .NET libraries: Microsoft Web.Services3 and
System.Web.Service.
4. In your C# application code, get a handle for the Web Service, and ensure the user session will be
maintained. A simple example is provided below.
5. Use the C# compiler to create an executable named fileName.exe, where fileName is the .CS file that
contains the Main() method.
csc *.cs
Important: Be sure that csc.exe is in your path, usually:
C:\WINDOWS\Microsoft.NET\Framework\v3.0)

Interact API Guide

Page 28 of 107

Responsys Confidential

For C# Applications
namespace WSCSharpClient {
using System;
using System.Net;
using System.IO;
using System.Xml;
using System.Web.Services.Protocols;
class TestResponsysWS {
ResponsysWSService stub;
bool loggedIn = false;
SessionHeader sessionHeader;
try {
string url = "... WS Endpoint URL ...";
string username = "user";
string password = "password";
stub = new ResponsysWSService();
stub.CookieContainer = new CookieContainer();
stub.Url = url;
// Call the login method
LoginResult loginResult = stub.login(username, password);
string sessionId = loginResult.sessionId;
if (sessionId != null) {
// Create the sessionHeader object and set it to the stub.
// The sessionHeader is passed to every other API call after the login.
sessionHeader = new SessionHeader();
sessionHeader.sessionId = sessionId;
stub.SessionHeaderValue = sessionHeader;
// Caution: It is important to set a sessionHeader object to the stub as it is used in all the subsequent
calls.
stub.Timeout = 1000 * 60 * 2;
// Caution: It is important to set a timeout that is appropriate for the maximum expected duration of API
calls.
loggedIn = true;
}
} catch (System.Web.Services.Protocols.SoapException e) {
Console.WriteLine("SoapException in login : " + e.Message);
Console.WriteLine("SoapException in login : " + e.Detail.InnerText);
} catch (Exception e) {
Console.WriteLine("Exception in login : " + e.Message);
}
}
}

Interact API Guide

Page 29 of 107

Responsys Confidential

Login

Interact API Calls

Session Management API Calls


Login
Syntax
boolean = service.login(string username, string password)

Usage
The first step for any client application is to establish a login session. This can be achieved using the login call.
When a client application invokes the login call, it passes a username and password as user credentials. Upon
receiving the client application login request, the Interact API authenticates these credentials, and returns a
LoginResult object. This object can be inspected to retrieve a session token that is required for use in all
subsequent API calls. After successfully completing the login call and retrieving the session token, a client
application needs to set this session token in the SOAP header for subsequent calls as a means of authentication.
Session tokens expire automatically after two hours of inactivity. Client applications that make infrequent login
calls should make explicit logout calls to prevent the accumulation of unnecessary open sessions. A limit is
placed on the number of concurrent API sessions that an account can initiate. It is important to properly manage
API sessions to avoid exceeding this limit. If the limit is reached, an error message will be returned, stating that the
allowed number of concurrent sessions has been exceeded.
Note that a JSESSIONID cookie is also set on the client application with the response from the login call. This
cookie must be persisted for use in subsequent API calls in the session.

Important
If you are using either Axis2, C# or any other .Net language, the JSESSIONID is automatically captured and sent
in subsequent requests. However, if you are not using one of these languages, you must capture the JSESSIONID
and Path from the login response HTTP Headers and set them in a cookie in the HTTP headers of all subsequent
requests until you log out. This will prevent errors.

Example:
HTTP/1.1 200 OK
Date: Tue, 16 Nov 2010 14:52:14 GMT
Set-Cookie: JSESSIONID=C1DC1654EE6BBEEBE94043EE4D006F59.tmws2; Path=/tmws
Content-Type: text/xml;charset=UTF-8
Connection: close

Interact API Guide

Page 30 of 107

Responsys Confidential

Login

Transfer-Encoding: chunked

Request Arguments
Name
username
password

Type
string
string

Description
User name for the Responsys Interact account.
Password for the specified user.

Response
The login call returns a LoginResult object, which has a single property:
Name
result

Type
string

Description
Session ID associated with this session. Note: Your client application
needs to set this value in the session header of subsequent service calls.

Example SOAP Request


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<tns:login xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:username>user</tns:username>
<tns:password>pwd</tns:password>
</tns:login>
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<loginResponse xmlns="urn:ws57.responsys">
<result>
<sessionId>-220b6206:11be22bbe11:-7ff3</sessionId>
</result>
</loginResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 31 of 107

Responsys Confidential

Logout

Logout
Syntax
boolean = service.logout()

Usage
Use the logout call to end an API session. The last step for any client application is to end a session by logging out.
Note that sessions will be terminated automatically after two hours of inactivity.

Request Arguments
None

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag representing the success of a request to end the Interact API session.

Page 32 of 107

Responsys Confidential

Logout

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-220b6206:11be22bbe11:-7ff3</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:logout
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<logoutResponse xmlns="urn:ws57.responsys">
<result>true</result>
</logoutResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 33 of 107

Responsys Confidential

GetServerTimestamp

GetServerTimestamp
Syntax
dateTime = service.getServerTimestamp ()

Usage
Use the getServerTimestamp call to return the current timestamp from the Interact platform. This can be used for
client applications that manage synchronization of data. Rather than a total replication of data, the timestamp can
be used in tandem with last modified timestamps for data records to only process records that have change since
the last synchronization run.

Request Arguments
None

Response
Name
result

Interact API Guide

Type
datetime

Description
Current date and time of the Interact platform.

Page 34 of 107

Responsys Confidential

CreateFolder

Folder Management API Calls


CreateFolder
Syntax
boolean = service.createFolder(string folderName)

Usage
Use the createFolder call to create a new empty folder in an Interact account. This call returns a boolean value that
indicates the success of the folder creation request.

Request Arguments
Name
folderName

Type
string

Description
New folder name to be created.

Response
Name
result

Interact API Guide

Type
boolean

Description
Success flag for creation of folder.

Page 35 of 107

Responsys Confidential

CreateFolder

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-220b6206:11be22bbe11:-7f83</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:createFolder
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:folderName>test folder</tns:folderName>
</tns:createFolder>
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<createFolderResponse xmlns="urn:ws57.responsys">
<result>true</result>
</createFolderResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 36 of 107

Responsys Confidential

DeleteFolder

DeleteFolder
Syntax
boolean = service.deleteFolder(string folderName)

Usage
Use the deleteFolder call to delete a folder and its contents from an Interact account.

Request Arguments
Name
folderName

Type
string

Description
Name of folder to delete.

Response
Name
result

Interact API Guide

Type
boolean

Description
Success flag for deletion of folder.

Page 37 of 107

Responsys Confidential

DeleteFolder

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-220b6206:11be22bbe11:-7f83</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:deleteFolder
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<tns:folderName>test folder</tns:folderName>
</tns:deleteFolder>
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<deleteFolderResponse xmlns="urn:ws57.responsys">
<result>true</result>
</deleteFolderResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 38 of 107

Responsys Confidential

ListFolders

ListFolders
Syntax
String[] = service.listFolders()

Usage
Use the listFolders call to retrieve a listing of all of the folders in an account.

Request Arguments
None

Response
Name
result

Interact API Guide

Type
string[]

Description
Folder names in account.

Page 39 of 107

Responsys Confidential

ListFolders

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-220b6206:11be22bbe11:-7f83</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:listFolders
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<listFoldersResponse xmlns="urn:ws57.responsys">
<result>Demo_DynamicContent</result>
<result>Example Campaigns</result>
<result>Marguerite Folder</result>
<result>New_Built-in_Tests</result>
<result>ProfileData</result>
<result>ProfileForms</result>
<result>Reporting Examples</result>
<result>Template Content</result>
<result>Triggered_Message_Campaigns</result>
<result>~System</result>
</listFoldersResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 40 of 107

Responsys Confidential

ListFolderContents

ListFolderContents
Syntax
String[] = service.listFolderContents(string folderName, FolderContentType contentType)

Usage
The listFolderContents call returns a string array containing the names of objects contained in a specified Interact
folder.

Request Arguments
Name
folderName
contentType

Type
string
FolderContentType

Description
Name of folder. Note that folder names are case sensitive.
Content type restriction: DATA, CAMPAIGN, DOCUMENT,
REPORT, RULE, ALL_TYPES

Response
Name
result

Interact API Guide

Type
string[]

Description
Names of objects in specified folder.

Page 41 of 107

Responsys Confidential

ListFolderContents

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-220b6206:11be22bbe11:-7f83</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:listFolderContents
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<tns:folderName>ProfileData</tns:folderName>
<tns:contentType>DATA</tns:contentType>
</tns:listFolderContents>
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<listFolderContentsResponse xmlns="urn:ws57.responsys">
<result>Customer_List</result>
<result>Master_Seed_List</result>
<result>Master_Test_List</result>
<result>Men Purchased 4x or more</result>
<result>No Purchases Last 90 Days</result>
<result>Purchase Segment Example with SQL</result>
<result>SupplementalExample</result>
</listFolderContentsResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 42 of 107

Responsys Confidential

ListFolderObjects

ListFolderObjects
Syntax
FolderObject[] = service.listFolderObjects(string folderName, FilterObjectType type)

Usage
The listFolderObjects call returns information about objects contained in a specified Interact folder. In contrast to
the listFolderContents call, this call provides type information about each object in a folder.

Request Arguments
Name
folderName
type

Type

Description

String
Name of folder. Note that folder names are case sensitive.
FilterObjectType Content type restriction:
ALL_TYPES , CAMPAIGN , FORM , DOCUMENT , DATA ,
SEGMENT , DYNAMIC_CONTENT , ATTACHMENT ,
RULES , REPORT

Response
Name
result

Interact API Guide

Type

Description

FolderObject[] Array of objects containing properties for the name and type of every
object in the folder.

Page 43 of 107

Responsys Confidential

ListFolderObjects

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<tns:SessionHeader
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:sessionId>-5d14b63f:11f213c33b2:-7fdf</tns:sessionId>
</tns:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<tns:listFolderObjects
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<tns:folderName>Reporting Examples</tns:folderName>
<tns:type>ALL_TYPES</tns:type>
</tns:listFolderObjects>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 44 of 107

Responsys Confidential

ListFolderObjects

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<listFolderObjectsResponse xmlns="urn:ws57.responsys">
<result>
<name>Summer Styles-Dynamic</name>
<type>PROMOTIONAL_CAMPAIGN</type>
</result>
<result>
<name>Summer Styles-Generic Content</name>
<type>PROMOTIONAL_CAMPAIGN</type>
</result>
<result>
<name>Summer Styles-Untargeted</name>
<type>PROMOTIONAL_CAMPAIGN</type>
</result>
<result>
<name>testtrigger</name>
<type>TRANSACTIONAL_REAL_TIME_CAMPAIGN</type>
</result>
<result>
<name>Summer Styles-Dynamic_Message.htm</name>
<type>HTML_DOCUMENT</type>
</result>
<result>
<name>Summer Styles-Generic Content_Message.htm</name>
<type>HTML_DOCUMENT</type>
</result>
<result>
<name>Summer Styles-Untargeted_Message.htm</name>
<type>HTML_DOCUMENT</type>
</result>
<result>
<name>Summer Styles-Dynamic_LinkTable</name>
<type>DATA_TABLE</type>
</result>
<result>
<name>Summer Styles-Generic Content_LinkTable</name>
<type>DATA_TABLE</type>
</result>
<result>
<name>Summer Styles-Untargeted_LinkTable</name>
<type>DATA_TABLE</type>
</result>
<result>
<name>Gender-Purchase_Segmentation</name>
<type>SEGMENT_GROUP</type>
</result>
</listFolderObjectsResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 45 of 107

Responsys Confidential

ImportFolder

ImportFolder
Syntax
FolderImport = service.importFolder(string zipFileName, base64Binary zipBinaryData)

Usage
The importFolder call imports a previously exported Interact Campaign folder archive file into an account. The
importFolder call is an asynchronous call that initiates a folder import. Depending on the size of the folder being
imported, the call may not be finished for the response to the initial request. If this is the case, the status of the
folder import can be checked by using the checkReult call and the key that is returned with the importFolder call.

Request Arguments
Name
zipFileName
zipBinaryData

Type

Description

string
Path and name of folder archive file to be imported.
base64Binary Binary representation of folder archive file to be imported.

Response
This call returns a FolderImport object, which has the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message
folderName

boolean
boolean
string
string

Interact API Guide

Description
Key that allows a client application to check the status of an import
operation by using the checkResult Interact API call.
Flag indicating whether the import operation was completed successfully
or not. This flag should only be checked once the Finished flag is true.
Flag indicating whether the import operation was cancelled.
Flag indicating whether the import operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Name of the folder created in the Interact account.

Page 46 of 107

Responsys Confidential

ImportFolder

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<impl:importFolder
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:impl="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<impl:zipFileName>ExampleFolderExport.zip</impl:zipFileName>
<impl:zipBinaryData>UEsDBBQAC... (truncated)</impl:zipBinaryData>
</impl:importFolder>
</soapenv:Body>
</soapenv:Envelope>
Note that the zipBinaryData input has been truncated for presentation purposes.

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<importFolderResponse>
<result>
<complete>true</complete>
<cancelled>false</cancelled>
<finished>true</finished>
<key>irkey1128</key>
<folderName>Example Folder Import</folderName>
</result>
</importFolderResponse>
</soapenv:Body>
</soapenv:Envelope>

Interact API Guide

Page 47 of 107

Responsys Confidential

ExportFolder

ExportFolder
Syntax
base64Binary = service.exportFolder(string folderName, string zipFileName)

Usage
The exportFolder call returns the contents of a file in an archive file format.

Request Arguments
Name
folderName
zipFileName

Type
string
string

Description
Name of Interact Campaign folder to export.
Path and name for the folder archive file being exported.

Response
Name
result

Interact API Guide

Type

Description

base64Binary Folder archive file

Page 48 of 107

Responsys Confidential

ExportFolder

Example SOAP Request


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<impl:exportFolder
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:impl="urn:ws57.responsys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<impl:folderName>Triggered Message Tests</impl:folderName>
<impl:zipFileName>C:\ExampleFolderExport.zip</impl:zipFileName>
</impl:exportFolder>
</soapenv:Body>
</soapenv:Envelope>

Example SOAP Response


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<exportFolderResponse>
<result>UEsDBBQ... </result>
</exportFolderResponse>
</soapenv:Body>
</soapenv:Envelope>
Note that the exportFolderReturn has been truncated for presentation purposes.

Interact API Guide

Page 49 of 107

Responsys Confidential

CreateDataSource

Data Management API Calls


CreateDataSource
Syntax
RecordCount = service.createDataSource(DataSourceProperties properties)

Usage
The createDataSource call is used to create a table in an Interact Campaign account by uploading data from a local
delimited text file. The createDataSource call is an asynchronous call that initiates the table creation and is likely
to not be finished for the response to the initial create request. As a result, the status of the operation can be
checked by using the checkReult call and the key that is returned with the response to the create request. Checking
for completion of the operation should be done on the order of every 5-10 minutes. For best peformance, it is
highly recommended that data files be compressed (Zip compression) prior to upload with this API call.
Incoming timestamp data should be in the format of YYYY/MM/DD HH24:MI:SS or YYYY-MM-DD
HH24:MI:SS where the time portion is optional.

Request Arguments
The input to this call is a DataSourceProperties object, which has the following properties:
Name
delimitedBy

Type

Description

Type of field delimiter: TAB, COMMA, SEMICOLON, SPACE, or


OTHER. If you specify OTHER, be sure to set a value for
delimiterString.
delimiterString
string
Optional value for a custom field delimiter.
enclosedBy
string
Type of enclosing character for a field in a file row: SINGLE_QUOTE,
DOUBLE_QUOTE, or null for no enclosing character.
htmlData
HtmlData
Defines which field contains Email format preferences:
The HtmlData object contains the following three string properties:
htmlFieldName, htmlValue , and textValue.
dataExtractionKey string
Defines data extraction key for the new table. A composite data
extraction key should be delimited with semicolons: key1;key2.
emailAddressField string
Defines which column contains the email address in table to be created.
charEncoding
CharacterEncoding Describes the character encoding of the file data to be uploaded.
fields
Field[]
Defines the fields of the file to be uploaded.
csvFileName
string
Name of the local delimited text file to be uploaded.
folderName
string
Name of the folder where the new table should be created.
tableName
string
Name of the table to be created.
csvFileData
base64Binary
Binary representation of data to be loaded into the new table from a
local delimited text file.
Interact API Guide

string

Page 50 of 107

Responsys Confidential

CreateDataSource

Response
This call returns a RecordCount object, which has the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of a create table
operation by using the checkResult Interact API call.
Flag indicating whether the create table operation was completed
successfully or not. This flag should only be checked once the Finished
flag is true.
Flag indicating whether the create table operation was cancelled.
Flag indicating whether the create table operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the table creation is completed successfully, a valid count will be
available.

Page 51 of 107

Responsys Confidential

UpdateDataSource

UpdateDataSource
Syntax
RecordCount = service.updateDataSource(DataSourceProperties properties, FieldMap[] mapping, string
matchColumnName)

Usage
The updateDataSource call is used to merge data (insert/update records) in an existing table by uploading data
from a local delimited text file. This is an asynchronous API call that initiates the table update and is likely to not
be finished for the response to the initial update request. As a result, the status of the operation can be checked by
using the checkReult call and the key that is returned with the response to the update request. Checking for
completion of the operation should be done on the order of every 5-10 minutes. For best peformance, it is highly
recommended that data files be compressed (Zip compression) prior to upload with this API call. Incoming
timestamp data should be in the format of YYYY/MM/DD HH24:MI:SS or YYYY-MM-DD HH24:MI:SS where
the time portion is optional.

Request Arguments
Name
properties
mapping

matchColumnName

Type

Description

DataSourceProperties Properties of the data being uploaded for the update operation.
FieldMap[]
FieldMap array which defines for each incoming file field, a
mapping of the incoming file field name, the destination table
column name, and a flag that dictates whether the operation
should overwrite existing data with null values in the incoming
data.
string
Name of the column in the existing table that should control
whether records should be inserted or updated based on whether
there is a match in the incoming data.

Response
This call returns a RecordCount object, which has the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the operation is completed successfully, a valid count will be
available.

Page 52 of 107

Responsys Confidential

UpdateDataSourceUsingMultipleColumns

UpdateDataSourceUsingMultipleColumns
Syntax
RecordCount = service.updateDataSourceUsingMultipleColumns(DataSourceProperties properties, FieldMap[]
mapping, string[] matchColumnNames)

Usage
The updateDataSourceUsingMultipleColumns call is used to merge data (insert/update records) in an existing
table by uploading data from a local delimited text file and matching existing records based on a multi-column
(that is a composite) match. This call is identical to the updateDataSource call except that it is intended for
situations where more than one column is involved in the merging operation. This is an asynchronous call that
initiates the table update and is unlikely to complete immediately. As a result, the status of the update operation
can be checked by using the checkReult call and the key that is returned with the response to the update request.
Checking for completion of the operation should be done on the order of every 5-10 minutes. For best
peformance, it is highly recommended that data files be compressed (Zip compression) prior to upload with
this API call. Incoming timestamp data should be in the format of YYYY/MM/DD HH24:MI:SS or YYYY-MMDD HH24:MI:SS where the time portion is optional.

Request Arguments
Name
properties
mapping

matchColumnNames

Type

Description

DataSourceProperties Properties of data being uploaded for update operation.


FieldMap[]
FieldMap array which defines for each incoming file field, a
mapping of the incoming file field name, the destination table
column name, and a flag that dictates whether operation should
overwrite existing data with null values in incoming data.
string[]
Names of the columns in the existing table that should control
whether records should be inserted or updated based on whether
there is a match in the incoming data for these fields. Note: No
more than three fields can be used for a multi-column merge
operation.

Response
This call returns a RecordCount object, which has the following properties.
Name

Type

key
complete

string
boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
Key that allows a client application to check status of the operation..
Flag indicating whether operation was completed successfully or not. This
flag should only be checked once the Finished flag is true.
Flag indicating whether operation was cancelled.
Flag indicating whether operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 53 of 107

Responsys Confidential

AppendDataSource

count

int

Once operation is completed successfully, a valid count will be available.

AppendDataSource
Syntax
RecordCount = service.appendDataSource(DataSourceProperties properties, FieldMap[] mapping)

Usage
The appendDataSource call is used to append data (insert records) onto an existing table by uploading data from a
local delimited text file. This is an asynchronous API call that initiates the table append and is unlikely to complete
immediately. As a result, the status of the operation can be checked by using the checkReult call and the key that is
returned with the response to the append request. Checking for completion of the operation should be done on the
order of every 5-10 minutes. For best peformance, it is highly recommended that data files be compressed
(Zip compression) prior to upload with this API call. Incoming timestamp data should be in the format of
YYYY/MM/DD HH24:MI:SS or YYYY-MM-DD HH24:MI:SS where the time portion is optional.

Request Arguments
Name
properties
mapping

Type

Description

DataSourceProperties Properties of the data being uploaded for the append operation.
FieldMap[]
FieldMap array which defines for each incoming file field, a
mapping of the incoming file field name, the destination table
column name, and a flag that dictates whether the operation
should overwrite existing data with null values in the incoming
data.

Response
This call returns a RecordCount object, which has the following properties.
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the operation is completed successfully, a valid count will be
available.

Page 54 of 107

Responsys Confidential

CopyDataSource

CopyDataSource
Syntax
IntermediateResult = service.copyDataSource(string srcFolderName, string srcDataSourceName, string
dstFoldername, string dstDataSourcename, boolean recordCopy, boolean overwrite)

Usage
The copyDataSource call is used to copy existing data sources for reuse. The new data source can be created with
copies of the existing data source records or it can be created empty. This call initiates an asynchronous copy
operation that returns an IntermediateResult object that can be used with the checkResult call to determine when
the copy is complete.

Request Arguments
Name

Type

srcFolderName
srcDataSourceName
dstFolderName
dstDataSourceName
recordCopy

string
string
string
string
boolean

overwrite

boolean

Description
Name of folder containing the data source to copy.
Name of data source to be copied.
Name of folder in which to place the new copy.
Name of new data source.
Flag that dictates whether the records should be copied or whether the data
source should be created empty.
Flag that dictates whether an existing table by the same name, if present,
should be overwritten.

Response
The response is an IntermediateResult that contains the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
Key that allows a client application to check the status of the operation by
using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 55 of 107

Responsys Confidential

CopyDataSourceToTable

CopyDataSourceToTable
Syntax
IntermediateResult = service.copyDataSourceToTable(string srcFolderName, string srcDataSourceName, string
dstFoldername, string dstDataSourcename, boolean recordCopy, boolean overwrite)

Usage
The copyDataSourceToTable call is used to copy existing data source views to static data tables. The new data
source can be created with copies of the existing view records or it can be created empty. This call initiates an
asynchronous copy operation that returns an IntermediateResult object that can be used with the checkResult call
to determine when the copy operation is complete.

Request Arguments
Name

Type

srcFolderName
srcDataSourceName
dstFolderName
dstDataSourceName
recordCopy

string
string
string
string
boolean

overwrite

boolean

Description
Name of folder containing the data source to copy.
Name of a SQL, Filter, or Join data to be copied into a new table
Name of folder in which to place the new copy.
Name of the new tabular data source.
Flag that dictates whether the records should be copied or whether the data
source should be created empty.
Flag that dictates whether an existing table by the same name, if present,
should be overwritten.

Response
The response is an IntermediateResult that contains the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
Key that allows a client application to check the status of the operation by
using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 56 of 107

Responsys Confidential

CreateSQLDataSource

CreateSQLDataSource
Syntax
boolean createSQLDataSourceReturn = service.createSQLView(string folderName, string sqlDataSourceName,
string[] baseFolders, string[] baseDataSources, string sqlQuery, string emailAddressField, string
dataExtractionKey, boolean overwrite)

Usage
The createSQLDataSource call is used to create SQL Views on certain base tables in an Interact account. When
joining tables, it is quite important to create indexes on base table columns (via the user interface) that are used in
the SQL so that these SQL queries perform optimally. For more information, contact the Responsys Support team.

Request Arguments
Name
folderName
sqlDataSourceName
baseFolders
baseDataSources
sqlQuery
emailAddressField
dataExtactionKey
overwrite

Type
string
string
string[]
string[]
string
string
string
boolean

Description
Name of folder for the new SQL data source.
Name of new SQL data source.
Array of folder names.
Array of data source names for use in the SQL.
The SQL to be used for the data source view
Name of field that will contain the email address
Name of field that should be the data extraction key.
Flag that dictates whether an existing table by the same name, if
present, should be overwritten.

Response
Name

Type

createSQLDataSourceReturn boolean

Interact API Guide

Description
Flag that indicates the success of the request.

Page 57 of 107

Responsys Confidential

DeleteDataSource

DeleteDataSource
Syntax
boolean = service.deleteDataSource(string folderName, string dataSourceName)

Usage
The deleteDataSource call is used to remove data sources from an Interact account.

Request Arguments
Name
folderName
dataSourceName

Type
string
string

Description
Folder of data source.
Name of data source to delete.

Response
Name
deleteDataSourceReturn

Interact API Guide

Type

Description

boolean Flag indicating success of deletion request.

Page 58 of 107

Responsys Confidential

TruncateTable

TruncateTable
Syntax
boolean = service.truncateTable(sting folderName, string tableName)

Usage
The truncateTable call is used to remove all the records from a table.

Request Arguments
Name
folderName
tableName

Type
string
string

Description
Name of folder containing table to truncate.
Name of table to truncate..

Response
Name
result

Interact API Guide

Type
boolean

Description
Success flag for creation of folder.

Page 59 of 107

Responsys Confidential

DownloadDataSourceByTimestamp

DownloadDataSourceByTimestamp
Syntax
base64Binary = service.downloadDataSourceByTimestamp()

Usage
The downloadDataSourceByTimestamp call allows for the download or archive of some or all of the data in a data
source. It is ideal for purge and archive applications. It allows for filtering based on equality and timestamp
comparisons and can generate a compressed or uncompressed output file.

Request Arguments
Name

Type

Description

folderName
dataSourceName
timestampFieldName

string
string
string

timestampFieldAfterValue

datetime

timestampFieldBeforeValue

datetime

equalsFieldName

string

equalsFieldValue
delimitedBy

string
string

enclosedBy

string

characterEncoding
compressFile

CharacterEncoding
boolean

downloadFileName

string

Interact API Guide

Folder of data source


Name of data source
Optional name for filtering the downloaded data by
timestamp field that is present in the data source
Timestamp value for including only data records with a
timestamp value ocurring after this input timestamp.
Timestamp value for including only data records with a
timestamp value ocurring before this input timestamp.
Use both input arguments to restrict the downloaded data
to a window of time.
Optional name for filtering the data to be downloaded by
an equality comparison for a field that is present in the
data source (ie OPTIN = 'N')
Value of the field to filter for.
Field delimiter character to use for generation of the
download file
Field enclosing character to use for the generation of the
download file
Character set encoding for downloaded file.
Option to generate file in .zip compressed format.
Highly recommended for large data downloads.
Name of the file to download

Page 60 of 107

Responsys Confidential

DownloadDataSource

Response
Name

Type

downloadDataSourceByTimestampResponse base64Binary

Description
Binary representation of data downloaded
from the designated data source.

DownloadDataSource
Syntax
base64Binary = service.downloadDataSource(string delimiter, CharacterEncoding charset, string folderName,
string dataSourceName, string downloadFileName)

Usage
The downloadDataSource call is used to download all data records from a data source in an Interact account into
an uncompressed delimited text file. A more flexible download API call, downloadDataSourceByTimestamp, was
introduced in Interact 5.13 and should be considered for cases where the data needs to be filtered or the file output
needs to be compressed.

Request Arguments
Name

Type

Description

delimiter

string

charset
folderName
dataSourceName
downloadFileName

CharacterEncoding
string
string
string

Character used to delimit individual fields in the


downloaded records.
Type of field delimiter: TAB, COMMA, SEMICOLON,
SPACE.
Character set encoding for downloaded file.
Folder of data source to be downloaded.
Name of data source to be downloaded
Path and name of file to be downloaded.

Response
Name

Type

downloadDataSourceResponse base64Binary

Interact API Guide

Description
Binary representation of data downloaded from the
designated data source.

Page 61 of 107

Responsys Confidential

PurgeDataSourceByTimestamp

PurgeDataSourceByTimestamp
Syntax
RecordCount = service.purgeDataSourceByTimestamp()

Usage
The purgeDataSourceByTimestamp call allows for deleting a portion of the records in a data source. It is ideal for
purge and archive applications when used in combination with downloadDataSourceByTimestamp. It should be
used to maintain the size of campaign log tables so that they do not grow unnecessarily large.

Request Arguments
Name

Type

folderName
dataSourceName
timestampFieldName

string
string
string

timestampFieldAfterValue

datetime

timestampFieldBeforeValue

datetime

equalsFieldName

string

equalsFieldValue

string

Description
Folder of data source
Name of data source
Optional name for purging the data by a timestamp field that is
present in the data source
Timestamp value for purging only data records with a timestamp
value ocurring after this input timestamp.
Timestamp value for purging only data records with a timestamp
value ocurring before this input timestamp.
Optional name for purging the data by an equality comparison for
a field that is present in the data source (ie OPTIN = 'N')
Value of the field that when matched should be purged.

Response
This call returns a RecordCount object, which has the following properties.
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the operation is completed successfully, a valid count will be
available.

Page 62 of 107

Responsys Confidential

PurgeDataSource

PurgeDataSource
Syntax
RecordCount = service.purgeDataSource(PurgeDataSourceProperties properties, FieldMap[] matchColumnMap)

Usage
The purgeDataSource call is used to purge data records from an existing table. The records to be deleted are
specified by uploading a local delimited text file and specifying a mapping for matching up to three incoming
fields with existing columns. Those records in the target data source that have a match to a record in the file are
purged as part of this operation. This is an asynchronous API call that initiates the table purge and is unlikely to
complete immediately. As a result, the status of the operation can be checked by using the checkReult call and the
key that is returned with the response to the purge request. Checking for completion of the operation should be
done on the order of every 5-10 minutes. For best peformance, it is highly recommended that data files be
compressed (Zip compression) prior to upload with this API call.
Note that the assumption with this call is that you already know exactly which records you'd like to purge. For a
more flexible purge API, see PurgeDataSourceByTimestamp.

Request Arguments
Name
properties
mapping

Type

Description

PugeDataSourceProperties Properties of the data being uploaded for the purge operation.
FieldMap[]
FieldMap array which defines for each incoming file field, a
mapping of the incoming file field name, the destination table
column name for the fields involved in matching existing
records to be deleted.

Response
This call returns a RecordCount object, which has the following properties.
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the operation is completed successfully, a valid count will be
available.

Page 63 of 107

Responsys Confidential

ScrubDataSource

ScrubDataSource
Syntax
IntermediateResult = service.scrubDataSource(ScrubProperties scrubProperties)

Usage
The scrubDataSource call is used to scrub an existing table based on a number of configurable scrub rules. This
call initiates an asynchronous scrub operation that returns an IntermediateResult that can be used with the
checkResult call to determine when the scrub is complete.

Request Arguments
The request is a ScrubProperties object that contains the following properties.
Name

Type

repairEmails

boolean

removeInvalidEmails
removeDuplicateEmails
removeObscenities

boolean
boolean
boolean

folderName
dataSourceName
cleanDataSrcName
dirtyDataSrcName
suppressionDataSource

string
string
string
string
InteractObject

Description
Flag that dictates whether common email data errors should be
repaired.
Flag that dictates whether invalid emails should be removed.
Flag that dictates whether duplicate emails should be removed.
Flag that dictates whether records with obscenities should be
removed.
Name of folder containing table to be scrubbed.
Name of data source to scrub.
Name of data source that will receive the cleansed data records.
Name of data source that will receive the removed data records.
Object containing the folder and name of a list of email records that
should be removed from the table being scrubbed.

Response
The response is an IntermediateResult that contains the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
A key that allows a client application to check the status of the
operation by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully
or not. This flag should only be checked once the Finished flag is
true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 64 of 107

Responsys Confidential

CheckResult

CheckResult
Syntax
IntermediateResult = service.checkResult(string intermediateResultKey)

Usage
The checkResult call is used to track the progress of a previously submitted asynchronous Interact API call.

Request Arguments
Name

Type

intermediateResultKey string

Description
The key string which is returned from an asynchronous Interact API call
such as createDataSource, updateDataSource, etc.

Response
The response from this call is an IntermediateResult object which contains the following properties:
Name

Type

key
complete

string
boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
Key string used to check the asynchronous operation.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 65 of 107

Responsys Confidential

Cancel

Cancel
Syntax
IntermediateResult = service.cancel(string intermediateResultKey)

Usage
The cancel call is used to cancel a previously submitted asynchronous Interact API call.

Request Arguments
Name

Type

intermediateResultKey string

Description
The key string which is returned from an asynchronous Interact API call
such as createDataSource, updateDataSource, etc.

Response
The response from this call is an IntermediateResult object which contains the following properties:
Name

Type

key
complete

string
boolean

cancelled
finished
message

boolean
boolean
string

Interact API Guide

Description
The key string used to cancel the asynchronous operation.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

Page 66 of 107

Responsys Confidential

AddIndex

AddIndex
Syntax
boolean = service.addIndex(string folderName, string tableName, string[] fieldNames, string indexName,
boolean isUpperIndex)

Usage
The addIndex call is used to create an index on a table. Indexes are quite important for efficient query
performance. If you use SQL objects or campaign message content where table lookups are performed, then you
should consider using indexes for fields involved in table joins and table lookups.

Request Arguments
Name
folderName
tableName
fieldNames
indexName
isUpperIndex

Type
string
string
string[]
string
boolean

Description
Folder of table for which the index will be created.
Table on which the index will be created.
Fields for which the index will be created.
Name of index.
Flag indicating whether index should be created as an upper function
index.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the add index operation.

Page 67 of 107

Responsys Confidential

DeleteIndex

DeleteIndex
Syntax
boolean = service.deleteIndex(string folderName, string tableName, string indexName)

Usage
The deleteIndex call is used to delete an existing index.

Request Arguments
Name
folderName
tableName
indexName

Type
string
string
string

Description
Folder of table for which the index will be deleted.
Table for which the index will be deleted
Name of index to be deleted.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the deleted index call.

Page 68 of 107

Responsys Confidential

ListIndexes

ListIndexes
Syntax
String[] = service.listIndexes(string folderName, string tableName)

Usage
The listIndexes call is used to list the indexes available for a table in your account.

Request Arguments
Name
folderName
tableName

Type
string
string

Description
Folder of table for which indexes will be returned.
Table for which the indexes will be returned.

Response
Name
result

Interact API Guide

Type
Index

Description
Index object that defines the index name and type.

Page 69 of 107

Responsys Confidential

GetDataSourceSchema

GetDataSourceSchema
Syntax
string = service.getDataSourceSchema(string folderName, string dataSourceName)

Usage
The getDataSourceSchema method returns a string describing the schema for the specified data source (table,
filter, or SQL query).

Request Arguments
Name
folderName
dataSourceName

Type
string
string

Description
Folder of data source.
Name of data source.

Response
Name
result

Type
string

Description
Schema information consists of the email column name, data extraction
key (if any), and name and data type of each column in the data source, as
in this example.
[Email key: EMAIL]
[Primary key: EMAIL]
FIRSTNAME: str25
LASTNAME: str25
COMPANY: str50
CITY: str25
EMAIL: str50
TIMESTAMP_: timestamp
Note: Field data types reported in the string returned by
getDataSourceSchema() are the same as those used when you create or
update a data source.

Interact API Guide

Page 70 of 107

Responsys Confidential

GetDataSourceRecordCount

GetDataSourceRecordCount
Syntax
RecordCount = service.getDataSourceRecordCount(string folderName, string dataSourceName)

Usage
The getDataSourceRecordCount call is used to retrieve a count of the number of records in a data source. This call
initiates an asynchronous count operation that returns a RecordCount that can be used with the checkResult call to
determine when the count operation is complete and the record count is ready.

Request Arguments
Name
folderName
dataSourceName

Type
string
string

Description
Folder of data source.
Name of data source for which a record count should be generated.

Response
This call returns a RecordCount object, which has the following properties:
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the operation is completed successfully, a valid count will be
available.

Page 71 of 107

Responsys Confidential

UploadDocument

Content Management API Calls


UploadDocument
Syntax
boolean = service.uploadDocument(boolean binaryFile, string folderName, CharacterEncoding characterEncoding,
string[] fileNames, DocumentFile[] documents)

Usage
The uploadDocument call is used to create an HTML or text document in an Interact Campaign account.

Request Arguments
Name
binaryFile
folderName
filenNames

binaryData

Type

Description

boolean
string
string[]

Flag indicating if the document is a binary file for use as an attachment.


Folder in which to create the document.
Path and file name for document and optional image files to upload.
The name of the incoming document file will determine the name
applied to the newly uploaded document in the designated folder.
DocumentFile[] Array of base64Binary representations of the files to upload.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the upload request.

Page 72 of 107

Responsys Confidential

RemoveDocument

RemoveDocument
Syntax
boolean = service.removeDocument(string folderName, string documentName)

Usage
The removeDocument call is used to delete documents from an Interact account.

Request Arguments
Name
folderName
documentName

Type
string
string

Description
Name of folder containing document to delete.
Name of document to delete.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating success of document deletion request.

Page 73 of 107

Responsys Confidential

CopyDocument

CopyDocument
Syntax
boolean = service.copyDocument(string, srcFolderName, string srcDocumentName, string dstFolderName, string
dstDocumentName, boolean overwrite)

Usage
The copyDocument call is used to create a new document which is a copy of an existing document.

Request Arguments
Name
srcFolderName
srcDocumentName
dstFolderName
dstDocumentName
overwrite

Type
string
string
string
string
boolean

Description
Folder of document to copy.
Name of document to copy.
Folder for new document.
Name of new document.
Flag that indicates whether the operation should overwrite an existing
document.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating success of document copy request.

Page 74 of 107

Responsys Confidential

ShowDocument

ShowDocument
Syntax
string = service.showDocument(string folderName, string documentName)

Usage
The showDocument call is used to obtain the contents of an HTML or text document.
The contents of a document are useful for making edits followed by re-uploading into Interact. The content of a
document are not necessarily useful for rendering and viewing as a web page unless image source attributes are
adjusted to point at a public URL. For example, an image reference (for images hosted by the Responsys/Akamai
CDN) for a document retrieved with this API call will look like the following: <img
src="Newsletter.images/logo.gif">. Since this is not a public URL, it would need further processing to be usable as
a fully rendered web page.

Request Arguments
Name
folderName
documentName

Type
string
string

Description
Folder of document.
Name of document from which to obtain its contents.

Response
Name
result

Interact API Guide

Type
string

Description
String content of document.

Page 75 of 107

Responsys Confidential

CreateCampaign

Campaign Management API Calls


CreateCampaign
Syntax
boolean = service.createCampaign(string folderName, string campaignName, CampaignType campaignType)

Usage
Use the createCampaign call to create email campaigns. Once you have created a campaign, you will need to set
the campaigns properties with the setCampaignProperties call.

Request Arguments
Name
folderName
campaignName
campaignType

Type
string
string
CampaignType

Description
Folder in which to create the campaign.
Name of campaign to create.
Type of campaign: standard, form, or real-time.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the create campaign request.

Page 76 of 107

Responsys Confidential

CopyCampaign

CopyCampaign
Syntax
boolean = service.copyCampaign(string srcCampaignName, string destCampaignName)

Usage
Use the copyCampaign call to create a new email campaign based on the properties of an existing campaign.

Request Arguments
Name
srcCampaignName
destCampaignName

Type
string
string

Description
Name of campaign to copy.
Name of campaign to create as a copy.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the copy campaign request

Page 77 of 107

Responsys Confidential

DeleteCampaign

DeleteCampaign
Syntax
boolean = service.deleteCampaign(string campaignName)

Usage
Use the deleteCampaign call to delete a campaign in an Interact account.

Request Arguments
Name
campaignName

Type
string

Description
Name of campaign to delete.

Response
Name
result

Interact API Guide

Type
boolean

Description
Success flag for deletion of campaign.

Page 78 of 107

Responsys Confidential

GetCampaignProperties

GetCampaignProperties
Syntax
CampaignProperties = service.getCampaignProperties(string campaignName)

Usage
Use the getCampaignProperties call to retrieve the properties for a given campaign.

Request Arguments
Name
campaignName

Type
string

Description
Campaign Name.

Response
Name
result

Interact API Guide

Type

Description

CampaignProperties CampaignProperties object that defines the behavior of a


campaign.

Page 79 of 107

Responsys Confidential

SetCampaignProperties

SetCampaignProperties
Syntax
boolean = service.setCampaignProperties(string campaign, CampaignProperties campaignproperties)

Usage
Use the setCampaignProperties call to define the campaign behavior in terms of audience, message, tracking, and
optional settings.

Request Arguments
Name
campaignProperties

Type

Description

CampaignProperties CampaignProperties object that defines campaign behavior.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating success of set campaign properties request.

Page 80 of 107

Responsys Confidential

LaunchCampaign

LaunchCampaign
Syntax
long = service.launchCampaign(string campaignName, boolean testLaunch, string testEmailAddress, int
RecipientLimit, ScheduleFrequency scheduleFrequency, dateTime scheduleDate, string displayName, string
replyToAddress, string subject)

Usage
Use the launchCampaign to launch a campaign immediately or at a future date.

Request Arguments
Name
campaignName
testLaunch
testEmailAddress
recipientLimit
scheduleFrequency
scheduleDate

displayName
replyToAddress
subject

Type

Description

string
boolean

Campaign to launch.
Flag indicating whether the launch should be done in test
mode.
string
Target addresses for test launches.
int
Maximum number of recipients to which the campaign
should be launched.
ScheduleFrequency ONCE, DAILY, WEEKLY, MONTHLY, or null (for an
immediate launch).
dateTime
Typically has the format MM/dd/yyyy hh:mm aa. If you
specify a value that includes seconds (...hh:mm:ss...), youll
have to include them again in any subsequent call to
unScheduleCampaign to unschedule this launch. A null
value should be used for an immediate launch.
string
Optional override for the Friendly From portion of the
email from address header
string
Optional override for reply to address header
string
Optional override for the campaign subject line header

Response
Name
result

Interact API Guide

Type
long

Description
Launch identifier.

Page 81 of 107

Responsys Confidential

UnScheduleCampaign

UnScheduleCampaign
Syntax
boolean = service.unScheduleCampaign(string campaignName, dateTime scheduleDate)

Usage
Use the unScheduleCampaign call to remove a currently scheduled campaign launch from the campaign calendar.

Request Arguments
Name
campaignName
scheduleDate

Type
string
dateTime

Description
Name of campaign to unscheduled.
The instance of the scheduled launch to unschedule.

Response
Name
result

Type
boolean

Description
Flag indicating the success of the unschedule request

GetCampaignStatus
Syntax
string= service.getCampaignStatus(string campaignName)

Usage
Use the getCampaignStatus call to get the current operational status of a campaign.

Request Arguments
Name
campaignName

Type
string

Description
Name of campaign

Response
Name
result

Interact API Guide

Type
string

Description
One of the following status values is returned:
Terminated, Pending, Sending, Restarting, Listening
Page 82 of 107

Responsys Confidential

StopCampaign

StopCampaign
Syntax
boolean = service.stopCampaign(string campaignName)

Usage
Use the stopCampaign call to stop and close a currently launching campaign.

Request Arguments
Name
campaignName

Type
string

Description
Name of campaign to unscheduled.

Response
Name
result

Interact API Guide

Type
boolean

Description
Flag indicating the success of the stop request

Page 83 of 107

Responsys Confidential

TriggerFormRules

TriggerFormRules
Syntax
string= service.triggerFormRules(string formName, FormData[] formData)

Usage
Use the triggerFormRules call to insert or update data in a table and/or trigger a message from a campaign. The
rules for the specified form should dictate how the data is handled, and whether messages should be triggered.
These form rules are maintained via the Interact Campaign user interface.

Request Arguments
Name
formName
formData

Type
string
FormData

Description
Name of form.
Array of name value pairs for data that should be submitted with
the trigger request.

Response
Name
result

Interact API Guide

Type
Boolean

Description
Flag that indicates the successful receipt of the trigger request.

Page 84 of 107

Responsys Confidential

GetLiveReportMetrics

GetLiveReportMetrics
Syntax
LiveReportMetrics = service.getLiveReportMetrics (string campaignName, LiveReportPeriod liveReportPeriod)

Usage
Use getLiveReportMetrics to retrieve Live Report metrics for a campaign. These metrics can be used in any
number of ways to track a campaigns performance without having to log in and navigate in the Interact Campaign
user interface.

Request Arguments
Name
campaignName
liveReportPeriod

Type

Description

string
LiveReportPeriod

Name of campaign.
Flag that identifies whether Recent or Cumulative metrics
should be returned.

Response
Name
result

Interact API Guide

Type

Description

LiveReportMetrics

Individual metrics for the given campaign.

Page 85 of 107

Responsys Confidential

GetReportOptions

GetReportOptions
Syntax
ReportOptions = service. getReportOptions ()

Usage
Use getReportOptions to retrieve report option parameters that can be used in the following datamart reportoriented APIs.
1.
2.
3.
4.

GetCampaignsInDatamart()
GetLaunchesInDatamart()
RunLaunchReport()
RunTriggeredMessageReport

This call returns a ReportOptions object that can be inspected for a variety of report option parameters.

Request Arguments
None

Response
Name
result

Interact API Guide

Type
ReportOptions

Description
Object containing properties that define the available
options for running datamart reports.

Page 86 of 107

Responsys Confidential

GetCampaignsInDatamart

GetCampaignsInDatamart
Syntax
CampaignInfo[] = service.getCampaignsInDatamart(string campaignWildcard, CampaignLaunchType
campaignLaunchType, CampaignPurpose purpose, string[] strategyFilter, string[] programFilter, dateTime
launchStartDate, dateTime launchEndDate)

Usage
Use getCampaignsInDatamart to retrieve information about campaigns that are available for reporting in the
reporting datamart. This information can then be used to discover more information about the launches of these
campaigns, and then run reports on launches or triggered messages for these campaigns. The campaign
information returned from this call can be limited based on a number of filtering options as defined below.

Request Arguments
Name
campaignWildcard

campaignLaunchType

purpose
strategyFilter
programFilter
launchStartDate
launchEndDate

Interact API Guide

Type

Description

string

Optional filtering based on a name wildcard. Use the %


wildcard character. It can be placed in any position when
you search for multiple campaigns.
Examples:
"2010-Oct_%" returns all campaigns starting with 2010Oct_.
%New% returns any campaigns that contain New in
the middle of the name.
%New returns any campaigns that end with New.
A campaign name search is for an exact match unless
you use the % wildcard character. "2010-Oct_" returns
only the campaign named 2010-Oct_.
CampaignLaunchType Optional filtering based on the type of campiagn launch:
BATCH, TRIGGERED, FORM_TRIGGERED,
REAL_TIME_MESSAGE_TRIGGERED, ALL
CampaignPurpose
Optional filtering based on the campaign purpose:
PROMOTIONAL or TRANSACTIONAL
string[]
Optional filtering based on marketing strategy category
for a campaign
string[]
Optional filtering based on marketing program category
for a campaign
dateTime
Optional filtering based on launch time for a campaign
dateTime
Optional filtering based on launch time for a campaign

Page 87 of 107

Responsys Confidential

GetCampaignsInDatamart

Response
Name
campaignInfo

Interact API Guide

Type

Description

CampaignInfo[]

Information for one or more campaigns in the reporting


datamart

Page 88 of 107

Responsys Confidential

GetLaunchesInDatamart

GetLaunchesInDatamart
Syntax
LaunchInfo[] = service.getLaunchesInDatamart(string campaignWildcard, CampaignLaunchType
campaignLaunchType, CampaignPurpose purpose, string[] strategyFilter, string[] programFilter, dateTime
launchStartDate, dateTime launchEndDate))

Usage
Use getLaunchesInDatamart to retrieve information about campaign launches that are available for reporting in
the reporting datamart. This information can be used to run reports for these campaign launches. The campaign
launch information returned from this call can be limited based on a number of filtering options as defined below.

Request Arguments
Name
campaignWildcard

campaignLaunchType

purpose
strategyFilter
programFilter
launchStartDate
launchEndDate

Interact API Guide

Type

Description

string

Optional filtering based on a name wildcard. Use the %


wildcard character. It can be placed in any position when
you search for multiple campaigns.
Examples:
"2010-Oct_%" returns all campaigns starting with 2010Oct_.
%New% returns any campaigns that contain New in
the middle of the name.
%New returns any campaigns that end with New.
A campaign name search is for an exact match unless
you use the % wildcard character. "2010-Oct_" returns
only the campaign named 2010-Oct_.
CampaignLaunchType Optional filtering based on type of campiagn launch:
BATCH, TRIGGERED, FORM_TRIGGERED,
REAL_TIME_MESSAGE_TRIGGERED, ALL
CampaignPurpose
Optional filtering based on campaign purpose:
PROMOTIONAL or TRANSACTIONAL
string[]
Optional filtering based on marketing strategy category
for a campaign
string[]
Optional filtering based on marketing program category
for a campaign
dateTime
Optional filtering based on launch time for a campaign
dateTime
Optional filtering based on launch time for a campaign

Page 89 of 107

Responsys Confidential

GetLaunchesInDatamart

Response
Name
launchInfo

Interact API Guide

Type
LaunchInfo[]

Description
Information for one or more campaign launches in
reporting datamart

Page 90 of 107

Responsys Confidential

RunLaunchReport

RunLaunchReport
Syntax
ReportResult = service.runLaunchReport(Report report, ResponsePeriod responsePeriod, string[] launchKeys)

Usage
Use runLaunchReport to retrieve report metrics for one more campaign launches. This call is an asynchronous call
that initiates the report execution and may or may not be finished for the response to the initial run request. As a
result, the status of the operation can be checked by using the checkReult call and the key that is returned with the
response to the report run request. Checking for completion of the operation should be done on the order of every
1-2 minutes.

Request Arguments
Name

Type

Description

report
responsePeriod

Report
ResponsePeriod

launchKeys

string[]

Report to execute
Response period which defines the number of days from
launch for which to include campaign response events.
Values: 1_DAYS, 2_DAYS, 3_DAYS, 7_DAYS,
14_DAYS, 21_DAYS, ALL_DAYS
Launch keys from LaunchInfo objects that define which
campaign launches should be included in the report run.

Response
Name
result

Interact API Guide

Type
ReportResult

Description
Report results

Page 91 of 107

Responsys Confidential

RunTriggeredMessageReport

RunTriggeredMessageReport
Syntax
ReportResult = service.runTriggeredMessageReport()

Usage
Use runTriggeredMessageReport to retrieve report metrics for one or more campaigns involved in continuous
message triggering applications. This call is an asynchronous call that initiates the report execution and may or
may not be finished for the response to the initial run request. As a result, the status of the operation can be
checked by using the checkReult call and the key that is returned with the response to the report run request.
Checking for completion of the operation should be done on the order of every 1-2 minutes.

Request Arguments
Name

Type

campaignKeys

string[]

responseStartDate

dateTime

responseEndDate

dateTime

Description
Campaign keys from CampaignInfo objects that define
which campaign launches should be included in report run
Starting date for inclusion of campaign events in report
metrics
Ending date for inclusion of campaign events in report
metrics

Response
Name
result

Interact API Guide

Type
ReportResult

Description
Report results

Page 92 of 107

Responsys Confidential

boolean

Interact API Type Definitions

Primitive Type Definitions


The Inteact API uses the primitive data types defined below. These primitive data types are specified in the World
Wide Web Consortiums publication XML Schema Part 2: Data Types (available at the following URL:
http://www.w3.org/TR/xmlschema-2). Primitive types are used as a standardized way to define, send, receive, and
interpret basic data types in the SOAP messages exchanged between client applications and the Web Services API.

boolean
boolean fields have one of these values: true (or 1), or false (or 0).

string
Character string data types contain text data.

int and long


Fields of these types contain numbers with no fractional portion (digits to the right of a decimal place).

dateTime
Fields defined as dateTime data types handle date/time values (timestamps). Regular dateTime fields are full
timestamps with a precision of one second.

Interact API Guide

Page 93 of 107

Responsys Confidential

CampaignInfo

Interact API Type Definitions


CampaignInfo
Name

Type

campaignId

string

campaignName
campaignKey

string
string

Description
Campaign identifier for a campaign entry in the
reporting datamart
Name of campaign
Campaign reference key for a campaign entry
in the reporting datamart

CampaignLaunchType
Type

Values

string

BATCH, TRIGGERED, FORM_TRIGGERED, REAL_TIME_MESSAGE_TRIGGERED,


ALL

CampaignProperties
The CampaignProperties object specifies all the settings that determine a campaigns behavior and has the
following properties,
Name

Type

parentFolder
campaignName
interactCampaignID
externalCampaignID
marketingProgram
marketingStrategy
displayName
fromEmail
replyToEmail
subject
locale
utf8

string
string
string
string
string
string
string
string
string
string
RecipientLocale
boolean

openSense
conversionTrack
skipDuplicates

boolean
boolean
boolean

Interact API Guide

Description
Campaign folder location.
Name of campaign.
Internal Interact campaign identifier.
User-defined campaign identifier.
Marketing Program category.
Marketing Strategy category.
From Header Display Name.
From Header Address.
Reply-to Header Address.
Subject Line Header.
Recipient locale code.
Flag to convert email content to UTF8
encoding.
Flag to track email opens.
Flag to track conversions.
Flag to suppress duplicate emails for a launch.

Page 94 of 107

Responsys Confidential

CampaignProperties

distributionList
seedList
suppressDataSource
supplementalDataSource

InteractObect
InteractObect
InteractObect[]
InteractObect[]

document
campaignVariable

Document[]
CampaignVariable[]

clickThru
clickTrack
optOut
logTable
skipMultiPart

ClickThru
InteractObect
OptOut
LogTable[]
boolean

Interact API Guide

Page 95 of 107

Defines distribution list for campaign.


Defines seed list for campaign.
Defines suppression lists for campaign.
Defines supplemental data sources for
campaign.
Defines message documents for campaign.
Defines campaign variables and default values
for campaign.
Defines Link Table for campaign.
Defines Link Tracking table for campaign.
Defines opt-out link option for campaign.
Defines log tables for campaign.
Flag for whether a multipart message should be
sent if no email format preference is provided
for the recipient.

Responsys Confidential

CampaignPurpose

Name

Type

autoSense
autoSenseAol

boolean
boolean

htmlToAol
useAccountWide

boolean
boolean

attachment
responseDB

InteractObect []
InteractObect

followUp

InteractObect

acknowledgmentDocument

InteractObect

acknowledgementURL

string

Description
Flag to sense HTML capability.
Flag to sense HTML capability of AOL
domains.
Flag to send HTML format to AOL domains.
Flag to use an account wide HTML capability
sensing data source
Defines attachments for acampaign.
Defines table to hold Form Responses for a
Form.
Defines campaign to send messages to in
response to a form submit.
Defines document that should be rendered after
a form has been submitted.
For Forms, this is the URL that the visitor
should be redirected to after submitting the
form.

CampaignPurpose
Type

Values

string

PROMOTIONAL or TRANSACTIONAL

CampaignState
Type

Values

string

PENDING , LAUNCHING , LISTENING , CLOSED.

CampaignType
Type
string

Values
STANDARD , FORM , REALTIME.

CampaignVariable
Name
name
value

Interact API Guide

Type
string
string

Description
Name of campaign variable.
Value of campaign variable.

Page 96 of 107

Responsys Confidential

CharacterEncoding

CharacterEncoding
Type
string

Values
ISO_8859_1, ISO_8859_2, ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8 ,
ISO_8859_9 , SJIS , big5 , euc_kr , EUC_JP , gb2312 , koi8_r, windows_1251,
windows_1257, UTF_8.

ClickThru
Name
folderName
tableName
offerName
offerURL

Type
string
string
string
string

Description
Folder name.
Table name.
Name of field that contains Link Names.
Name of field that contains Link URLs.

ClickthroughCount
Name

Type

linkName
string
linkSentCount
int
linkClickedCount int

Description
Name of link.
Count of the number of times an email message was sent with this link.
Count of the number of times this link was clicked.

DataSourceProperties
Name
delimitedBy

Type

Description

Type of field delimiter: TAB, COMMA, SEMICOLON, SPACE, or


OTHER. If you specify OTHER, be sure to set a value for
delimiterString.
delimiterString
string
Optional value for a custom field delimiter.
enclosedBy
string
Type of enclosing character for a field in a file row: SINGLE_QUOTE,
DOUBLE_QUOTE, or null for no enclosing character.
htmlData
HtmlData
Defines which field contains Email format preferences:
HtmlData object contains the following three string properties:
htmlFieldName, htmlValue , and textValue.
dataExtractionKey string
Defines data extraction key for the new table. A composite data
extraction key should be delimited with semicolons: key1;key2.
emailAddressField string
Defines which column contains the email address in the table to be
created.
charEncoding
CharacterEncoding Describes the character encoding of the file data to be uploaded.

Interact API Guide

string

Page 97 of 107

Responsys Confidential

Document

fields

Field[]

csvFileName
folderName
tableName
csvFileData

string
string
string
base64Binary

Defines the fields of the file to be uploaded. Each field obect contains a
string property for the field name and a FieldType property(STR25 ,
STR50 , STR255 , STR1000 , MEMO , NUMBER , INTEGER ,
TIMESTAMP).
Name of the local delimited text file to be uploaded.
Name of the folder where the new table should be created.
Name of the table to be created.
Binary representation of data to be loaded into the new table from a
local delimited text file.

Document
Name
folderName
documentName
documentType

Type
string
string
DocumentType

Description
Name of folder.
Name of document.
Type of document.

DocumentFile
Name
binaryData

Type
base64Binary[]

Description
Binary representations of document and image files.

DocumentType
The DocumentType object is an enumerated type that contains one of the following values.
Type
string

Interact API Guide

Values
AOL, HTML, TEXT.

Page 98 of 107

Responsys Confidential

EmailFormat

EmailFormat
Type
string

Values
TEXT, HTML, AOL, MULTIPART

Field
Name
columnNameInTable
columnNameinFile

Type
string
string

Description
Name of column in table.
Name of field in file.

FieldMap
Name
columnNameInTable
columnNameinFile
overRideIfNull

Type
string
string
boolean

Description
Name of column in table.
Name of field in file
Flag that determines whether it is acceptable to override existing values
with null.

FilterObjectType
Type
string

Values
ALL_TYPES , CAMPAIGN , FORM , DOCUMENT , DATA , SEGMENT ,
DYNAMIC_CONTENT , ATTACHMENT , RULES , REPORT

FolderContentType
Type
string

Values
DATA , CAMPAIGN , DOCUMENT , REPORT , RULE , ALL_TYPES.

FolderImport
Name

Type

key

string

complete

boolean

Interact API Guide

Description
Key that allows a client application to check the status of an import
operation by using the checkResult Interact API call.
Flag indicating whether the import operation was completed successfully
or not. This flag should only be checked once the Finished flag is true.
Page 99 of 107

Responsys Confidential

FolderObject

cancelled
finished
message

boolean
boolean
string

Flag indicating whether the import operation was cancelled.


Flag indicating whether the import operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

FolderObject
Name

Type

name
type

string
InteractObjectType

Description
Name of object.
Object type.

FormData
Name

Type

name
value

Description

string
string

Name of form field.


Value of form field.

HtmlData
Name
htmlFieldName
htmlValue
textValue

Type
string
string
string

Description
Name of field which contains format preference data.
Value indicating HTML preference (example: H).
Value indicating Text format preference (example: T).

Index
Name

Type

indexName
isUpperIndex
fieldNames

Description

string
boolean
string

Name of index.
Flag indicating whether the index is an UPPER function-based index.
Names of field(s) that are indexed. For composite indexes, several
fieldNames elements will be returned in the response.

InteractObject
Name
folderName
objectName

Interact API Guide

Type
string
string

Description
Name of folder.
Name of object.

Page 100 of 107

Responsys Confidential

InteractObjectType

InteractObjectType
Type
string

Values
CAMPAIGN_ATTACHMENT , PROMOTIONAL_CAMPAIGN ,
TRANSACTIONAL_CAMPAIGN ,
PROMOTIONAL_REAL_TIME_CAMPAIGN ,
TRANSACTIONAL_REAL_TIME_CAMPAIGN , DATA_TABLE ,
DATA_TABLE_DIST_LIST , DATA_FILTER ,
DATA_FILTER_DIST_LIST , DATA_JOIN , DATA_JOIN_DIST_LIST ,
EXTERNAL_CONNECTOR , EXTERNAL_CONNECTOR_DIST_LIST ,
SQL_DATASOURCE , SQL_DATASOURCE_DIST_LIST ,
DYNAMIC_CONTENT_TEMPLATE , AOL_DOCUMENT ,
HTML_DOCUMENT , PLAIN_TEXT_DOCUMENT , FORM ,
FTAF_FORM , FORM_RULE , SEGMENT_GROUP , REPORT

IntermediateResult
Name

Type

key

string

complete

boolean

cancelled
finished
message

boolean
boolean
string

Description
A key that allows a client application to check the status of the operation
by using the checkResult Interact API call.
Flag indicating whether the operation was completed successfully or not.
This flag should only be checked once the Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.

LaunchInfo
Name
campaignInfo
launchKey
launchId
launchDate

Interact API Guide

Type

Description

CampaignInfo Campaign reference information for a campaign launch entry in the


reporting datamart
string
Launch reference key for a campaign launch entry in the reporting
datamart
string
Campaign launch identifier for a campaign launch entry in the reporting
datamart
dateTime
Date of launch for a campaign launch entry in the reporting datamart

Page 101 of 107

Responsys Confidential

LiveReportMetrics

LiveReportMetrics
Name

Type

launchStartTimestamp
lastSentTimestamp
lastResponseTimestamp
recentActivityTimestamp

Description

dateTime
dateTime
dateTime
dateTime

Timestamp when the launch started.


Timestamp of the last message sent.
Timestamp of the last response to the campaign.
Most recent timestamp of one of the following possible
activities.
Timestamp that Live Report was last cleared by the user.
Start time of most recent launch.
Last time an email was sent.
sentCount
int
Sent count.
ftafSentCount
int
Forward-to-a-friend sent count.
failedCount
int
Failed count.
skippedCount
int
Skipped count.
bouncedCount
int
Bounced count.
openedCount
int
Opened count.
respondedCount
int
Responded count.
unsubscribedCount
int
Unsubscribed count.
conversionsCount
int
Conversions count.
sendingThroughput
double
Rate at which the campaign was launced (emails per second).
dataExtractionThroughput double
Rate at which campaign list data was extracted from the
database (email records per second).
campaignState
CampaignState
PENDING , LAUNCHING , LISTENING , CLOSED.
clickthroughMetrics
ClickthroughCount[] Clickthrough metrics for each link in a campaign.

LiveReportPeriod
Type
string

Values
RECENT , CUMULATIVE.

Log Table
Name
folderName
logTableName
logTableType

Interact API Guide

Type
string
string
LogTableType

Description
Folder name.
Table name..
Type of log table

Page 102 of 107

Responsys Confidential

LogTableType

LogTableType
Type
string

Values
SENT , FAILED.

LoginResult
Property Name

Type

sessionId

string

Description
Used in subsequent Web Services calls.
This session ID should be placed in the
SOAP header to authenticate all subsequent
calls.

OptOut
Name

Type

mode
campaignName

OptOutMode
string

optOutURL

string

Description
Type of campaign optout link.
Form or campaign name for optout out should redirect to for TWO_STEP
OptOutMode.
URL that optout link should redirect to for USER_URL OptOutMode.

OptOutMode
Type
string

Interact API Guide

Values
NONE , ONE_STEP , TWO_STEP , USER_URL.

Page 103 of 107

Responsys Confidential

PurgeDataSourceProperties

PurgeDataSourceProperties
Name
delimitedBy

delimiterString
enclosedBy
charEncoding
fields

csvFileName
folderName
tableName
csvFileData

Type

Description

string

Type of field delimiter: TAB, COMMA, SEMICOLON, SPACE, or


OTHER. If you specify OTHER, be sure to set a value for
delimiterString.
string
Optional value for a custom field delimiter.
string
Type of enclosing character for a field in a file row: SINGLE_QUOTE,
DOUBLE_QUOTE, or null for no enclosing character.
CharacterEncoding Describes the character encoding of the file data to be uploaded.
Field[]
Defines the fields of the file to be uploaded. Each field obect contains a
string property for the field name and a FieldType property(STR25 ,
STR50 , STR255 , STR1000 , MEMO , NUMBER , INTEGER ,
TIMESTAMP).
string
Name of the local delimited text file.
string
Name of the folder of table to be purged.
string
Name of the table to be purged.
base64Binary
Binary representation of data from a local delimited text file that will
be used to determine which records to be purged from the target table.

RecipientLocale
The RecipientLocale object is an enumerated type that contains one of the following values:
hu Hungarian
sh *
ro Romanian
da Danish *
sk Slovak
de German *
sl Slovene
es Spanish *
sq Albanian
fr French *
el Greek *
it Italian *
ja Japanese * **
nl Dutch *
ko Korean * **
no Norwegian *
ru Russian *
pt Portuguese (Brazilian) *
ru__cp1251 Russian (windows-1251) *
sv Swedish *
zh Chinese Simplified * **
en_US_ASCII US English, 7-bit ASCII
zh_TW Chinese Traditional * **
fi Finnish
tr Turkish
et Estonian
lv Latvian (Lettish)
* Support for locale includes translated footers,
lt Lithuanian
response pages, and policy pages.
pl Polish *
cs Czech
** Locale uses double-byte charset.
hr Croatian

Interact API Guide

Page 104 of 107

Responsys Confidential

RecordCount

RecordCount
Name

Type

key

string

complete

boolean

cancelled
finished
message
count

boolean
boolean
string
int

Interact API Guide

Description
A key that allows a client application to check the status of a create table
operation by using the checkResult Interact API call.
Flag indicating whether the create table operation was completed
successfully or not. This flag should only be checked once the Finished
flag is true.
Flag indicating whether the create table operation was cancelled.
Flag indicating whether the create table operation is finished running.
Message that can be used to troubleshoot exceptions that may occur.
Once the table creation is completed successfully, a valid count will be
available.

Page 105 of 107

Responsys Confidential

Report

Report
Name

Type

reportGroup

string

reportName

string

Description
Report group. Reports are assigned to several groups of
reports based on the type analysis the report provides.
Name of report

ReportOptions
Name
launchReports

Type
Report[]

triggeredMessageReports Report[]
marketingStrategies
string[]

marketingPrograms

string[]

Description
Reports for batch launched campaigns that are available to the
user
Reports for triggered messages that are available to the user
Available marketing strategy category values for the account.
Campaigns can be filtered by their marketing strategy
categorization.
Available marketing program category values for the account.
Campaigns can be filtered by their marketing program
categorization.

ReportResult
Name

Type

complete

boolean

cancelled
finished
key

boolean
boolean
string

message

string

results

string

Interact API Guide

Description
Flag indicating whether the operation was completed
successfully or not. This flag should only be checked once the
Finished flag is true.
Flag indicating whether the operation was cancelled.
Flag indicating whether the operation is finished running.
A key that allows a client application to check the status of the
operation by using the checkResult Interact API call.
Message that can be used to troubleshoot exceptions that may
occur for failed report API calls.
Report metrics in XML format. This result string must be
parsed to retrieve individual report metrics.
Values: 1_DAYS, 2_DAYS, 3_DAYS, 7_DAYS,
14_DAYS, 21_DAYS, ALL_DAYS

Page 106 of 107

Responsys Confidential

ResponsePeriod

ResponsePeriod
Type
string

Values
1_DAYS, 2_DAYS, 3_DAYS, 7_DAYS, 14_DAYS, 21_DAYS, ALL_DAYS

ScrubProperties
Name
repairEmails

Type
boolean

removeInvalidEmails
boolean
removeDuplicateEmails boolean
removeObscenities
boolean
folderName
dataSourceName
cleanDataSrcName
dirtyDataSrcName
suppressionDataSource

string
string
string
string
InteractObject

Description
Flag that dictates whether common email data errors should be
repaired.
Flag that dictates whether invalid emails should be removed.
Flag that dictates whether duplicate emails should be removed.
Flag that dictates whether records with obscenities should be
removed.
Name of folder containing table to be scrubbed.
Name of data source to scrub
Name of data source that will receive the cleansed data records.
Name of data source that will receive the removed data records.
Object containing the folder and name of a list of email records
that should be removed from the table being scrubbed.

ScheduleFrequency
Type
string

Interact API Guide

Values
ONCE , DAILY , WEEKLY , MONTHLY.

Page 107 of 107

Responsys Confidential

You might also like