Munchkin API associateLead not updating in Marketo | Community
Skip to main content
July 14, 2015
Solved

Munchkin API associateLead not updating in Marketo

  • July 14, 2015
  • 2 replies
  • 2284 views

Hello all,

I have been trying and trying, and I don't see what is going wrong here. This is my script that I am using:

<script>

  $(document).ready(function(){

  mktoMunchkinFunction('associateLead',

  {

  Email: "chester@tester.com",

  FirstName: "Chester",

  LastName: "Tester"

  },

  'MY-HASH');

  });

</script>

When I load the page (in incognito mode, as an anonymous lead), I see the correct hash in the script, and my console shows the ?associateLead call being sent and returned with a 200 Status (OK):

I do not see any console errors or any network errors in my web inspector. However when I search my leads in Marketo, chester@tester.com does not show up. Is there anything I am missing?

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

You should be getting 9c04443e77efff688d6ad09ffee2cb37f3989138.  What's your hash code look like?  It should just be:

hash( (key + email) )

EDIT: looks like you're adding a literal period character in between the key and email, I get the same result from hash("abcdef.chester@tester.com")

In the sample code(Lead Tracking (Munchkin) » Marketo Developers​), that period is the concat operator in PHP.

2 replies

SanfordWhiteman
Level 10
July 15, 2015

Can be hard to troubleshoot because the most important part, the hashing function, is something I we can't verify for you.

How about this: use the secret key "abcdef" and email address chester@tester.com and post the results of your hashing function.

July 15, 2015

Sure thing. When I hash "abcdef.chester@tester.com" I get "732298140FBB1378B6087AD752560F8D63CE853C"

Kenny_Elkington
Adobe Employee
Kenny_ElkingtonAdobe EmployeeAccepted solution
Adobe Employee
July 15, 2015

You should be getting 9c04443e77efff688d6ad09ffee2cb37f3989138.  What's your hash code look like?  It should just be:

hash( (key + email) )

EDIT: looks like you're adding a literal period character in between the key and email, I get the same result from hash("abcdef.chester@tester.com")

In the sample code(Lead Tracking (Munchkin) » Marketo Developers​), that period is the concat operator in PHP.

SanfordWhiteman
Level 10
July 15, 2015

That isn't the right result, I suspect because you're using the wrong inputs.

It should be SHA1("abcdefchester@tester.com").

July 15, 2015

Ah ha! I was indeed putting a literal period between the secret key and email. Once I removed that, the function works as expected.

Thanks!!