The following SOAP methods are provided specifically for the evaluation and creation of campaigns.
getDetails
Read out campaign details
EvalancheResourceInformation getDetails ( int[] profile_id_list, int resource_id )
Details
Parameters
- int resource_id: ID of the campaign whose details are to be queried
Return value
- EvalancheCampaignInformation: Object (SOAP) or array with the following attributes:
- int id: ID of the queried campaign object
- string name: Name of the campaign object
- int date_start: Timestamp of the start date defined in the campaign object
- int date_end: Timestamp of the end date defined in the campaign object
- string external_id: External ID, which was defined in the campaign object
- int category_id: ID of the folder in which the campaign object is located
- string description: Description text, which was defined in the campaign object
- int state: Status of the campaign; 1=Activated; 2=Paused;
- int profile_count: Number of currently active profiles in the campaign
Required rights
Use
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://scnem.com/soap.php/soap/campaign"> <soapenv
:Header/> <soapenv
:Body> <cam:getDetails>
<resource_id>CAMPAIGN_ID</resource_id>
</cam:getDetails> </soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/campaign"> <SOAP-ENV
:Body> <ns1:
getDetailsResponse> <getDetailsResult>
<id>CAMPAIGN_ID</id>
<name>CAMPAIGN_NAME</name>
<date_start>
OPTIONAL_OBJECT_STARTDATE</date_start> <date_end>OPTIONAL_OBJECT_ENDDATE</date_end>
<external_id>OPTIONAL_OBJECT_EXT_ID
/external_id> <category_id>FOLDER_ID</category_id>
<description>OPTIONAL_OBJECT_DESCRIPTION</description>
<state>ACTIVE_STATE 0/1</state> <profile_count>PROFILE_COUNT</profile_count>
</getDetailsResult> </ns1
:
getDetailsResponse> </SOAP-ENV
:Body> </SOAP-ENV
:Envelope>
pushProfilesIntoCampaign
Moving profiles into a campaign
EvalancheResourceInformation pushProfilesIntoCampaign ( int[] profile_id_list, int resource_id )
Details
Parameters
- int[] profile_id_list: List of profile IDs to be moved into the campaign
- int resource_id: ID of the campaign to which the profiles should be moved
Return value
- EvalancheResourceInformation: True/False if the profiles were successfully moved into the campaign
Required rights
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://scnem.com/soap.php/soap/campaign"> <soapenv
:Header/> <soapenv:
Body> <cam:pushProfilesIntoCampaign>
<profile_id_list> <!
--Zero or more repetitions:--> <item>PROFILE_ID</item>
</profile_id_list>
<resource_id>CAMPAIGN_ID</resource_id>
</cam:pushProfilesIntoCampaign> </soapenv
:Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/campaign"> <SOAP-ENV
:Body> <ns1:
pushProfilesIntoCampaignResponse> <pushProfilesIntoCampaignResult>true/false</pushProfilesIntoCampaignResult>
</ns1:
pushProfilesIntoCampaignResponse> </SOAP-ENV
:Body> </SOAP-ENV
:Envelope>
createConfigured
Create configured campaign
This method is currently only used internally. Documentation of the JSON schema will be provided when a final version of the schema has been published.
EvalancheResourceInformation createConfigured ( string name, int schema_version, string configration, int category_id )
Details
Parameters
- string name: Name of the new campaign
- int schema_version: Version of the JSON schema (current: 7)
- string configuration: Campaign configuration in the JSON schema
- int category_id: ID of the folder
Return value
- EvalancheResourceInformation: Object analogous to the method getById (retrieve information about an object using object Id)
Required rights
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prof="https://scnem.com/soap.php/soap/profile"> <soapenv
:Header/> <soapenv:
Body> tbd </soapenv:Body>
</soapenv
:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/profile"> <SOAP-ENV
:Body> tbd </SOAP-ENV
:
Body> </SOAP-ENV:Envelope>
getByStartDateRange
Search campaign by start date
EvalancheResourceInformation getByStartDateRange ( int from, int to )
Details
Parameters
- int from: Timestamp of the start of the time interval
- int to: Timestamp of the end of the time interval
Return value
- EvalancheResourceInformation: Object analogous to the method getById (retrieve information about an object using object Id)
Required rights
Use
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://scnem.com/soap.php/soap/campaign"> <soapenv
:Header/> <soapenv
:Body> <cam:
getByStartDateRange> <from>TIMESTAMP_FROM</from>
<to>TIMESTAMP_TO</to>
</cam:getByStartDateRange>
</soapenv:Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/campaign"> <SOAP-ENV
:Body> <ns1:
getByStartDateRangeResponse> <getByStartDateRangeResult>
<item> <url>CAMPAIGN_URL</url>
<type_id>CAMPAIGN_TYPE_ID</type_id>
<category_id>
FOLDER_ID</category_id> <customer_id>MANDATOR_ID</customer_id>
<id>CAMPAIGN_ID</id>
<name>CAMPAIGN_NAME</name> </item>
[.
..]
</getByStartDateRangeResult> </ns1
:getByStartDateRangeResponse> </SOAP-ENV:
Body> </SOAP-ENV:Envelope>
getByEndDateRange
Search campaign by end date
EvalancheResourceInformation getByEndDateRange ( int from, int to )
Details
Parameters
- int from: Timestamp of the start of the time interval
- int to: Timestamp of the end of the time interval
Return value
- EvalancheResourceInformation: Object analogous to the method getById (retrieve information about an object using object Id)
Required rights
Use
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://scnem.com/soap.php/soap/campaign"> <soapenv
:Header/> <soapenv
:Body> <cam:
getByEndDateRange> <from>TIMESTAMP_FROM</from>
<to>TIMESTAMP_TO</to>
</cam:getByEndDateRange> </soapenv
:Body> </soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://scnem.com/soap.php/soap/campaign"> <SOAP-ENV
:Body> <ns1:
getByEndDateRangeResponse> <getByEndDateRangeResult>
<item> <url>CAMPAIGN_URL</url>
<type_id>CAMPAIGN_TYPE_ID</type_id>
<category_id>
FOLDER_ID</category_id> <customer_id>MANDATOR_ID</customer_id>
<id>CAMPAIGN_ID</id>
<name>CAMPAIGN_NAME</name> </item>
[.
..]
</getByEndDateRangeResult> </ns1
:getByEndDateRangeResponse> </SOAP-ENV:
Body> </SOAP-ENV:Envelope>