Skip to main content
June 12, 2013
Question

SOAP API - getMultipleLeads

  • June 12, 2013
  • 2 replies
  • 668 views
- 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?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

June 12, 2013
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>
 
June 12, 2013
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;
      }