SOAP API - Unable to get lead using Cookie? | Community
Skip to main content
Josef_Lobotka
Level 2
November 8, 2018
Question

SOAP API - Unable to get lead using Cookie?

  • November 8, 2018
  • 3 replies
  • 4591 views

I'm trying to get Anonymous Lead through the SOAP API. This would be the source code within XML's body:

   '<mkt:paramsGetLeadActivity>',

   '<leadKey>',

   '<keyType>COOKIE</keyType>',

   '<keyValue>id:XXX-XXX-XXX&amp;token:_mch-domain.com-1533412128399-11111</keyValue>',

   '</leadKey>',

   '<startPosition>',

   '<latestCreatedAt />',

   '<offset />',

   '</startPosition>',

   '<batchSize>10</batchSize>',

   '</mkt:paramsGetLeadActivity>',

The resulting error is Lead does not exist, which is not true, because it is possible to obtain the Anonymous Lead using Marketo ID ('IDNUM' keyType, as documented at http://developers.marketo.com/soap-api/leads/getlead/).


Is this bug or feature? If it's intentional, is there any other way how to obtain Marketo ID from a Cookie? (Using SOAP, JS, REST, Munchkin etc.)

Thank you for your help, Joe

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

3 replies

Adobe Employee
November 8, 2018

Hi Josef,

I could be wrong but getting/viewing anonymous leads in Marketo is no longer possible. We used to be able to see this information years back but I do not think you can see these leads in your Marketo database any more.

Also the document that you pointed to, refers to an existing lead in Marketo.

Hope this helps.

Thanks

Floyd

Josef_Lobotka
Level 2
November 8, 2018

Hi Floyd,

Sorry - this is a SOAP API request, not a view in Marketo's administration.

As stated above, it is possible to retrieve the Anonymous Lead using Marketo ID (IDNUM) instead of the COOKIE, so the API does seem to return all leads, not just the known ones.

Jay_Jiang
Level 10
November 8, 2018

Try with just "_mch-domain.com-1533412128399-11111"

Josef_Lobotka
Level 2
November 8, 2018

Tried, does not work. Good idea, thanks.

Jay_Jiang
Level 10
November 8, 2018

You can use REST to get leadid by cookie

/rest/v1/leads.json?access_token=xxx&filterType=cookies&filterValues=_mch-domain.com-1533412128399-11111&fields=id

SanfordWhiteman
Level 10
November 8, 2018

It is not possible to query still-anonymous leads using the cookie as the lookup key (neither with SOAP nor REST). The session must be associated with a lead first.

In general, Marketo is not the place to be working with web activity while it's still anonymous; the old methods for doing so have all been deprecated or removed, and there's no reporting advantage over GA/Clicky/et al. before the underlying lead is known.