With the new Evalanche API for Campaign Designer you have the possibility to create, edit and statistically analyze complete campaigns. The campaign status can be queried in real time, as well as any history of profiles that have entered a campaign.
A new configuration format offers the possibility to map all settings and configurations offered by the visual Campaign Designer via API as well.
Campaign configuration
Evalanche provides new API methods of the following APIs specifically for Campaign Designer:
- Configuration of campaigns are offered in the standard API (SOAP)
- Statistics and profile history in the Reporting API
Campaign creation
To create campaigns via the standard API (SOAP), a create method is available. This creates a new unconfigured campaign with any name in any folder.
Creating campaigns via create - Standard API (SOAP)
Changing campaigns
The following methods allow to read and set the campaign configuration:
Reading the configuration via getConfiguration - Standard API (SOAP)
Setting the configuration via setConfiguration - Standard API (SOAP)
The actual configuration is accepted and output in JSON format.
The easiest way to create a campaign configuration in JSON format is to create a campaign, configure it and then read it out with the SOAP method "getConfiguration".
An example configuration may look like the following:
{"configuration-version":"3","nodes":[
{"id":"c2d90a7d-55b5-40b0-90d2-1db7cf0ba39a","type":"targetGroupStart","config":
{"targetGroupId":25328032,"startTime":null,"multipass":
{"enabled":true,"lockDuration":"P0DT0H"}
}
,"connections":
{"true":"99bb7c7a-b6ee-4a4f-a88b-d79d98a9660d"}
,"meta":
{"position":
{"x":142,"y":196}
}
}
,
{"id":"3073cdad-65dd-4e5e-8195-a9155f36f7dd","type":"endPoint","config":
{}
,"meta":
{"position":
{"x":656,"y":196}
}
}
,
{"id":"99bb7c7a-b6ee-4a4f-a88b-d79d98a9660d","type":"delayAction","config":
{"wait":
{"type":"duration","value":"P0DT1H"}
}
,"connections":
{"true":"3073cdad-65dd-4e5e-8195-a9155f36f7dd"}
,"meta":
{"position":
{"x":396,"y":196}
}
}
],"helpers":[]}
Versioning of configurations
Each change to the configuration of a campaign creates a new version, which can be queried using the following method:
Query the configuration version of a campaign via getConfigurationVersions - Standard API (SOAP).
Starting and pausing campaigns
The following methods can be used to pause and restart campaigns, provided the configuration is correct.
Starting campaigns via activate - Standard API (SOAP)
Stopping campaigns via deactivate - Standard API (SOAP)
Statistics and profile history
The Reporting API offers a separate table for the evaluation of campaign activities. With this you can query, evaluate and reconstruct the history of all profiles of a campaign.
Activities of profiles of a campaign campaign-profile-history
Example URL to query the profile history
The following information is required for the call:
customer_id = The ID of the client in which the campaign is located.
format = The format in which the data is to be output, e.g. "csv
from = Time from which data should be delivered e.g. "2021-01-01".
to = Time up to which data should be delivered e.g. "2021-01-01".
The table contains one entry per profile and activity. An activity always describes the movement of a profile within a campaign.
The table provides the following information:
Column |
Type |
Description |
id |
int |
Unique Id of the activity |
config_version |
string |
UUID of the configuration version at the time of the activity |
state_id |
string |
UUID of the affected campaign element (node) |
profile_id |
int |
ID of the affected profile |
timestamp |
string |
Time at which the profile left the node |
result |
int |
Status of the activity (1 = successful/positive, 0 = negative) |