change history DateTimeRange issue

24 views
Skip to first unread message

박정현

unread,
May 30, 2017, 11:15:56 PM5/30/17
to AdWords API Forum
HI

i question !!

change history 

May 30, 2017, I made changes to my ad group content.
Well, when it was viewed on May 30th,
30 days are not displayed when viewed on May 31

what should i do ?

attach java source

DateTimeRange dateTimeRange = new DateTimeRange();

LocalDate localDate = LocalDate.now(); //20170531
localDate = localDate.minusDays(1); //20170530

dateTimeRange.setMin(localDate.format(DateTimeFormatter.ofPattern("yyyyMMdd 000000"))); // 20170530 000000
dateTimeRange.setMax(localDate.format(DateTimeFormatter.ofPattern("yyyyMMdd 235959"))); // 20170530 235959

// Create selector.
CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
customerSyncSelector.setDateTimeRange(dateTimeRange);
customerSyncSelector.setCampaignIds(ArrayUtils.toPrimitive(new Long[]{campaignID}));

CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

System.out.printf("최근 변경 시간 : %s%n", accountChanges.getLastChangeTimestamp());
System.out.println("시작날짜 >< " + dateTimeRange.getMin() + " 종료날짜 >< " + dateTimeRange.getMax());

if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {

for (CampaignChangeData campaignChanges : accountChanges.getChangedCampaigns()) {

if (campaignChanges.getChangedAdGroups() != null) {

for (AdGroupChangeData adGroupChanges : campaignChanges.getChangedAdGroups()) {
System.out.println("광고그룹 아이디 -> " + adGroupChanges.getAdGroupId());
System.out.println("변경 되었니 -> " + adGroupChanges.getAdGroupChangeStatus());
System.out.println(getFormattedList(adGroupChanges.getChangedCriteria()));
System.out.println(getFormattedList(adGroupChanges.getRemovedCriteria()));
}
} else {
            // ??
System.out.println("oops");
}
}
} else {
System.out.println("No account changes were found.");
}

Peter Oliquino

unread,
May 31, 2017, 2:51:36 AM5/31/17
to AdWords API Forum
Hi,

Please correct my understanding if I am wrong. Could you confirm if what you wish to do is to retrieve the changes made during the past 30 days and that you also expected to get the information for the change you made on May 30, 2017? If I am correct, could you provide the SOAP request and response generated? Please make sure to reply privately using the Reply privately to author option when sending in the details I requested.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages