Good day,
I am looking for a way to create a new person/lead based on an email address that is stored in a SFDC Custom Field. I have synced the SFDC Customer Field to Marketo. Now I am trying to use the data (an email) in that field to create a new person. Is this even possible? If yes, how?!? I was thinking to use the data in the field as a token to create a new lead, but I see nowhere the possibility in a flow to create a new lead. Any ideas?
Thanks,
Marit.
Solved! Go to Solution.
Yes, it is possible.
It has 4 parts:
Part 1
Just create a Design Studio form. You do not have to edit it in any way; the default fields are fine, so you can save and approve it immediately. You just need to know the form ID, which will be in the URL. You'll want to give the form an informative name, like Create Lead from Such-and-Such SFDC Field. This name will show up in the Activity Log for the new lead, so you want to know what it means immediately and not confuse it for a public-facing form.
Part 2
Define a webhook like so:
URL:
Request Type:
POST
Template:
Email={{lead.Secondary Email Field}}&munchkinId={{system.munchkinId}}&formid=4567&retURL=success
Of course substitute your real field name and the numeric form ID in place of 4567.
Request Token Encoding:
Form/Url
Response Type:
None
Here's a screenshot:
Part 3
You want to make sure this webhook always returns an HTTP 302 response. Any other response code is an error. So create a campaign that listens for errors and set up alerts/subscriptions/etc. accordingly (how to react to errors is up to you).
Part 4
Create a trigger Smart Campaign with a Call Webhook flow step to call your new Upsert Lead from Field webhook as needed. What to trigger on is up to you as we aren't familiar with the details of your workflow (whether this field is only filled in once on new leads, if it gets updated over time, etc.).
Also note the webhook definition above is actually an upsert (merge or insert). If it encounters the same email address more than once, it will not add more and more new leads. I assume that's the desired behavior. (Not always creating a new lead with a duplicated email address, every time.)
Yes, it is possible.
It has 4 parts:
Part 1
Just create a Design Studio form. You do not have to edit it in any way; the default fields are fine, so you can save and approve it immediately. You just need to know the form ID, which will be in the URL. You'll want to give the form an informative name, like Create Lead from Such-and-Such SFDC Field. This name will show up in the Activity Log for the new lead, so you want to know what it means immediately and not confuse it for a public-facing form.
Part 2
Define a webhook like so:
URL:
Request Type:
POST
Template:
Email={{lead.Secondary Email Field}}&munchkinId={{system.munchkinId}}&formid=4567&retURL=success
Of course substitute your real field name and the numeric form ID in place of 4567.
Request Token Encoding:
Form/Url
Response Type:
None
Here's a screenshot:
Part 3
You want to make sure this webhook always returns an HTTP 302 response. Any other response code is an error. So create a campaign that listens for errors and set up alerts/subscriptions/etc. accordingly (how to react to errors is up to you).
Part 4
Create a trigger Smart Campaign with a Call Webhook flow step to call your new Upsert Lead from Field webhook as needed. What to trigger on is up to you as we aren't familiar with the details of your workflow (whether this field is only filled in once on new leads, if it gets updated over time, etc.).
Also note the webhook definition above is actually an upsert (merge or insert). If it encounters the same email address more than once, it will not add more and more new leads. I assume that's the desired behavior. (Not always creating a new lead with a duplicated email address, every time.)
Thanks Sanford Whiteman fro a detailed summary. This is really helpful. I do need to sync salesforce custom field with marketo, Could you please help me with that as well?
Please open a new thread for this quite different topic.
Sure Sanford!
Thanks Sanford for the very detailed process set up! I will work with my web team to create the hook!
Server side form post is unsupported so this is not the best approach to use.
Well, it's still in rampant use, even in an official doc about creating duplicates. As long as it works, people will use it.
Of course for me it's just as easy to loop back through a reverse proxy. Other people do not have the skills for that setup, nor the luxury of a robust martech infrastructure to draw on. So I don't want to steer people toward a greater technical burden.
@SanfordWhiteman I am not a developer but was able to create your logic in my instance and it worked. It was perfect since April 2022. I created 3 webhooks (all the same logic) since we wanted to capture up to 3 referral email addresses to then create or update an existing record. I then have another program that sends the referrals an eBook PDF via email. Basically the landing page/form is for existing contacts in our database so they can refer others to receive a PDF book. I created 3 additional email & name fields on the referrer's record to track who they referred. Then on the referee's record, it will show who referred them in the "Referred by Full Name" field.
In the last 2 weeks it stopped working and I am getting an error.
Error string: Server Returned code 404
I believe this URL is no longer working/supported as part of the webhook.
Hi @SanfordWhiteman, I have the same problem as @Anthony_Baldman since April with the same 404 error code running with my webhook. Support told me to replace by an API but do you have any other solutions please?
Thanks for your help.