Hey team,
Recently we've been using a script to pull down Custom Object data via REST API which has been working great.
However, the only downside of this solution is that we have to provide the script an input file of either Email Addresses or GUIDs. We've been achieving this by exporting a CSV from a Smart List of "Has CustomObject: True".
Ideally we'd prefer to skip/automate this step
Does anyone know of any method we could query a Custom Object to return the GUIDs of all of its members? Or query the lead database and return only those that have that specific Custom Object data? I had a look through http://developers.marketo.com/ but didn't spot anything.
Thank you!
Vlad
Would you be able to share the script that you're using to pull down the custom object data? Thanks in advance!
Hey Kelly,
Sorry I can't share this directly as it's my employer's IP but I'd be happy to give you pointers.
It's just a simple python script that uses the requests library to create the API calls, json library to format and Pandas to iterate through and generate the output CSV.
Cheers,
Vlad
Hi Vlad,
I have same question. Do you have any updates on this question? After we cleaned up all records in lead object, we still have records left in customer object. How do I do a query or an Api call to retrieve the GUIDs of all its member?
Thanks!
Ling
Vlad Petrovic Jan 24, 2018 12:45 PM
Hey Ling,
I haven't managed to find an overly elegant solution but here's what I have so far:
1) Have a daily smart campaign that flags all records with custom object data, setting a custom boolean field = true
2) Automated script using bulk lead extract API, filtering on flag=true, to get list of GUIDs that have custom object data
3) Separate automated script downloads all custom object data, filtering on those GUIDs and extracting to CSV.
Cheers,
Vlad
Hi Vlad,
Thanks for your response. Will check bulk lead extract API. My issue is with dangling records in customer object .
Thanks!
Ling