This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Campaigns
Overview
The following operations allow you to work with Campaigns. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with Campaigns, see Sample configuration .
For more details click Campaigns.
Operation | Description |
---|---|
createACampaign | Creates a new campaign. |
updateACampaign | Updates an existing campaign. |
getAllCampaigns | Retrieves all campaigns. |
getACampaign | Retrieves the details of a campaign specified the campaign id. |
getRecentCampaigns | Retrieves subscribed email groups of a campaign specified by the campaign id. |
deleteACampaign | Deletes a campaign associated with the specified campaign id. |
Operation Details
This section provides further details on the operations related to Campaigns.
Create A Campaign
The createACampaign
operation creates a new campaign.
<eloquaStandardAPI.createACampaign> <startAt>1284079044</startAt> <endAt>1284079049</endAt> <budgetedCost>1.0</budgetedCost> <actualCost>1.1</actualCost> <budgetedCostactualCostname>new campaign</name> <isMemberAllowedReEntry>true</isMemberAllowedReEntry> <fieldValues>[{"id": "5","value": "new value 234"}]</fieldValues> <elements></elements> <isReadOnly>false</isReadOnly> <campaignType></campaignType> <isReadOnlycampaignTypeproduct></product> <region></region> <isReadOnlycampaignTypeproductregioncrmId></crmId> <isSyncedWithCRM>true</isSyncedWithCRM> <isIncludedInROI>true</isIncludedInROI> </eloquaStandardAPI.createACampaign>
properties
startAt         :
Date time value of the campaign start.endAt
                 :budgetedCost
          :actualCost
            :name                  :
Name of the campaign to create a campaign on this name.isMemberAllowedReEntry :
Boolean value, to set change permission to current user for this campaign.fieldValues
           :element
       :s
isReadOnly
     ÂcampaignType
product
region
crmId
isSyncedWithCRM
isIncludedInROI
Sample request
Following is a sample REST/JSON request that can be handled by the createACampaign
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "name":"new campaign", "startAt":1284079044, "endAt":1284079049, "budgetedCost":1.0, "actualCost":1.1, "isMemberAllowedReEntry":true, "fieldValues":[{"id": "5","value": "new value 234"}], "isReadOnly":false, "isSyncedWithCRM":true, "isIncludedInROI":true }
Update A Campaign
The updateACampaign
operation updates a campaign.
<eloquaStandardAPI.updateACampaign> <campaignId>1</campaignId> <startAt>1284079044</startAt> <endAt>1284079049</endAt> <budgetedCost>1.0</budgetedCost> <actualCost>1.1</actualCost> <budgetedCostactualCostname>new campaign</name> <isMemberAllowedReEntry>true</isMemberAllowedReEntry> <fieldValues>[{"id": "5","value": "new value 234"}]</fieldValues> <elements></elements> <isReadOnly>false</isReadOnly> <campaignType></campaignType> <isReadOnlycampaignTypeproduct></product> <region></region> <isReadOnlycampaignTypeproductregioncrmId></crmId> <isSyncedWithCRM>true</isSyncedWithCRM> <isIncludedInROI>true</isIncludedInROI> </eloquaStandardAPI.updateACampaign>
properties
campaignId       :
Unique identifier of the campaign.startAt         :
Date time value of the campaign start.endAt
                 :budgetedCost
          :actualCost
            :name                  :
Name of the campaign to create a campaign on this name.isMemberAllowedReEntry :
Boolean value, to set change permission to current user for this campaign.fieldValues
           :element
       :s
isReadOnly
     ÂcampaignType
