Using Leads endpoint to retrieve all Marketo records | Community
Skip to main content
Matt_Stone2
September 27, 2017
Solved

Using Leads endpoint to retrieve all Marketo records

  • September 27, 2017
  • 1 reply
  • 3250 views

I'm trying to use the Leads endpoint to loop through every Marketo record (300 at a time), but I'm not sure how to use a filter that will retrieve everything.

I tried using a custom checkbox field (Marketable__c), and passing in the filter values of 1 or 0 (ie the only two possibilities), but I get an error of:

[code] => 1011

[message] => Lookup field 'Marketable__c' not supported

Any suggestions on how to pull this off?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

The concept wouldn't work anyway because even if it were a string and thus theoretically filterable, the cardinality would be too low for it to be used as filter (and if the cardinality were high enough, it would then be unusable in the other way, i.e. wouldn't return all the records!).

You can start with a static list.  But even better these days is to start with a bulk extract.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 27, 2017

The concept wouldn't work anyway because even if it were a string and thus theoretically filterable, the cardinality would be too low for it to be used as filter (and if the cardinality were high enough, it would then be unusable in the other way, i.e. wouldn't return all the records!).

You can start with a static list.  But even better these days is to start with a bulk extract.

Matt_Stone2
September 27, 2017

I started down the BulkExport route you recommended, but I hit a wall when I try to use a filter of "createdAt" with a "startAt" of one month and an "endAt" of another.

[message] => Date difference is > 30 for createdAt

At the moment I was just trying a test of anyone created within a 60 day period, but per my original question, I was hoping to be able to use this to export the entire database. Would this require looping through 30 day increments? Or would I need to use a different filter? If the latter, are there any other limitations I might run into for this?

Thanks!

SanfordWhiteman
Level 10
September 27, 2017

Gotta do batches of 30 days.