Skip to main content
Mark_Ioffe
Level 2
December 12, 2018
Question

bulk delete from database

  • December 12, 2018
  • 1 reply
  • 4553 views

hello. we have a few hundred leads deleted because customers have closed accounts and other reasons.  we have a custom field on the lead that represents our internal customer id.  is there a way we can pass a list of customer id's to marketo to delete them from the lead and associated custom objects?  i see we can pass the marketo id but that lives only in marketo-land.

thanks!

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

1 reply

Gerard_Donnell4
Level 9
December 12, 2018

Hi Mark,

It probably depends on the field type.

Try creating a smart list and then drag out the custom field. It should hopefully have a green plus sign to the right. If you click that a box appears where you can enter multiple values on separate lines. Copy and paste all your Customer ID's in there and hopefully that will create a smart list with all the people you need to delete.

Mark_Ioffe
Level 2
December 12, 2018

Thank you for your prompt reply. Is there a way I can do it via API? Like pass the customer field as a list of id’s (1,2,3,4,5) etc.. and call /bulk/v1/leads.json?_method=DELETE on that csv containing the id’s?

SanfordWhiteman
Level 10
December 12, 2018

Deletes are done with the Lead ID. You could use Get Leads (by Filter Type) and pass the results to Delete.

It wouldn't make sense for delete to key on a custom field, because deletes refer to a single lead at a time and your custom field (even if you try to keep it unique in userland) is not actually guaranteed unique.