Skip to content

Pre-filled Configuration Links

A pre-filled configuration link opens the configurator for a customer with selections, quantities, and contact details already set. You construct the link by encoding a JSON instruction object and appending it to the configurator URL as a query parameter.

https://your-configurator-url/?preconfig=ENCODED_JSON

This is useful for CRM integrations, CPQ workflows, marketing campaigns, distributor portals, and any situation where you want to send a customer straight to a ready-made configuration rather than an empty form.


Step 1 — Write the JSON

The instruction object has two top-level keys:

KeyPurpose
configsOne or more product configurations to pre-load
requestFieldsCustomer / request details (email, quote number, etc.)

Full example

{
"configs": [
{
"configName": "My Configuration",
"configQuantity": 1,
"formId": "product-form-name",
"prefills": [
{
"elementId": "color-selection",
"value": "red"
},
{
"elementId": 42,
"value": "SKU-1234"
}
]
}
],
"requestFields": [
{
"requestFieldId": "email",
"value": "customer@example.com"
},
{
"requestFieldId": "quote-number",
"value": "QT-2024-001"
}
]
}

configs fields

Each entry in configs represents one product configuration.

FieldTypeDescription
configNamestringDisplay name shown for this configuration
configQuantitynumberHow many units of this product to configure
formIdstringThe name or identifier of the configurator form to load
prefillsarrayList of elements to pre-select — see below

prefills fields

Each entry in prefills targets a single form element.

FieldTypeDescription
elementIdstring or numberThe slug or numeric ID of the form element. Use a number (no quotes) when referencing by ID
valuestring or number or booleanThe value to set. See accepted value types below

Accepted value types:

Element typeWhat to put in value
Select / radio / checkboxOption slug or product SKU
TextAny string
Number / rangeA number
Toggle / booleantrue or false

requestFields fields

Request fields capture contact or order details shown at checkout.

FieldTypeDescription
requestFieldIdstringThe identifier of the request field
valuestringThe value to insert

Step 2 — URL-encode the JSON

Browsers cannot read raw JSON in a URL — characters like {, ", and spaces must be converted to their percent-encoded equivalents first.

Quickest way:

  1. Copy your JSON
  2. Go to https://urlencoder.org
  3. Paste the JSON and click Encode
  4. Copy the result

Common conversions for reference:

CharacterEncoded
{%7B
}%7D
"%22
:%3A
,%2C
[%5B
]%5D
space%20

Append the encoded JSON to your configurator URL using the preconfig query parameter.

https://your-configurator-url/?preconfig=ENCODED_JSON

Example (before encoding):

https://onboarding.staging.config.mercura.dk/?preconfig={"configs":[...]}

Example (after encoding):

https://onboarding.staging.config.mercura.dk/?preconfig=%7B%22configs%22%3A%5B...%5D%7D

When a customer opens the link, the configurator automatically loads the specified form and applies all pre-selections.


Multiple configurations

You can pre-load more than one configuration in a single link by adding additional entries to the configs array.

{
"configs": [
{
"configName": "Main Unit",
"configQuantity": 1,
"formId": "main-unit-form",
"prefills": [
{ "elementId": "size", "value": "large" }
]
},
{
"configName": "Accessory Pack",
"configQuantity": 2,
"formId": "accessory-form",
"prefills": [
{ "elementId": "color", "value": "black" }
]
}
],
"requestFields": [
{ "requestFieldId": "email", "value": "customer@example.com" }
]
}

Common use cases

Use caseWhat to pre-fill
CRM integrationCustomer email, account name, product based on opportunity
CPQ integrationForm, options, and quantities derived from a quote line
Marketing campaignA specific product model with campaign-relevant defaults
Distributor portalDistributor-specific options and contact details
Quoting workflowFull configuration from a previous quote for revision