Seems like a simple request but I can’t figure this out. Using Smart Capture forms, I’d like to update or add new records to a data extension. Adding new records works as expected, but if the record exists, the form will not submit.

I know this is possible using Web Collect and DEManager but I’d like to get this working with Smart Capture to be built using drag-and-drop components. I’ve tried adding hidden fields with no luck.

Salesforce documentation states this is possible but it’s not very clear how to configure. Any help is appreciated, thank you!



3 Answers 3


I don't think this is possible as Smart Capture forms seem to be "insert" only.

This leads to the behavior that the form in your case does not submit due to a primary Key Violation (inserting the same key twice is not allowed).

A workaround to keep the drag-and-drop functionality can be to remove all Primary Keys from the data extension behind the form. Basically, keep this data extension as "dumb" as possible in terms of validation to accept all kinds of user input.

For each record inserted, populate a date field ("timestamp") with a default value of "now" (getdate() ) to discern the latest entry and use backend processing via e.g. SQL to create a "clean" data extension without duplicates, by e.g. keeping the newest entry.

Then use the cleaned up DE for any further processes.

To address your followup questions:

Can SSJS/AMPscript be used to display a message on the page that a record already exists and has been updated?


Send the user to the page using CloudpagesUrl AMPScript function: This establishes the "user context" on the cloudpage, meaning that the personalization string %%_subscriberkey%% will resolve to the user's subscriber key. From this you can basically get all the user's data.

AMPscript can be used to perform a Lookup into your Data extension and check if there is an existing record with e.g. the same subscriber Key or email. However, we are of course leaving point-and-click territory here ;)

Can the cleaned up de be used as the entry event into a journey?


That is pretty much the idea. accept all data into a validation-less data extension. Validate in the backend and clean up your data. use the cleaned up DE as source for a Journey that e.g. sends validated Leads and Contacts to Salesforce.

Create the SQL query that performs the cleanup and save it in an automation.

Next, build your journey. Set the Journey to Entry source: Data extension. Select your cleaned up DE as that Data Extension.

Next, set as Entry Source Schedule: "Automation" Select your Automation built earlier. Finish building the Journey as you wish.

Once you activate your Journey, navigate to the automation referenced. You will see the activation placed a "diamond" style icon behind the last step of the automation, which represents the injection of its result into the Journey.

  • Thanks for the reply, Jonas! I have a couple questions.1. Can SSJS/AMPscfipt be used to display a message on the page that a record already exists and has been updated? 2. Can the cleaned up de be used as the entry event into a journey? Right now, records in the de behind the form are injected into the journey. Salesforce documentation makes it seem like an upsert is possible with Smart Capture by I can’t find any code samplea on any of the support pages or forums. Thanks again for your help, I’ll build the cleaned up de and comment back the results.
    – Kyle Szabo
    Feb 28, 2019 at 13:11
  • @KyleSzabo edited my answer to address your followup questions Mar 1, 2019 at 15:42
  • Thanks again for your help with this, I really appreciate it! Instead of using a scheduled automation as the entry source, is it possible to trigger the journey once the Smart Capture “dumb” form is submitted? Otherwise I can build an html form using Web Collect and DEManager that supports upsert.
    – Kyle Szabo
    Mar 1, 2019 at 15:58
  • Unfortunately, this does not work together with the Smart Capture entry event, no. It is a bit of a tradeoff. When using the drag and drop functionality of Content Builder, I would rather have a slower but clean scheduled process than a direct interface with messy data, but if your usecase requires immediate AND clean data, you would better resort to custom code (JS / ampscript) and forget about Drag and Drop :) Mar 1, 2019 at 16:01

I am seeing updated documentation where it says that "Upsert to Data Extension" is now available for Smart Capture.

This is done via Smart Capture Form Actions

Please see additional resources:




It seems like this is being solved in the june release https://help.salesforce.com/articleView?id=sf.mc_rn_june_2021_cp_smart_capture.htm&type=5

  • While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – identigral
    Jun 6, 2021 at 4:23

You must log in to answer this question.

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