Create Duplicate Leads via Webhook

Anonymous
Not applicable

Hi,

Trying to implement the following create duplicate process via a webhook here: https://nation.marketo.com/blogs/marketowhisperer/2015/10/06/the-5-coolest-webhooks-ive-seen-and-or-...

Getting an error in my campaign that calls the webook.

Error code I receive is a 302 on this url http://localhost/index.php/leadCapture/save

Any ideas on why i'm getting this?

22 REPLIES 22
Anonymous
Not applicable

To update, support has not been able to resolve the issue with me. We ended up testing out this URL http://app-sjg.marketo.com/index.php/leadCapture/save which support gave me and we got the webhook to execute, but no "new" lead was created as what the post expects us to have completed.

Anyone else out here got this to execute properly to create a new lead?

SanfordWhiteman
Level 10 - Community Moderator

Can you post the Webhook config, please?

Anonymous
Not applicable

Basically its a normal form payload, but I'm writing to a custom field called emailAddressTemp. From there, my understanding from the initial post was that a lead would be copied and a workflow would be needed to just re-populate to the Email Address to make a valid lead. This is where i'm dropping off.

Screen Shot 2015-11-24 at 4.00.18 PM.png

SanfordWhiteman
Level 10 - Community Moderator

Are you sure there is no lead created (never mind the email address changing in the flow)? If you search by lastname, you see nothing? If you create a form with the core fields (lastname, EmailAddressTemp), embed it in an LP, and post it, you see no lead?

Anonymous
Not applicable

In my secondary flow where a smart list includes trigger "Lead Created" with filter email address = empty and email temp address = not empty I end up pulling in what i'm thinking are the new leads. What happens next is that the lead who ran through the flow has email address temp copied to email address via the token. When I click on the leads name to view its details, it say No Lead Exists.

So that leads to me that yes, the lead was created, but is just not visible. I'll try the form embed with fields last name and email address temp.

SanfordWhiteman
Level 10 - Community Moderator

I wouldn't rely solely on triggers while testing (even if the production need is for a trigger).  You need to be able to go back and run a Smart List of people who performed a certain action, especially when trying to track down "lost" leads.

Anonymous
Not applicable

Not even a smart list can collect any of the leads. I'm thinking the webhook itself as a solution to create duplicate leads is not valid.

SanfordWhiteman
Level 10 - Community Moderator

I'm pretty sure it does work. All it's doing is a form post.  So if this didn't work, that would mean a Change Data Value doesn't work at all to create dupes.  Are you seeing a merge instead?

Anonymous
Not applicable

Well at this point I can't even get a valid return anymore. Keeps timing out on me.

SanfordWhiteman
Level 10 - Community Moderator

Change to http://localhost/...

Anonymous
Not applicable

OK got the webhook to call correctly again, but looks like it's just not creating a new lead which I can find. Do you know of any other purposeful duplicate creation workflows that are more reliable?

I heard possibly using salesforce queues. Marketo support suggested changing my instance deduplication rules, which im hesitant to do so as I haven't gotten full clarity into what changes would actually be made.

Josh_Hill13
Level 10 - Champion Alumni

You can assign any record to an SFDC Queue. If it is an SFDC Contact, SFDC will create a dupe SFDC Lead to insert to the Queue. Possibly that's what they meant.

Anonymous
Not applicable

AH yes I see. Makes sense Josh. Thank you!

SanfordWhiteman
Level 10 - Community Moderator

Definitely w/queues.  Not my area of expertise but Josh Hill​ has links and much knowledge on that.

But this still doesn't follow for me.  As we both know, all you're doing is posting a form with the special EmailAddressTemp filled out.  That form post can't just go into the ether or it would point to a wider issue.  Can you have the webhook set another field to something identifiable, say LastName = "{0000-0000-0000}" and search on that?  And you can also hard-code the email address to something identifiable.  The main goal should be for you to figure out what is happening as a result of the form post, regardless of the later trickery with the flow and data value.

Anonymous
Not applicable

Ok, i will try and work towards finding this issue with the form post per your suggestions. Thanks as always for the help.

Anonymous
Not applicable

Sanford Whiteman​ I figured out what was going on. In the original post, I copied the webhook as he built via the pictures and instructions. What i ended up noticing was that in the post the formid = the 4 numbers of the form. When i set my formid in the webhook to = mktoForm_2903 everything worked as inteded.

Such a small change, but DARN frustrating to figure out. Thanks for the guidance!

SanfordWhiteman
Level 10 - Community Moderator

That's a pretty weird fix. 

All other webhooks that do loopback form posts use formid=nnnn, like the one described underMarketo Webhooks With Marketo API​ which we just got working a day ago. And a client-side form post clearly just sends the integer id.

If this requirement has changed it is a dramatic, undocumented, breaking change.

Anonymous
Not applicable

Very interesting indeed. Maybe its just a wonky instance bug. We do use workspaces, not sure if that would affect it.

SanfordWhiteman
Level 10 - Community Moderator

The /save endpoint returns a 302 to the Thank You URL. That should not affect the outcome.

Anonymous
Not applicable

Ok thank you Sanford Whiteman​. I'm working with Marketo support. My webhook needs further investigating. I do indeed see it being called on the lead, but leads are not being duplicated.