Webhook to Create a new Salesforce Lead.

Nate_Oosterhous
Level 7

Webhook to Create a new Salesforce Lead.

We have a referral form and would like to create a new lead in Salesforce with fields populated on a referral form.  Does anyone know how to accomplish this?

Our Form's Fields:

REFERRAL INFORMATION (we would like to use these fields to create a new lead in salesforce)

  • These are custom Salesforce fields:
    • Referral First Name
    • Referral Last Name
    • Referral Email Address
    • Referral Company
    • Referral Country
    • Referral Phone
    • Referral Postal Code

YOUR INFORMATION (this is the person referring the lead and who Marketo tracks as the person who filled out the form)

  • These are the standard Salesforce fields:
    • First Name
    • Last Name
    • Email Address
    • Company

Referral Form2.JPG

17 REPLIES 17
Josh_Hill13
Level 10 - Champion Alumni

Re: Webhook to Create a new Salesforce Lead.

There is a similar thread earlier.

I suggest doing a search for "referral form" in the community. you will find a lot of detail on what others have done.

Also, I'm not sure why you mention a webhook here. You would want to use jquery most likely and then pass the information to Marketo first.

Nate_Oosterhous
Level 7

Re: Webhook to Create a new Salesforce Lead.

I have searched the community and can't find anything to accomplish what I am looking for.  I do not know where to start using jquery.

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook to Create a new Salesforce Lead.

I think what Josh is getting at here is you may have an X-Y problem: asking how to do X before researching to find out Y is a better goal.

In this case, you can use SFDC Web-to-Lead directly from the page with the Marketo form, when the form submits. Then you kill both birds from the browser, no webhook necessary.

Nate_Oosterhous
Level 7

Re: Webhook to Create a new Salesforce Lead.

Hi Sanford,

Could you expand a little bit more about what you mean by using the SFDC Web-to-Lead directly from the page with the Marketo form when the form submits?

Thank you

Josh_Hill13
Level 10 - Champion Alumni

Re: Webhook to Create a new Salesforce Lead.

Typing in "referral" to the search box came up with dozens of ideas.

Referral Program widget

Referral program without referral offer feature

Referral offer and referral form

Referral Form Best Practice

here are a few which may be related to your issue.

From your response, I think the best thing to do is design what you want on paper and then go discuss it with your SFDC Admin and/or a developer who knows jquery and Apex code.

What Sanford says will also likely work. What he means is to create a SFDC W2L form in SFDC and have the bottom form post to SFDC to create a lead. If you do not know how to do this, speak with your SFDC Admin or visit support.salesforce.com. They will show you how.

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook to Create a new Salesforce Lead.

In a nutshell, Web-to-Lead is an SFDC feature that allows you to post a simple HTML form (not even a more sophisticated Ajax form) to a URL @ Salesforce.com and have it automatically create and/or route leads.

There's no need for that form to be visible to the user at before it's posted.

So you can use a Marketo form to submit the referrer information and then, using the Marketo Forms API's onSuccess hook, post the referral's information over to SFDC silently, from the same page.

Unfortunately I'm on vacation this week so I may not have a chance to put up my usual demo, but I promise I will early next week.

Nina_Valtcheva5
Level 5

Re: Webhook to Create a new Salesforce Lead.

Sanford Whiteman​ - I'm trying to figure out how to implement this and am stuck on this part on how to tie the Marketo form to the Web2Lead form:

then, using the Marketo Forms API's onSuccess hook, post the referral's information over to SFDC silently, from the same page.

Do you have a demo that you can share?

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook to Create a new Salesforce Lead.

Do you have your Web-to-Lead form generated from SFDC? You'll need to know the fields on that form, and its action attribute (i.e. the form's {{endpoint URL}}.salesforce.com) to invoke it from the Marketo form.

ChantelH
Level 1

Re: Webhook to Create a new Salesforce Lead.

You promised a demo on this one and I desperately need it 🙂 so if you can make that happen, much obliged.