product
region
crmId
isSyncedWithCRM
isIncludedInROI
Sample request
Following is a sample REST/JSON request that can be handled by the updateACampaign
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "campaignId":"1", "name":"new campaign", "startAt":1284079044, "endAt":1284079049, "budgetedCost":1.0, "actualCost":1.1, "isMemberAllowedReEntry":true, "fieldValues":[{"id": "5","value": "new value 234"}], "isReadOnly":false, "isSyncedWithCRM":true, "isIncludedInROI":true }
Get All Campaigns
The getAllCampaigns
operation retrieves all campaigns.
<eloquaStandardAPI.getAllCampaigns> <count>2</count> <depth>1</depth> <search></search> <page>1</page> <orderBy></orderBy> <lastUpdatedAt>1426066807</lastUpdatedAt> <extensions></extensions> </eloquaStandardAPI.getAllCampaigns>
properties
count     :
The number of results in a page to display. This must me in between 1 and 1000.depth
        :search
       :page
     :orderBy
   :lastUpdatedAt
:extensions   :
The extensions to filter. Must follow the pattern : ^[A-Za-z0-9]+$.
Sample Request
Following is a sample REST/JSON request that can be handled by getAllCampaigns
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "count":2, "page":1, "lastUpdatedAt":1426066807, "depth":"Complete" }
Get A Campaign
The getACampaign
operation retrieves the details of a campaign associated with the specified campaign id.
<eloquaStandardAPI.getACampaign> <campaignId>1</campaignId> <depth>Complete</depth> </eloquaStandardAPI.getACampaign>
properties
campaignId :
Unique identifier of the campaign.depth
     :
Sample request
Following is a sample REST/JSON request that can be handled by the getACampaign
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "campaignId":"1", "depth":"Complete" }
Delete A Campaign
The deleteACampaign
operation deletes the campaign associated with the specified campaign id.
<eloquaStandardAPI.deleteACampaign> <campaignId>1</campaignId> </eloquaStandardAPI.deleteACampaign>
properties
campaignId
 :
Sample request
Following is a sample REST/JSON request that can be handled by the deleteACampaign
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "campaignId":"1" }
Get Recent Campaigns
The getRecentCampaigns
operation updates an account.
<eloquaStandardAPI.getRecentCampaigns> <count>2</count> <depth>Complete</depth> <extensions></extensions> </eloquaStandardAPI.getRecentCampaigns>
properties
count    :
The number of results in a page to display. This must me in between 1 and 1000.depth
   :extensions :
The extensions to filter. Must follow the pattern : ^[A-Za-z0-9]+$.
Sample request
Following is a sample REST/JSON request that can be handled by the getRecentCampaigns
operation.
{ "username":"myusername", "password":"mypassword", "siteName":"mysiteName", "campaignId":"1", "count":2, "page":1, "lastUpdatedAt":1426066807 }
Sample Configuration
Following is a sample proxy service that illustrates how to connect to Eloqua Standard API with the init
operation to use the getAllCampaigns
operation. The sample request for this proxy can be found in getAllCampaigns
sample request . You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="eloqua_getAllCampaigns" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="siteName" expression="json-eval($.siteName)"/> <property name="username" expression="json-eval($.username)"/> <property name="password" expression="json-eval($.password)"/> <property name="count" expression="json-eval($.count)"/> <property name="depth" expression="json-eval($.depth)"/> <property name="search" expression="json-eval($.search)"/> <property name="page" expression="json-eval($.page)"/> <property name="orderBy" expression="json-eval($.orderBy)"/> <property name="lastUpdatedAt" expression="json-eval($.lastUpdatedAt)"/> <property name="extensions" expression="json-eval($.extensions)"/> <eloquaStandardAPI.init> <siteName>{$ctx:siteName}</siteName> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </eloquaStandardAPI.init> <eloquaStandardAPI.getAllCampaigns> <count>{$ctx:count}</count> <depth>{$ctx:depth}</depth> <search>{$ctx:search}</search> <page>{$ctx:page}</page> <orderBy>{$ctx:orderBy}</orderBy> <lastUpdatedAt>{$ctx:lastUpdatedAt}</lastUpdatedAt> <extensions>{$ctx:extensions}</extensions> </eloquaStandardAPI.getAllCampaigns> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy>