SOAP API - getMultipleLeads

Anonymous
Not applicable
- how can I fecth leads from SmartList?
- I tried to use getMultipleLeads from last day (I set lastUpdatedAt to day ago), but it returns thousands  of leads, our sales  and marketiers were not able to update so many leads during one day. Is there is bug or Marketo engine updates leads automatically?
Tags (1)
2 REPLIES 2
Anonymous
Not applicable
There is no API to fetch leads from a smart list.  Given the dynamic nature of the SmartList, I am not even sure it would make sense to support this.  You can, however, add leads to a (static) list and extract leads from the list using code like this -

   StreamPostionHolder posHolder = new StreamPostionHolder();
   List<LeadRecord> leadRecords = null;
   try {
      do {
          leadRecords = this.client.getMultipleLeads(2,"RajExportableProgram.listForTesting",posHolder, null);
          System.out.println("Retrieved " + leadRecords.size() + " leads");
        } while (leadRecords.size() != 0);
     } catch (MktowsClientException e) {
        System.out.println("Exception occurred: " + e.getMessage());
        return;
      } catch (MktServiceException e) {
        System.out.println("Exception occurred: " + e.getLongMessage());
        return;
      }
 
Anonymous
Not applicable
I do not recall any bug affecting the results returned by getMultipleLeads.

It is more likely to be the format entered for lastUpdatedAt and/or conflicts with leadSelector.

I would suggest entering the attribute lastUpdatedAt using the complete timestamp It looks like

<lastUpdatedAt>2013-06-12T09:05:37+00:00</lastUpdatedAt>