SOLVED

Re: Extract Marketo Custom Object in bulk via API

Go to solution
Phillip_Wild
Level 10 - Community Advisor

Extract Marketo Custom Object in bulk via API

Hi everyone

I'm looking to extract every instance of a particular Marketo Custom Object, along with the relevant custom object fields. I've had a look at the Bulk API and it seems like I can't access Custom Objects from there, only fields on the Person record. But if I look at the Custom Object API, I can get any custom object information attached to a particular Marketo Person, but not in bulk.

Any advice? What's the easiest way to get a CSV of every entry to a particular custom object?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Extract Marketo Custom Object in bulk via API

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Extract Marketo Custom Object in bulk via API

Phillip_Wild
Level 10 - Community Advisor

Re: Extract Marketo Custom Object in bulk via API

Nooooooooooo

I saw that you had replied and I was sure I was within about ten seconds of knowing the sneaky solution Sanford....but it seems in this case I've stumbled upon a gap in Marketo's functionality. Nuts.....

I guess I could loop through the data....if my Python is up to it. Will give it a crack. Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Extract Marketo Custom Object in bulk via API

I saw that you had replied and I was sure I was within about ten seconds of knowing the sneaky solution Sanford....

Glad I could instill such confidence but not this time.

Guess you could use that crazy method I posted on my blog the other day (will not link to it here for sanity's sake, but the one that says "...with minimal comment," you'll see it) to write all the COs to a textarea field, then export the leads. But probably you should loop.

Dave_Doran
Level 2

Re: Extract Marketo Custom Object in bulk via API

If not via API is there a way to extract Marketo Custom Object in bulk via the UI? We're moving from SFMC to Marketo and with SFMC it's easy enough to extract custom object (data extension) data.

SanfordWhiteman
Level 10 - Community Moderator

Re: Extract Marketo Custom Object in bulk via API

It's not that there isn't a way to extract COs in (relative) bulk, it's that it's necessarily paginated and requires a cross-reference to lead IDs (which are themselves available as a true all-at-once download using Bulk Extract).

Clearly a pain, but if you write it once it will continue to run. I recommend you use the Added to <Custom Object> trigger to flip a flag on the lead, so only people with that flag on would be considered for detailed extract.

Overall, the thing to realize is Marketo COs cannot be created, attached, updated, detached, or deleted in the Marketo UI, nor in Flows.  Ergo, any work with COs needs to be done via API, so the assumption -- I completely understand it's not applicable to all situations, but at least there's a bit of reasoning behind it -- is that you have a source of truth for COs that you're using to feed Marketo, so that source of truth is where you'd go if you wanted a point-in-time dump. Again, not overwhelmingly reasonable, but there's something to it for most CO deployments, I'd venture.