1

I have a Cloud Page with a Smart Capture form. The Smart capture form works as intended and stores the information into a specific Data Extension.

In addition to that, I would like to capture the POST data via AMPSCRIPT upon submission(or after) and insert a Lead record in Salesforce with CreateSalesforceObject function. How do I do this? It doesn't seem to work with normal IF RequestParameter(" Submitted").

Any advise is highly appreciated (but I would like to keep the Smart capture form as it's more user friendly.

3
  • How time sensitive is the creation of the lead? You could also have the quite user friendly way of having that data extension as a start of a journey and create/ update the lead via Journey Builder Activities. But this option would have a delay up to 1h.
    – DonL
    Commented Mar 13, 2020 at 7:07
  • I would generally not recommend using data extensions to capture and address new salesforce leads as this will cause duplicate records after those have been created in Salesforce CRM and synced back to Salesforce. The more robust approach, even if less user friendly is described here: salesforce.stackexchange.com/q/297634/31594 Commented Mar 13, 2020 at 10:17
  • Thank you @StephandePaly and DonL - just wanted to let you know I found a workaround. I added an additional sync AJAX call prior submission and then continue with the SmartCapture form. I agree - should not try to create duplicates. I wanted to use Cloud pages, in a user-friendly way (hence smartcapture forms with min customization) and since Marketers want to be able to ensure everyone is captured correctly, DE is easier to manage. As for Journey Builder - I use it, but after the form (with automation) - as I wanted to use the SFDC ID as Subscriber key. Thank you both for the support.
    – Miha Iancu
    Commented Mar 31, 2020 at 9:38

1 Answer 1

0

Configure and use an additional AJAX call post-validation and before submission. The AJAX call sends the form fields values to an AMPSCRIPT page that only creates Lead in Salesforce, returning the ID (later passed and stored via the Smartcapture form as well). Not a very straightforward solution, but felt appropriate to be able to use Smart Capture forms, and still send data to SFDC.

You must log in to answer this question.

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