Query String Parameter
In Salesforce URLs and web-to-lead/case forms, a parameter passed in the URL query string (after the ? character) that can prepopulate field values on records or control page behavior when the URL…
Definition
In Salesforce URLs and web-to-lead/case forms, a parameter passed in the URL query string (after the ? character) that can prepopulate field values on records or control page behavior when the URL is loaded.
In plain English
“A Query String Parameter is a parameter passed in a URL after the ? character. In Salesforce, you can use them to prepopulate field values on records or control page behavior when a user clicks a link or submits a web-to-lead form.”
Worked example
A marketing manager at Arrowfern Capital builds a custom URL for a webinar landing page that pre-populates a Web-to-Lead form: the URL ends with ?firstName=John&lastName=Smith&company=Acme. When a recipient clicks the URL, the Web-to-Lead form loads with those Query String Parameters parsed and populated into the corresponding Lead fields automatically. The user reviews the prefilled values and submits, creating a Lead with cleaner data than they'd type by hand. Query String Parameters also drive page behavior - a Visualforce page can read ?productId=xxx from the URL to filter its content. URL-driven configuration is a common Salesforce integration pattern.
Why Query String Parameter matters
In Salesforce URLs and web-to-lead/case forms, a Query String Parameter is a parameter passed in the URL query string (after the ? character) that can prepopulate field values on records or control page behavior when the URL is loaded. For example, a URL like /lightning/o/Account/new?defaultFieldValues=Name=Acme would open a new Account record with Name pre-populated.
Query string parameters are useful for building links that open records with specific values pre-filled, supporting workflows where users click a link and get a partially completed form. They're also used with Web-to-Lead to pass campaign tracking data, UTM parameters, and other context from marketing sources. Mature orgs use query string parameters thoughtfully to reduce data entry friction and improve workflow efficiency.
How organizations use Query String Parameter
Builds email campaign links with query string parameters that pre-populate lead fields based on the campaign.
Uses query string parameters in Salesforce URLs to create quick-create workflows for common scenarios.
Passes UTM parameters through web-to-lead forms to track marketing source attribution.
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is a Query String Parameter?
Q2. What's a common use case?
Q3. Where is the parameter in the URL?
Discussion
Loading discussion…