Passing Custom Params Through the Munchkin

Dan_Askin
Level 4

Passing Custom Params Through the Munchkin

We're exploring how we can pass custom params -- say an add-to-cart $ value -- into Marketo. One quick use case: If the lead is known and the ATC value > $400 (lead doesn't buy), deploy specific messaging/sales alert/etc.

Seems like a # of ways to execute. Curious what the group thinks. 

Thanks,

Dan

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Passing Custom Params Through the Munchkin

There's no way to pass values from Munchkin directly into a lead field without also generating a Munchkin associator hash.

You can't generate this hash on the client side for security reasons; you can generate the hash using a webhook, store it in a lead field, then pass the {{lead.token}} along in a query string and then store it in the browser. 

This wouldn't cover the case where a person came to your site and has an associated session without clicking an email, though (i.e. they only filled out a form). For that case, you'd need to output the associator hash into the page as a {{lead.token}}. But that bends the rules of when an associator hash should be generated, since you haven't made them prove they own the email address.

Alternately, you can forego all the associator hash stuff and (more) simply call the Munchkin visitWebPage function with a custom URL -- a URL structure that mirrors your "micrologging" goals, like /actions//addtocart/total/400 . Then pass {{trigger.web page}} to a webhook, which parses the value and writes it back to a lead field. From there you can trigger whatever you want. We have this kind of setup running happily on a bunch of instances.