Starting in Zurich, prefilling catalog items via URL parameters no longer requires a client script workaround. This is now a native feature that works seamlessly in both Service Portal and Next Experience.
The ServiceNow documentation includes a subtle mention of this functionality:
But what does that actually mean, How do I use it, and how does it work?
How to use it:
Within your standard Service Portal URLs insert a sysparm_variable_values=
then include your variable values as a JSON string.
For example:
Let's use the "Standard Laptop" demo data Catalog Item
/esc?id=sc_cat_item&sys_id=04b7e94b4f7b4200086eeed18110c7fd
&sysparm_variable_values={"Additional_software_requirements":"Follow Semaphore Partners on Linkedin","acrobat":"true"}
How it works:
Most of the code lives in the Service Portal Widget: "SC Catalog Item" (widget-sc-cat-item-v2).
Starting from line 346 (there are other code blocks, but this is the most important)
if (options.disable_url_prefill == "false" && gs.getProperty(ServiceCatalogConstantsSNC.PROPERTIES.SC_ENABLE_URL_PREFILL, "true") == "true") {
var paramValues = $sp.getParameter("sysparm_variable_values");
if (paramValues != null) {
var variables = {};
try {
variables = JSON.parse(paramValues);
} catch (e) {
// it can be a tinyId
variables = sn_sc.CatalogVariableUtil.getVariablesFromTiny(paramValues);
}
data.variableValueMap = variables;
populateDisplayValues();
}
}
The code includes two primary controls:
• options.disable_url_prefill
from the options schema
• The constant ServiceCatalogConstantsSNC.PROPERTIES.SC_ENABLE_URL_PREFILL
, which points to the system property glide.sc.enable_url_prefill
While the ServiceNow documentation mentions controlling this on a variable basis via "Disable initial slot fill," this option doesn't appear to be available as of the GA release of Zurich.
Practical Use Cases
This feature enables several valuable scenarios:
•Workspace Integration: Prefilling via UI Actions in Workspaces
•Email Communications: Sending links with key fields already populated
•User Convenience: Bookmarking frequently submitted forms with default values
•Portals/ KB: Embedding catalog requests in portal links or knowledge base articles
•Development & Testing: Simplifying testing during development or demos
Important Considerations
Since this functionality is enabled by default in Zurich, consider the following:
- Remove Legacy Code: Eliminate your legacy catalog client scripts—there should be no reason to maintain this legacy code any longer
- Security Review: Ensure you're comfortable with this functionality, as it's now more broadly available compared to previous versions where it was more isolated to specific forms/variables
- Widget Verification: Use the baseline Service Portal Widget "SC Catalog Item" (widget-sc-cat-item-v2) if you had previously cloned it