SOLVED

Create new person from SFDC Custom field

Go to solution
Highlighted

Create new person from SFDC Custom field

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Create new person from SFDC Custom field

Yes, it is possible.

It has 4 parts:

  1. Create a form to identify this particular lead creation process
  2. Define a webhook that posts data to the special loopback forms endpoint (/save on localhost)
  3. Monitor the webhook for errors using an operational Smart Campaign
  4. Call the webhook from a Smart Campaign of your choosing

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:

http://localhost/index.php/leadCapture/save

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:

pastedImage_12.png

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).

pastedImage_13.png

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.)

View solution in original post

8 REPLIES 8
Highlighted
Level 10 - Community Moderator

Re: Create new person from SFDC Custom field

Yes, it is possible.

It has 4 parts:

  1. Create a form to identify this particular lead creation process
  2. Define a webhook that posts data to the special loopback forms endpoint (/save on localhost)
  3. Monitor the webhook for errors using an operational Smart Campaign
  4. Call the webhook from a Smart Campaign of your choosing

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:

http://localhost/index.php/leadCapture/save

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:

pastedImage_12.png

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).

pastedImage_13.png

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.)

View solution in original post

Highlighted

Re: Create new person from SFDC Custom field

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?

Highlighted
Level 10 - Community Moderator

Re: Create new person from SFDC Custom field

Please open a new thread for this quite different topic.

Highlighted

Re: Create new person from SFDC Custom field

Sure Sanford!

Highlighted

Re: Create new person from SFDC Custom field

Thanks Sanford for the very detailed process set up! I will work with my web team to create the hook!

Highlighted
Marketo Employee

Re: Create new person from SFDC Custom field

Server side form post is unsupported so this is not the best approach to use.

Highlighted
Level 10 - Community Moderator

Re: Create new person from SFDC Custom field

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.

Highlighted

Re: Create new person from SFDC Custom field

Have you looked into Salesforce process builder?

Process builder allows you to create a new record based on a triggered action. For example, you can create a new lead record whenever a lead is created with a value for your custom email field. In the final step of the process you can map which field should map to your new Lead Record.

Once the new lead is created in Salesforce it will then flow into Marketo. (assuming the 2 are synced )

Just an idea..

Let me know if you need assistance with this.