Dear @SanfordWhiteman,
I have spent many hours sifting through general guidance, hints, and scattered implementation details that you have kindly offered in posts over the past 5 or more years regarding regarding associating imported SFDC leads with existing anonymous leads. I've now spent many more hours trying to understand and implement the solution for my client. It's all been slow going since although I have a technical background, Marketo is new territory. I've tried very hard to figure this out myself, but I'm not quite there, and hoping you would be willing to help me out.
I have created a loopback webhook with the following values:
URL: http://localhost/index.php/leadCapture/save
Payload Template: munchkinId={{lead.Marketo Munchkin}}&FormId=1024&Email={{lead.Email Address}}&returnLPId=-1
Request Token Encoding: Form/Url
Request Type: POST
Response Format: None
{{lead.Marketo Munchkin}} is an imported SFDC field containing the munchkin value from a (non-Marketo) form generated lead.
I've created a webhook monitoring operational campaign that is checking for something other than a 302 response. I call the webhook from another campaign where I've been testing on individual leads that have a munchkin value in the {{lead.Marketo Munchkin}} field.
My main difficulty at the moment, is that I don't know how to check or debug the result of the webhook call. I'm not seeing associated website activity for the individual record I've tested. It seems that the webhook call is returning a 302, but beyond that I can't figure out how to determine if the parameters and values I've chosen in the webhook payload are correct. Is there any way to get more results from the loopback call then whether the response code was 302?
One thing I'm not seeing in any activity log is the name of the form I created, #1024 referenced above. While I do see activity indicating the webhook is getting called, and the monitoring is getting called. This is the kind of question a little more system feedback would be helpful with. I tried enabling a JSON response instead of none, and returning the "success" parameter in the webhook response mapping, but this didn't seem to work. And I'm afraid this demonstrates where my experience is limited and my understanding is incomplete. Any help would be appreciated.
Update: now it seems the webhook is not returning "HTTP Error 302: URL moved temporarily." I'm quite sure it was returning that earlier in my testing, but won't swear to anything. In any case, I'm faced with a similar dilemma, how do I determine what code is being returned if it's not 302?
Thank you,
David L Kaplan
Hi David,
The loopback-webhook-association trick is a bear to troubleshoot, to be sure — the main problem being that Marketo doesn't show you the full request/response if there's a 302, even though 302 is the success response from /save.
But I think the problem in your 'hook is capitalization.
The fields are
My updated payload: munchkinId={{lead.Marketo Munchkin}}&formid=1024&Email={{lead.Email Address}}&retURL=success
My monitor condition:
This condition is triggered and I receive the flow action Alert.
See any more mistakes, need to see more of my configuration, or suggestions for next debugging steps?
You must get a Filled Out Form activity in the lead's Activity Log, if not then it's not fully working.
Only seeing entries like this in the lead activity log. No Filled Out Form.
Here's the overview of my form:
Any clues?
Why don't you temporarily change the URL to
and run someone through. That's a temporary test server and then I can check what's sent out on the wire. Don't worry about the response code (it'll be a 502).
Sure! Thank you!
Ok, URL in webhook is now: "https://c7071141.ngrok.io/"
I assumed you didn't want me to append any path there. Let me know if that was wrong.
And I ran a lead through.
Didn't get anything yet... I assume you used Request Campaign?
Gulp! Um... This would appear to be a step of the process I don't understand.
I have a campaign set up in which I select a specific user to test on in the smart list. The flow step calls the webhook. I go into the Schedule screen on that campaign and "Run Once". No "Request Campaign" anywhere, and unclear where it would go...
Hoping I'm making a big mistake here that will set everything aright.
I have a campaign set up in which I select a specific user to test on in the smart list. The flow step calls the webhook. I go into the Schedule screen on that campaign and "Run Once". No "Request Campaign" anywhere, and unclear where it would go...
Hoping I'm making a big mistake here that will set everything aright.
The Call Webhook flow step can only be used in a trigger campaign.
But that doesn't mean you can't call it whenever you want (ad hoc).
It just means you need to have a Campaign is Requested trigger in the Smart List.
Then you can run a batch Request Campaign, or right-click on a lead in the lead db and go to Special » Request Campaign, etc.
I'm not sure I ever would have figured out that the webhook needed to be called from a trigger campaign, especially since it allowed the call from a non-trigger campaign. Wow! New results - more descriptive messages in the activity log. I wasn't even getting a response code before. I think we're getting closer!
When I tried it to the loopback endpoint, I got this:
When I tried to your test server, it seemed to work. I got the expected 502.
The payload you sent me looks OK.
Thank you, what do you make of the 404 with the loopback url (http://localhost/index.php/leadCapture/save)?
Thank you, what do you make of the 404 with the loopback url (http://localhost/index.php/leadCapture/save)?
I have a concern that your instance has this functionality (which is technically unsupported) accidentally turned off. This has happened off and on. I don't see any other problems with the payload, it still works for me on app-sj01.
Any recommendations for how it would be best for me to proceed in this case?
You'd have to open a case — though don't necessarily expect a good answer.
Note you don't have to use /save via loopback (localhost). You can have a very simple external HTTP server that sends the payload back in on app-xxxx.marketo.com. This always works because it's just like any form post, doesn't rely on Mkto having configured the localhost-to-localhost connection. And this is still a lot easier than using the API.
When the payload is sent back in, is it sent to https://app-xxxx.marketo.com/index.php/leadCapture/save ?
In which case is this a bad sign?
That's expected, because it has to be a POST, not a GET.
Ok cool. I'll work on the proxy. The part I'm confused about there is the ssl part of my nginx vhost configuration for the incoming and proxied information. Any clues? I'm sure I'll figure it out eventually.
You don't really need to have inbound SSL on Nginx at all, I mean obviously it's better to secure the traffic between Marketo and your proxy but Marketo will happily connect over plain http:.
Oh wow, I didn't see your Friday response until now (Monday afternoon).
That's good to know. I'm still having a concern though. I think I'm getting a 404 with a passed through POST as well, both by sending through my proxy, and by trying to post to my node directly through curl:
curl -X POST https://app-myNode.marketo.com/index.php/leadCapture/save
I hope I'm missing something obvious here. The curl returns the 404 page, and the activity log shows a 404 return when I direct the webhook through my proxy.