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
Show campaign
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_OBJEKT_STARTDATE</date_start>
<date_end>OPTIONAL_OBJEKT_ENDDATE</date_end>
<external_id>OPTIONAL_OBJEKT_EXT_ID</external_id>
<category_id>FOLDER_ID</category_id>
<description>OPTIONAL_OBJEKT_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
Show campaign
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 - DEPRECATED
Create configured campaign (This method is deprecated. Instead, the "create" method should be used to create a 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
Show campaign
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>
create
creates a campaign
EvalancheResourceInformation createConfigured (string name, int category_id)
Details
parameter
- string name: Name of the new campaign.
- int category_id: ID of the folder.
Return value
- EvalancheResourceInformation: Object analogous to getById method (retrieve information about an object using object Id)
Rights needed
Create campaign
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: create>
<name>NAME</name>
<category_id>ORDNER_ID</category_id>
</cam:create>
</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: createResponse>
<createResult>
<url>OBJEKT_URL</url>
<type_id>TYPE_ID</type_id>
<category_id>ORDNER_ID</category_id>
<customer_id>MANDANTEN_ID</customer_id>
<id>OBJEKT_ID</id>
<name>NAME</name>
</createResult>
</ns1: createResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope></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
Show campaign
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
Show campaign
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>
activate
Activate campaign
EvalancheResourceInformation activate (int workflow_id)
Details
Parameter
- int workflow_id: Id of the campaign to be activated
Return value
- bool: true if the activation has taken place successfully.
Required rights
Change campaign
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://core-staging.dev.broem/soap.php/soap/campaign">
<soapenv:Header/>
<soapenv:Body>
<cam:activate>
<workflow_id>WORKFLOW_ID</workflow_id>
</cam:activate>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://core-staging.dev.broem/soap.php/soap/campaign">
<SOAP-ENV:Body>
<ns1:activateResponse>
<activateResult>
<state_change_successful>true</state_change_successful>
<errors/>
</activateResult>
</ns1:activateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
deactivate
Deactivate campaign
EvalancheResourceInformation deactivate (int workflow_id)
Details
Parameter
- int workflow_id: Id of the campaign to be deactivated
Return value
- bool: true if the deactivation has taken place successfully.
Required rights
Change campaign
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://core-staging.dev.broem/soap.php/soap/campaign">
<soapenv:Header/>
<soapenv:Body>
<cam:deactivate>
<workflow_id>WORKFLOW_ID</workflow_id>
</cam:deactivate>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://core-staging.dev.broem/soap.php/soap/campaign">
<SOAP-ENV:Body>
<ns1:deactivateResponse>
<deactivateResult>
<state_change_successful>true</state_change_successful>
<errors/>
</deactivateResult>
</ns1:deactivateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
getConfiguration
Query configuration of a campaign
EvalancheResourceInformation getConfiguration (int workflow_id, str config_version)
Details
Parameter
- int workflow_id: Campaign Id
- str config_version: Id of the configuration version. The ID of the configuration version can be queried via getConfigurationVersions.
Return value
- str config_version: Id of the configuration version. The ID of the configuration version can be queried via getConfigurationVersions.
- str configuration: JSON string of the campaign configuration.
Required rights
Show campaign
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://core-staging.dev.broem/soap.php/soap/campaign">
<soapenv:Header/>
<soapenv:Body>
<cam:getConfiguration>
<workflow_id>WORKFLOW_ID</workflow_id>
<config_version>CONFIG_VERSION</config_version>
</cam:getConfiguration>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://core-staging.dev.broem/soap.php/soap/campaign">
<SOAP-ENV:Body>
<ns1:getConfigurationResponse>
<getConfigurationResult>
<config_version>CONFIG_VERSION</config_version>
<configuration>CONFIGURATION</configuration>
</getConfigurationResult>
</ns1:getConfigurationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
setConfiguration
Update campaigns configuration
EvalancheResourceInformation setConfiguration (int workflow_id, str config_version, str configuration)
Details
Parameter
- int workflow_id: Campaign Id
- str config_version: Id of the configuration version. The ID of the configuration version can be queried via getConfigurationVersions.
- str configuration: Campaign configuration in json format.
Return value
- str config_version: Id of the configuration version. The ID of the configuration version can be queried via getConfigurationVersions.
- str configuration: JSON string of the campaign configuration.
Required rights
Show campaign
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://core-staging.dev.broem/soap.php/soap/campaign">
<soapenv:Header/>
<soapenv:Body>
<cam:getConfiguration>
<workflow_id>WORKFLOW_ID</workflow_id>
<config_version>CONFIG_VERSION</config_version>
</cam:getConfiguration>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://core-staging.dev.broem/soap.php/soap/campaign">
<SOAP-ENV:Body>
<ns1:getConfigurationResponse>
<getConfigurationResult>
<config_version>CONFIG_VERSION</config_version>
<configuration>CONFIGURATION</configuration>
</getConfigurationResult>
</ns1:getConfigurationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope></SOAP-ENV:Envelope>
getConfigurationVersions
Query configuration versions of a campaign
EvalancheResourceInformation getConfigurationVersions (int workflow_id)
Details
Parameter
- int workflow_id: Campaign Id
Return value
- List of configurations with the following properties:
-
- str config_version: Id of the configuration version. The ID of the configuration version can be queried via getConfigurationVersions.
- int create_date: Timestamp of creation of this configuration version.
- bool latest: true if it is the latest configuration version.
Required rights
Show campaign
Use
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="https://core-staging.dev.broem/soap.php/soap/campaign">
<soapenv:Header/>
<soapenv:Body>
<cam:getConfigurationVersions>
<workflow_id>WORKFLOW_ID</workflow_id>
</cam:getConfigurationVersions>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://core-staging.dev.broem/soap.php/soap/campaign">
<SOAP-ENV:Body>
<ns1:getConfigurationVersionsResponse>
<getConfigurationVersionsResult>
<item>
<config_version>CONFIG_VERSION</config_version>
<create_date>CREATE_DATE</create_date>
<latest>LATEST</latest>
</item>
[...]
</getConfigurationVersionsResult>
</ns1:getConfigurationVersionsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>