We're in the process of setting up Salesforce marketing cloud, and hit a couple snags. Basically, we have marketing cloud connect up and running, we see the synced salesforce lead object data extension and can send to it (a filtered one, anyway... Although for some reason personalization variables aren't working yet) BUT:

We want to use cloudpages to host a smart capture form, and we'd like submissions of that form to automatically create a lead in sfdc and use that leadID as the subscriber key. Just can't figure this out.

Basically, the form submission is a new lead submission, meaning it needs to get into sfdc, which uses the LeadID as the Subscriber key, so it makes sense that the smart capture submission needs to use leadID to prevent duplication... Right? Also, how fast is that sync? Would we be able to use the LeadID (or really, other info like lead owner name) on the cloud pages smart capture form confirmation page?

Eg: they user submits a form with their name/email/etc, the landing page says "Hi! Thanks for submitting the form! Here's the unique calendar scheduler link for your rep/lead owner!"

Thanks, in advance!

1 Answer 1


It's hard to give you much more than a few pointers as your question covers quite a number of points. I'll just provide some high-level considerations:

  1. Salesforce is your system of record, so I'd be inclined to just read and write from CRM, rather than use your synchronised data - it is not completely up-to-date
  2. Smart Capture writes to Data Extensions. You would need to do some coding of a Custom Landing Page to implement your business rules and write directly to CRM
  3. You can retrieve CRM leads to try to identify whether you already have the individual captured as a Lead - potentially using Email Address to search for them. See RetrieveSalesforceObjects with AMPScript
  4. You can create new leads using CreateSalesforceObject and it will return the new ID for the Lead. See this example.
  5. You could then do a further RetrieveSalesforceObjects to get any other details of the Lead you have just created, like the Owner information and the likes and display this information on the page.
  6. If you want to send an email to the new lead, I'd recommend again treating CRM as your system of record and have it fire the email on the new lead creation, either through Journey Builder Salesforce Events or Salesforce Triggered Sends

Finally, there's likely going to be quite a lot of reading and writing to CRM in this application you'll be putting together, so I'd recommend separating out your form as a landing page and create a resource that does processing for you based on AJAX calls from your landing page. You'd want to not leave the visitor staring at an unresponsive form while you go and search CRM for their email address, create a new Lead and then read back any other information you need for the confirmation page. An example of a processing page for an unsubscribe page may give you some helpful hints on how to read and write from CRM from a Code Resource page that's accessed with AJAX.

  • Funny, I never thought about that. Using sales cloud web to lead instead. One quick question if you don't mind, I made a filtered data extension off our salesforce synced DE with a single test lead/email address, and although I believe I've mapped them properly the personalization variables didn't sync through. Name was unpopulated in the outgoing email (Hello , good to see you!), and salesforce didn't receive any send data back. How do I go about getting send data to sync back, as well as mapping created email data attributes properly?
    – ModT
    May 31, 2017 at 21:57
  • Web to Lead is a really simple route to go down and easy to set up in Cloud Pages or any other location you can host a few static HTML pages. It won't give you all the functionality you mentioned, like all the confirmation information you want to see on the confirmation page. But this would be far, far cheaper to do and way easier to maintain with no real custom stuff needed.
    – Macca
    May 31, 2017 at 23:47
  • For your personalisation problem, it's very much a different question. Could you create another question for it, detailing the Data Extensions you have set up and the field mapping you've done to profile attributes. I would personally add any fields you need for personalisation to this sendable DE, rather than depend on Profile Attribute Mapping. I'd then just refere to the fields in the DE. Others would have other ideas on the matter.
    – Macca
    May 31, 2017 at 23:47
  • @Macca In theory, wouldn't it be possible to write custom AMPScript (CreateSalesforceObject) in the triggered send email that could get fired upon Smart Capture form submission so that upon submitting the Smart Capture form, that will effectively create a new lead?
    – Mike Marks
    Nov 27, 2018 at 19:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .