Hi all,
I have something rare with some deliveries, for example this delivery :
The emails to send is 16, but processed number is 20 and succes is 19, which is completely wrong, after getting inside the delivery log i notice that the number of processed should be 16 and succes should be 15 :
But, after i do a recompute of the delivery, using the "recompute all from the elementary tracking logs":
the datas come back to normal.
my question here is if there is a way to update those datas, using a workflow that get executed automatically everyday for example?
Thanks,
Badr.
Solved! Go to Solution.
Hi,
You can write a workflow that collects recent delivery id's and runs them through js function nms.delivery.RecomputeStats(id, 15).
Note this is very expensive db-wise.
Thanks,
-Jon
Hi,
You can write a workflow that collects recent delivery id's and runs them through js function nms.delivery.RecomputeStats(id, 15).
Note this is very expensive db-wise.
Thanks,
-Jon
Hi Jon and thank you for your answer,
Yeah that code worked for me, i will explain how i did it in case if someone needs :
i did a query before, taking just the deliveries with processed percentage more than 100.
then a javascript code like this:
var schemaName = vars.targetSchema.substr(vars.targetSchema.indexOf(":") + 1);
var query = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@id"/>
</select>
</queryDef>
);
result = query.ExecuteQuery();
for each (var e in result) {
logInfo(e.@id);
nms.delivery.RecomputeStats(e.@id, 15)
}
Jon (or adobe campaign forum member) if you can explain me 2 things:
1- what the dirtyflags means, i didnt understand that well from the documentation :
dirtyFlags
Bit field describing what to recompute (see the 'nms:delivery:dirtyFlags' enumeration).
2- the number 15, why ?
Thanks,
Badr
Views
Replies
Total Likes
Hi,
It's documented in the nms:delivery:dirtyFlags enumeration, under the nms:delivery schema.
15 is just adding all the numbers up (set all flags/bits in the integer).
Thanks,
-Jon
Hello,
There's no need of hardcoding the value "15", you can use JS bitwise operators (Bitwise operators - JavaScript | MDN ) as follow:
var nmsDeliveryDirtyFlags_tracking = 1; // tracking logs
var nmsDeliveryDirtyFlags_messageCounters = 8; // broad logs
var flags = nmsDeliveryDirtyFlags_tracking | nmsDeliveryDirtyFlags_messageCounters; // bit operation
NLWS.nmsDelivery.RecomputeStats(vars.deliveryId, flags);
Kind regards
Florian
Views
Likes
Replies
Views
Likes
Replies