Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

Brandon_Benjam1
Level 1

Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

We're looking to completely wipe our Marketo database, turn on the SFDC sync and allow everything in SFDC to be the data we move forward with in Marketo. However, we'd like to salvage the activities of the current leads in Marketo and associate them with the new records that come over from the sync (matching on a unique user ID). Is this currently possible and has anyone carried out something similar?

8 REPLIES 8
SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

Yes and no.

You can simulate the old activities using Custom Activities (which I otherwise do not recommend, but can come in handy for this particular purpose). Extract the old (real) activities using Bulk Extract. Then, after the wipe, reattach them as CAs like Archived Opened Email, Archived Sent Email, etc. (or Legacy Opened Email, the exact nomenclature is up to you). 

This won't be as flexible as the native activities, but it's 100x better than losing them entirely. 

Wendy_Schott
Level 1

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

Hi Sanford,

Given we are creating our records in SFDC first then pushing to Marketo.  We have figured out that if we grab the Munchkin Cookie when a user signs up, pass that to SFDC -- replicate to MKTO then use a Webhook we can match the anonymous behavior: (https://nation.marketo.com/message/210913-re-associating-annoymous-behavior-with-sfdc-contact?commen...) .   This worked in our test case.


Now the thought is can we get (export) the person records from Marketo - which would include the Munchkin Cookie.  Add them to the SFDC record - sync them back to Marketo then call the webhook to re-associate the activity with a person.


So the question really is - is there a way to export the cookie values that we can them sync back over after we delete all the users and then reassociate the behavior.

SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

You're talking about a different case. Yes, if you capture the cookie on a non-Marketo form, you can then associcate the previously anonymous activities with the new lead via webhook. This is a familiar pattern.

Brandon is talking about wiping the database. That's not returning the activities to an anonymous state, it's deleting them completely.

Wendy_Schott
Level 1

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

For the record, Brandon and I are working together 🙂 .  What we are trying to accomplish is to not lose all the activity we have gathered over the last several months.  So the thought was if we could

1. Export all the person records in Marketo along with their Munchkin Cookie

2. Import their Cookie into SFDC
3. Delete only the people records in MKTO (keep the activity records)

3. Sync to Marketo

4. Run the Webhook on the Cookie

We would have new people records created correctly and then match them up with the activity we created.  
However, I am unsure how to get the Munchkin cookie from the people record? 

SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

3. Delete only the people records in MKTO (keep the activity records)

How?

Brandon_Benjam1
Level 1

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

We were hoping to export the leads and the activities using the API, before wiping the database. Then associate the old leadId activity (from the export) with the new leadId activity (from the SFDC sync).

You are saying this is only possible by creating activity names as CAs, matching the old names with newer (archived names) and importing each old activity into the new custom activity?

SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

We were hoping to export the leads and the activities using the API, before wiping the database. Then associate the old leadId activity (from the export) with the new leadId activity (from the SFDC sync).

You are saying this is only possible by creating activity names as CAs, matching the old names with newer (archived names) and importing each old activity into the new custom activity?

Yes. You can't reimport extracted activities as standard Visit Web Page, Clicked Link, etc. activities. You can load them into another db and do all kinds of fun number-crunching with 'em. But you can't put them back where you found them.

Mark_Price
Level 7

Re: Is it possible to associate "new" leads with "old" lead activities via the REST API or Import?

Not sure how much data you are dealing with but you could sync from SFDC which will make tons of duplicates. Then use the API to merge duplicates which would keep the activity log intact.  There are a lot of considerations around this approach, but it can work. 

https://developers.marketo.com/rest-api/lead-database/leads/#merge

The only other option I can think of is what Sanford suggests with Custom Activities. 

Hope it helps