6 Replies Latest reply on Jun 25, 2015 10:38 AM by Kenny Elkington

    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?



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

          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?

            • 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
                • Re: Struggling to understand multiple "new lead" activities for same Lead ID
                  Kristen Carmean

                  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.

                  1 of 1 people found this helpful
                    • 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