SOLVED

Re: Using Leads endpoint to retrieve all Marketo records

Go to solution
Matt_Stone2
Level 9

Using Leads endpoint to retrieve all Marketo records

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?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Using Leads endpoint to retrieve all Marketo records

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.

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Using Leads endpoint to retrieve all Marketo records

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
Level 9

Re: Using Leads endpoint to retrieve all Marketo records

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 - Community Moderator

Re: Using Leads endpoint to retrieve all Marketo records

Gotta do batches of 30 days.

Matt_Stone2
Level 9

Re: Using Leads endpoint to retrieve all Marketo records

Bummer. So basically this is going to be a pain to accomplish and I should rethink what I'm doing with my life?

SanfordWhiteman
Level 10 - Community Moderator

Re: Using Leads endpoint to retrieve all Marketo records

It's not... that bad?

Every year will take 19 exports: 1 each for February, April, June, September, and November (which are 30 days or under ) and 2 each for the other 7 months.

In turn that'll mean 2 full export queues per year, so you can do the first 10 and wait for them to complete, then the next 9.

Been doing this a bunch lately on multiple instances, so I have some scripts 'n' such to make it easier. Maybe I'm too used to it.

Matt_Stone2
Level 9

Re: Using Leads endpoint to retrieve all Marketo records

Makes sense, definitely doable just sounds like a lot of work upfront to make it automated and scaled. Thanks!