Re: Use webhook to add lead to SFDC campaign?

Anonymous
Not applicable

Use webhook to add lead to SFDC campaign?

Is it possible to add a lead to a Salesforce campaign with a webhook?  I don't know if this is possible, and just started using webhooks last week.  I've read the basic webhook guide and also looked through the existing discussions.  Still unsure
Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: Use webhook to add lead to SFDC campaign?

Yes, it is possible.  Obviously, Marketo has built-in integration with SFDC--but sometimes you need to transfer a lead to an SFDC instance other than your own.

The key is to first enable Web-To-Lead in SFDC in the target system.  Salesforce provides some HTML code, and within that is the HTTP POST URL, along with the field names.  Skip using the code provided and build a URL for the webhook, which will look something like this--replaicing the X's below with the target SFDC's OID.

https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&oid=XXXXXXXXXXXXXXX&email={{lead.Email Address}}&first_name={{lead.First Name}}&last_name={{lead.Last Name}}&phone={{lead.Phone Number}}&company={{company.Company Name}}

You can add additional fields using Marketo tokens--just make sure you have the field name from SFDC properly identified. 


Anonymous
Not applicable

Re: Use webhook to add lead to SFDC campaign?

Thank you for this. Mine wasn't working and the two things that fixed it were:

1. add the oid=
2. concatenate the Post URL with the Payload template so that
   Post URL := Post URL + Payload template
Elliott_Lowe1
Level 9 - Champion Alumni

Re: Use webhook to add lead to SFDC campaign?

Steve, the Web-to-Lead technique you described seems as though it is only for creating a new SFDC Lead.  We want to use a webhook to set a custom field value on the Campaign Member record an existing SFDC Lead / Contact.  How would you accomplish that?