Update Adobe Campaign delivery statistics programmatically when working with external agencies that update broad logs after delivery β€” for example, to refresh tracking and message counter data without manual intervention through the client UI.

Use the NLWS.nmsDelivery.RecomputeStats method in JavaScript workflows to trigger recalculation with specific dirty flags.

Preparation

Ensure you have the delivery ID available in your workflow context (vars.deliveryId).

Walkthrough

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);

The dirty flags come from the nms:delivery schema’s dirtyFlags enumeration:

  • nmsDeliveryDirtyFlags_tracking (1 / 0001) β€” tracking logs
  • nmsDeliveryDirtyFlags_messageCounters (8 / 1000) β€” broad logs
The pipe | is a bitwise OR operation: 1 8 = 9 (binary: 0001 1000 = 1001).

Validation & troubleshooting

Verify the delivery statistics have been updated in the delivery dashboard after the workflow runs.

Going further

See the Adobe Campaign JavaScript API documentation for NLWS.nmsDelivery methods.