Creating Dynamic Prefill Links With Salesforce Merge Fields

September 17, 2024

Using query parameters and Salesforce merge fields, you can create personalized prefill links and use them in Salesforce. These custom prefill links can populate your form with the user’s information from Salesforce.

Youtube Embed Poster: ZOpGm7aT4Js

Adding Dynamic Prefill Links in Salesforce Emails

  1. In the Form Builder, go to Publish > Prefill > Salesforce Prefill and copy your prefill link. See How to Prefill Your Form Using Data From Salesforce for more information.
The Copy Link button in Jotform Salesforce Prefill
  1. In Salesforce, create or edit an email template.
  2. In the editor, insert your prefill link, then add ?jf_field=sf_field to the URL.
A custom prefill link in a Salesforce email template

For example

https://form.jotform.com/1234567890/prefill/73616d706c65?jf_field=sf_field
  1. Replace jf_field with your form field’s unique name. See How to Find Field IDs and Unique Names for more information.
A field's unique name in the Form Builder
  1. Replace sf_field with a Salesforce merge field.
An Insert button in Salesforce's Insert Merge Field dialog

The resulting URL should have a key-value parameter similar to the following:

https://form.jotform.com/1234567890/prefill/73616d706c65?email={{{Recipient.Email}}}

For multiple parameters, separate them with an ampersand (“&”).

A URL with multiple query parameter in a Salesforce email template

For example

https://form.jotform.com/1234567890/prefill/73616d706c65?email={{{Recipient.Email}}}&phone={{{Recipient.Phone}}}

Once your template is saved, Salesforce will automatically populate each merge field with the appropriate data when sending emails. The data is transferred to your form when a user follows your custom link. For example

https://form.jotform.com/242388828502059/prefill/019191ef26d77fe39fd7e092b464634f6c70?email=demo@example.com&phone=(876) 555-0123

Using Dynamic Prefill Links in Your Salesforce Console

  1. On your Salesforce app’s Setup page, open Object Manager.
The Object Manager tab in Salesforce
  1. Edit an object and add a new button or link.
A New Button or Link option in Salesforce Object Manager
  1. Enter your desired details and options.
  2. Leave the Content Source as “URL.”
A New Button or Link configuration page in Salesforce Object Manager
  1. Enter your form’s prefill link with query parameters. Use Select Field Type and Insert Field to generate merge fields.
  2. Save your settings.
A dynamic prefill link in a Salesforce Contact object

Once configured, you can add your custom links to page layouts.

The Custom Links tab in Salesforce Page Layouts

Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Podo Comment Be the first to comment.