customerSyncSelector.setDateTimeRange(dateTimeRange);
customerSyncSelector
.setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));
// Get all account changes for campaign.
CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);
// Display changes.
if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
System.out.println("Most recent change: "
+ accountChanges.getLastChangeTimestamp() + "\n");
for (CampaignChangeData campaignChanges : accountChanges.getChangedCampaigns()) {
System.out.println("Campaign with id \"" + campaignChanges.getCampaignId()
+ "\" was changed: ");
System.out.println("\tCampaign changed status: "
+ campaignChanges.getCampaignChangeStatus());
if (campaignChanges.getCampaignChangeStatus() != ChangeStatus.NEW) {