Prefill Salesforce Forms

There are several methods to update data that already exists in Salesforce. This article discusses each of these methods and when to use them. 

  1. Upsert
  2. Dynamic Prefill
  3. Advanced Prefill
  4. Prefill by URL Query String
  5. Default Values

💡 To decide which method to use, you will need to answer 2 questions

  1. How will this form be accessed?
  2. Do you want the existing Salesforce data to be visible on the form?



Upsert

The Upsert mechanism allows us to specify matching criteria on a field. If a record with this criteria is found we update its fields with what has been submitted. If no record is found, we create a new record with the submission data. 

 

  1. How will the form be accessed?
    Upsert is best used with blank forms on a public website. Your end-users will find this form by browsing, on a search engine or another non-personalized mechanism.

  2. Do you want the existing Salesforce data to be visible on the form?
    No. If you don't want to expose any Salesforce data on the form then upsert is a good method to use. This is also useful if there is no login or security on your website page where the form is hosted.

    Use cases: Lead or Contact updates, Linking submissions from the same person to a contact when visitors come to a public website.



Dynamic Prefill

Our Dynamic Prefill mechanism allows you to prefill your form fields with data from Salesforce records. The data is live and up-to-date when the form is refreshed - this is why it is called “dynamic” since we don’t pass prefill data directly in the url. 

 

  1. How will the form be accessed?
    The form must be accessed through a link you send to the user. The link can be downloaded into a CSV and sent out manually, sent to an email address on the form using our Send By Email feature, or saved on the Primary record. Once the link is on the record, you can use email automation (Salesforce, Pardot, Marketing Cloud, MailChimp, etc) or SMS tools like Mogli (https://www.mogli.com/) to send out your prefilled form. The key is that the user has a unique link to load a prefilled form.

  2. Do you want the existing Salesforce data to be visible on the form?
    Yes. If you want to expose some Salesforce data on the form to allow the user to update it or to link new records to existing records then Dynamic Prefill is the right approach.

    Use cases: Lead or Contact updates, Linking submissions from the same person to a contact when visitors come to a public website, Update of previously saved application data, Case updates, RMA processes. 

 

Advanced Prefill

Advanced Prefill is a versatile way to search for a specific record in Salesforce to use as the source for prefill. It is programmatic and allows searching Salesforce using complex criteria that can be determined at runtime.

 

  1. How will the form be accessed?
    * The link to the prefilled form can be determined beforehand and emailed out when the search criteria is known beforehand. This is similar to Dynamic Prefill.
    * The link to the prefilled form can be generated at runtime when an end-user visits the webpage hosting the form. For example, if the page is on a portal, you can use the user id or other session data to find a profile or related record to load and update.

  2. Do you want the existing Salesforce data to be visible on the form?
    Yes or no. You can choose to prefill salesforce data on the form if a match is found for the provided search criteria. Or you can choose to find a record-id to use to link newly submitted information to. You would prefill a hidden id field on the form.

    Use cases: Personalized forms behind an authenticated portal. Use authentication provided by a portal system to protect access to a form with prefilled information (Wordpress, Drupal, Magentrix, Student information systems). All other prefill use cases.

    🔺 Advanced prefill is not available on NativeCloud. 

 

Prefill by URL Query String

Prefilling forms by URL is the most common method with form builders. We rarely recommend this method because it requires pulling actual data out of Salesforce into insecure email systems. We recommend encrypted Dynamic Prefill URLs that pull live data on access. With that said this is a great and simple mechanism in some scenarios. 

 

  1. How will the form be accessed?
    The link to the form with field parameters to prefill are sent out by email or found on a public site or Community.

  2. Do you want the existing Salesforce data to be visible on the form?
    Yes - but data that is not of great security or privacy concern.

    Use cases: Event feedback with a Campaign ID in URL, Contact Us forms with UTM tracker codes, Forms with predetermined data that is not in Salesforce but is available to the email marketing system sending out the links. 



Default Values

In many cases you may want to pre-determine a static default value for one or more fields in a form. This is supported within the app in each field's settings. The benefit of setting the default value in-app instead of setting in a URL parameter is that you can pass simple URLs to end-users that don’t bring attention to the default value and so that the default value is managed in a central place (in the Form Editor in-app). The other benefit is that for Lookup or Salesforce Search fields, you can search for a record in-app without copying-pasting record IDs.   

 

  1. How will the form be accessed?
    The hosted or embedded link to the form is sent out by email or found on a public site or Community.

  2. Do you want the existing Salesforce data to be visible on the form?
    Yes - but data that is not of great security or privacy concern.

    Use cases: Event feedback with a Campaign ID in URL, Contact Us forms with UTM tracker codes, Forms with predetermined data that is not necessarily in Salesforce but will be the same for all users of this form. 
Was this article helpful?
5 out of 15 found this helpful

Comments

0 comments

Article is closed for comments.