Soap API - updateSelector.oldestUpdatedAt returning the lead list based on ID, not on actual update of record

Anonymous
Not applicable

Soap API - updateSelector.oldestUpdatedAt returning the lead list based on ID, not on actual update of record

Hello,

I am currently working on using the SOAP API to return a list of leads using the getMultipleLeads function call. I am setting the leadSelector to use oldestUpdatedAt, and the sort order of the list of leads returned is based on the lead Id, not on the actual updated value.

Example
4 leads in my marketo database
Lead A - Id:1 - Last Modified: 12/17
Lead B - Id:2 - Last Modified: 12/12
Lead C - Id:3 - Last Modified: 12/20
Lead D - Id:4 - Last Modified: 12/19

The list of leads are always returned in the above order because of the Id values, not on the actual modified date. Goal is to have the following list returned:

Example
4 leads in my marketo database

Lead B - Id:2 - Last Modified: 12/12
Lead A - Id:1 - Last Modified: 12/17

Lead D - Id:4 - Last Modified: 12/19
Lead C - Id:3 - Last Modified: 12/20


Code Sample
DateTime dt = new DateTime();
dt.ToString("2014-9-01T12:00:00-00:00");

LastUpdateAtSelector updateSelector = new LastUpdateAtSelector();
updateSelector.oldestUpdatedAt = dt;

ParamsGetMultipleLeads multiLeadParam = new ParamsGetMultipleLeads();
multiLeadParam.leadSelector = updateSelector;

SuccessGetMultipleLeads success = SoapClient.getMultipleLeads(multiLeadParam);

Is there a way to have the function return the list of leads in the order in which they were last updated? Is there a SortOrder parameter option to accomplish this task?

Thank you for the help,



 
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Soap API - updateSelector.oldestUpdatedAt returning the lead list based on ID, not on actual update of record

Unfortunately, I do not think it is possible to sort results as you described.