Re: LastUpdatedDate actually CreatedDate in getMultipleLeads LeadSelector?

Anonymous
Not applicable

LastUpdatedDate actually CreatedDate in getMultipleLeads LeadSelector?

Hi,

I'm using the getMultipleLeads API to keep all Marketo leads in sync with an external database.  I'm using the java SOAP library with a LastUpdatedAtLeadSelector to gather all leads in a specified timerange.  However, I noticed this selector actually uses the CreatedDate and not the LastUpdated date of the records.  For instance, if I set the oldestUpdatedAt date to 2011/11/21 and the latestUpdatedAt date to 2011/11/23 I get back a record created on 2011/11/21 but most recently updated on 2013/11/15, far outside the given range.  

Does this mean that I can only use this API to get newly created leads but not to see any leads that have been modified since the last sync?  If so, what is the recommended method to sync updates?  I'm also working with the getLeadChanges API with the "ChangeDataValue" ActivityType.  However that seems to give back a ton of fields I don't care about since there is no filtering capability.  Do I just need to slog through all those updates to find the ones I care about?

--------------------
Here's my code to configure the LeadSelector:

LastUpdateAtSelector leadSelector = new LastUpdateAtSelector();
 
        //set timeframe
        DatatypeFactory factory = DatatypeFactory.newInstance();
 
        GregorianCalendar sinceGC = new GregorianCalendar();
        sinceGC.setTimeInMillis(curMinTimestamp);
        XMLGregorianCalendar since = factory.newXMLGregorianCalendar(sinceGC);
 
        GregorianCalendar untilGC = new GregorianCalendar();
        untilGC.setTimeInMillis(curMaxTimestamp);
        JAXBElement<XMLGregorianCalendar> until = objectFactory.createLastUpdateAtSelectorLatestUpdatedAt(factory.newXMLGregorianCalendar(untilGC));
 
        leadSelector.setOldestUpdatedAt(since);
        leadSelector.setLatestUpdatedAt(until);
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: LastUpdatedDate actually CreatedDate in getMultipleLeads LeadSelector?

Peter,
This lead selector returns all leads that were CREATED OR UPDATED in the window you specified.  Currently, the only way to filter updates is to use getLeadChanges and look for ChangeDataValue as you observed in your post.