BingAds / BingAds-Java-SDK

Other
42 stars 48 forks source link

BulkService is not detecting change in tracking template for Eligible(Delivery Status) Expanded/Ad #97

Open sandeeptiwari opened 5 years ago

sandeeptiwari commented 5 years ago

ExpandedAds/Ad's delivery status is eligible, I just update tracking template but bulkservice API with LastSyncTime, is not returning any delta.

code is like :

private DownloadParameters getDownloadParameter(DownloadEntity downloadEntity, String time) 
 throws ParseException {
    ArrayOfDownloadEntity entities = new ArrayOfDownloadEntity();
    entities.getDownloadEntities().add(downloadEntity);
    DownloadParameters downloadParameters = new DownloadParameters();
    downloadParameters.setDownloadEntities(entities);
    downloadParameters.setFileType(DownloadFileType.CSV);

    if (time != null && time.length() == 0) {
        downloadParameters.setLastSyncTimeInUTC(null);
    } else {
        Instant lastUpdatedAt = format1.parse(time).toInstant();
        Date date = Date.from(lastUpdatedAt);
        TimeZone timeZone = TimeZone.getTimeZone("UTC");
        Calendar cal = Calendar.getInstance(timeZone);
        cal.setTime(date);
        downloadParameters.setLastSyncTimeInUTC(cal);//fetch campaigns after lastSync time

    }
    return downloadParameters;
}
anujkapoor commented 5 years ago

I am also facing the same issue. If the ad is in Eligible status and the tracking template for that ad is updated, the BulkService API does not returns the ad as delta change. While if the Delivery status is disapproved or any other, the change in tracking template is returned in delta. Also if any other changes are made except tracking template like final URL, Title, text, etc. the change is returned fine in delta. @qitia, @eric-urban could you guys please check?

qitia commented 5 years ago

thanks for report this. I will look into it