Re: Struggling to understand multiple "new lead" activities for same Lead ID

Anonymous
Not applicable

Struggling to understand multiple "new lead" activities for same Lead ID

I'm fetching all the "New Lead" (type 12) Activity records in a given interval. In that interval, I notice a fairly good number of Lead IDs which have multiple New Lead Activity records associated. The usual pattern is:

{"id":123,"leadId":8787,"activityDate":"2015-06-01T06:48:58Z","activityTypeId":12,"primaryAttributeValueId":8787,"primaryAttributeValue":"XYZ","attributes":[{"name":"Created Date","value":"2015-05-21"},{"name":"Source Type","value":"Web service API"}]}

{"id":123,"leadId":8787,"activityDate":"2015-06-01T06:54:28Z","activityTypeId":12,"primaryAttributeValueId":4242,"primaryAttributeValue":"Foo Bar","attributes":[{"name":"Created Date","value":"2015-06-01"},{"name":"Source Type","value":"Web service API"}]}

Why would I get multiple entries for the same Lead ID? Any way to avoid that (it basically wastes results I get back from the API, where all I want is to get all Leads created in a specific time interval)? If I can't avoid that, which one of those entries should I "favor"? The first one? The last one?

Thanks!

6 REPLIES 6
Anonymous
Not applicable

Re: Struggling to understand multiple "new lead" activities for same Lead ID

Hi Carlo

i'm interested in this issue.

I tried to happen this issue but I cannot.

Could you check this lead's all activity log via browser login?

Anonymous
Not applicable

Re: Struggling to understand multiple "new lead" activities for same Lead ID

This is what I see; notice the double New Lead activity; there are more activities following these, of course.

   

Event IDDate/Time EDTActivity Type
5867992752015-05-21 13:30:40Click Link
5867993092015-05-21 13:30:43Visit Web Page
5958648292015-06-01 02:48:28Visit Web Page
5958648462015-06-01 02:48:30Click Link
5958648692015-06-01 02:48:32Visit Web Page
5958648842015-06-01 02:48:33Click Link
5958649212015-06-01 02:48:38Visit Web Page
5958649382015-06-01 02:48:39Click Link
5958650592015-06-01 02:48:52Visit Web Page
5958651352015-06-01 02:48:57Visit Web Page
5958650732015-06-01 02:48:58New Lead
5958650742015-06-01 02:48:58Change Revenue Stage
5958680732015-06-01 02:54:28New Lead
5958720972015-06-01 03:01:47Click Link
5958721062015-06-01 03:01:47Visit Web Page
5958721092015-06-01 03:01:52Change Data Value
5958721102015-06-01 03:01:53Change Data Value
5958721112015-06-01 03:01:53Change Data Value
5960552272015-06-01 07:39:20Visit Web Page
5961232022015-06-01 09:06:59Visit Web Page
Anonymous
Not applicable

Re: Struggling to understand multiple "new lead" activities for same Lead ID

Have you confirmed that there's no merge activity that happened? If you open up each of those New Lead activities to look at the activity detail, it should give you more useful information, including the ID of the leads at that moment, so you can see if there were two different leads. It could also have something to do with anonymous leads converging into one known record.

Anonymous
Not applicable

Re: Struggling to understand multiple "new lead" activities for same Lead ID

I honestly don't know; all I'm trying to do is to rely on the lead activity REST API to fetch details about Leads created in a specific time frame. And I was a bit surprised to see multiple "new lead" activities for the same Lead.

Looking at the details of the two "new lead" activities here, I see that the first one references the company name, and the LeadID mentioned in those details is the XYZ; the second one references the person's first and last names, and the LeadID is a different one. In the API calls, the returned leadId is the same for both events, but the "primaryAttributeValueId" matches the LeadID in the first event, and a different LeadID (consistent with what I see in UI) in the second one...

So, considering what my goal is, as stated above, what should I do?

1) ignore New Lead events which reference a LeadID already covered by a previous New Lead event

2) ignore leadID in the New Lead event payload, and rely on primaryAttributeValueId - which is different in both cases

3) overwrite previously seen New Lead events which reference the same LeadID covered by a subsequent New Lead event

?

Anonymous
Not applicable

Re: Struggling to understand multiple "new lead" activities for same Lead ID

What I can guess from further investigations is that a New Lead activity like this one:

{"requestId":"3cb4#14e2bbf9b1a","result":[{"id":123,"leadId":87,"activityDate":"2015-06-03T02:57:18Z","activityTypeId":12,"primaryAttributeValueId":4242,"attributes":[{"name":"Created Date","value":"2015-05-19"},{"name":"Source Type","value":"Web service API"}]},

...is really a merge activity, where 4242 is merged into 87.

As a matter of fact, I can see that 87 was created years ago, while 4242 cannot be found.

I suppose I just wonder why this is listed as a New Lead activity rather than a merge one...

Kenny_Elkington
Marketo Employee

Re: Struggling to understand multiple "new lead" activities for same Lead ID

Hey Carlo,

It depends on how you want to handle merged records.  I would lean towards option 1 since this will reliably show the initial creation event for you records, regardless of whether they have been merged.  However, option 2 will account for the creation events of leads which were merged into the master record, if this is needed for you.  Option 3 I would not recommend since this will wholly overwrite your first creation event for a master record.