Description
Use the feature EditConversions to delete or modify conversions retroactively. When modifying/deleting conversions the relevant conversions in the period specified will be looked for and the corresponding action will be triggered. If the flag âuniqueMatchâ is set to true and multiple conversions are found no action will be triggered. If this flag is set to false or not set at all the field ânumAffectedâ contains the number of conversions modified. After successfully modifying a conversion the code â0â in the field âresultCodeâ confirms the success.
Available starting from Backclick-Version: 5.9.0
In order to modify a conversion you have to provide the following information:
- Mandator ID
- API-Key (optional authentication, if not provided the IP address will be used for authentication)
- Information about the conversions (you can modify or delete multiple conversions at once)
- E-Mail address of the subscriber the conversion is assigned to
- Tracking-ID that was assigned to the newsletter
- Currency stored in the conversion
- Amount of sales stored in the conversion
- New currency, can be left out, but then either the new sales have to be set or the conversion has to be deleted; optional
- New sales, can be left out, but then either the new currency has to be set or the conversion has to be deleted; optional
- Do you want to delete the conversion, can be left out, but then either the new currency or the new sales have to be set; optional
- Modify on unique match only (default: false); optional
- Approximate creation date of the conversion
- Divergence in minutes in order to create a period for searching for the conversion
As a result a structured object containing the parameters entered and additional information about changes (status code, number of conversions affected) will be returned.
The following error messages can occur in faulty requests:
- No valid conversion datasets given in request. All n datasets are invalid!
- Too many conversion datasets in request! Maximum datasets per requests: n
Example
$client = new SoapClient($wsdlUrl);
date_default_timezone_set('Europe/Berlin');
$editConversion = new StdClass();
$editConversion->mandatorId = 0;
$conversion = new StdClass();
$conversion->emailAddress = "[email protected]";
$conversion->trackingId = "Gux34SI6pm";
$conversion->currency = "EUR";
$conversion->amount = "1000";
$conversion->estimatedLogtime = mktime(9, 40, 0, 7, 4, 2013);
$conversion->maxMinutesDifference = 10;
$conversion->newAmount = 50.56;
$editConversion->conversions = array();
array_push($editConversion->conversions, $conversion);
try {
$result = $client->editConversions($editConversion);
var_dump($result);
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}object(stdClass)#4 (2) {
["summaryResult"]=>
bool(false)
["conversions"]=>
object(stdClass)#5 (1) {
["item"]=>
object(stdClass)#6 (12) {
["emailAddress"]=>
string(16) "[email protected]"
["trackingId"]=>
string(10) "Gux34SI6pm"
["currency"]=>
string(3) "EUR"
["amount"]=>
float(1000)
["newCurrency"]=>
string(3) "EUR"
["newAmount"]=>
float(50.56)
["deleteAction"]=>
bool(false)
["uniqueMatch"]=>
bool(false)
["estimatedLogtime"]=>
string(29) "2013-07-04T09:40:00.000+02:00"
["maxMinutesDifference"]=>
int(10)
["numAffected"]=>
int(0)
["resultCode"]=>
int(0)
}
}
}Source code
In order to test a working example you can download the source code.