SOLVED

Send Lead Data from MKTO to SFDC Web-to-Lead Form

Go to solution
Highlighted
Level 7 - Champion Alumni

Send Lead Data from MKTO to SFDC Web-to-Lead Form

Hi Community!

Looking to see if someone has had experience passing/posting data from their Marketo instance to another company's SFDC Web-to-Lead form?

We've recently started working very closely with a partner and are planning to share leads with them. They have shared with us a SFDC Web-to-Lead form and I was curious if there is a way to post to that form using a Webhook (I think the answer is yes, but how to set up this particular webhook I'm not certain about).  Ideally, I would like to include it as a flow step in my trigger campaign whenever someone fills out the form on that particular partner's page.  Or maybe there is a better way of accomplishing this goal?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Hi Valerie,

Cross-posting to Web2Lead is quite easy. The webhook URL is the SFDC endpoint. Request encoding is Form/URL. Then include the fields in the template like

fieldname1={{lead.field1}}&fieldname2={{lead.field2}}

View solution in original post

20 REPLIES 20
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Hi Valerie,

Cross-posting to Web2Lead is quite easy. The webhook URL is the SFDC endpoint. Request encoding is Form/URL. Then include the fields in the template like

fieldname1={{lead.field1}}&fieldname2={{lead.field2}}

View solution in original post

Highlighted

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Sanford Whiteman Is this somehow altered by SFDC picklist fields or fields not selectable in the W2L setup (Lead Status in this case)?

Screen Shot 2017-11-02 at 1.01.16 PM.png

Between this (which successfully posts to SFDC):

<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="XXXXXXXXXXX">

<input type=hidden name="retURL" value="http://">

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

<label for="city">City</label><input  id="city" maxlength="40" name="city" size="20" type="text" /><br>

<label for="state">State/Province</label><input  id="state" maxlength="20" name="state" size="20" type="text" /><br>

<label for="title">Title</label><input  id="title" maxlength="40" name="title" size="20" type="text" /><br>

Department:<input  id="00NA0000001ieJh" maxlength="80" name="00NA0000001ieJh" size="20" type="text" /><br>

<label for="lead_source">Lead Source</label><select  id="lead_source" name="lead_source">

<option value="Marketing: Marketo">Marketing: Marketo</option>

</select><br>

<input type="submit" name="submit">

</form>

...and this (which doesn't):

Screen Shot 2017-11-02 at 3.08.34 PM.png

It seems like something is getting lost in translation. I'm guessing that I'm missing something obvious here.

Highlighted
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

What are the Activity Details for the Call Webhook Activity in a lead's Activity Log? (Click the Activity ID link.)

Highlighted

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Webhook Id:

1

Webhook Name:

Web2Lead (SFDC)

Person ID:

1

Response Code:

1000

Highlighted
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Response Code 1000 means you were calling the webhook from a batch. Can't do that directly. You have to use Request Campaign/Campaign is Requested.

Highlighted

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Thanks Sandy. Here's the corrected log then:

Webhook Name: Web2Lead (SFDC)

Request Type: http_post

Url: https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8

Pay Load:

oid=XXXXXXXXXXX&first_name=Robert2&last_name=Kelen&email=robert.kelen%2Btest2%

40leadous.com

&company=Acme&city=Unknown&state=Unknown&lead_source=Marketing%3A%20Marketo&title=Unknown&00NA0000001ieJh=Unknown&retURL=http://

Response:

Person ID: 1

Response Code: 200

Highlighted
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

OK, so that's a 200 OK on the pure HTTP level, which is good... still not creating an SFDC lead?

Highlighted

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Nope. Still no lead.

Highlighted
Level 10 - Community Moderator

Re: Send Lead Data from MKTO to SFDC Web-to-Lead Form

Set a custom header (I forgot to suggest this before) on the hook:

  Content-Type     application/x-www-form-urlencoded