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_JSONThis 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:
| Key | Purpose |
|---|---|
configs | One or more product configurations to pre-load |
requestFields | Customer / 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.
| Field | Type | Description |
|---|---|---|
configName | string | Display name shown for this configuration |
configQuantity | number | How many units of this product to configure |
formId | string | The name or identifier of the configurator form to load |
prefills | array | List of elements to pre-select — see below |
prefills fields
Each entry in prefills targets a single form element.
| Field | Type | Description |
|---|---|---|
elementId | string or number | The slug or numeric ID of the form element. Use a number (no quotes) when referencing by ID |
value | string or number or boolean | The value to set. See accepted value types below |
Accepted value types:
| Element type | What to put in value |
|---|---|
| Select / radio / checkbox | Option slug or product SKU |
| Text | Any string |
| Number / range | A number |
| Toggle / boolean | true or false |
requestFields fields
Request fields capture contact or order details shown at checkout.
| Field | Type | Description |
|---|---|---|
requestFieldId | string | The identifier of the request field |
value | string | The 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:
- Copy your JSON
- Go to https://urlencoder.org
- Paste the JSON and click Encode
- Copy the result
Common conversions for reference:
| Character | Encoded |
|---|---|
{ | %7B |
} | %7D |
" | %22 |
: | %3A |
, | %2C |
[ | %5B |
] | %5D |
| space | %20 |
Step 3 — Build the link
Append the encoded JSON to your configurator URL using the preconfig query parameter.
https://your-configurator-url/?preconfig=ENCODED_JSONExample (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%7DWhen 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 case | What to pre-fill |
|---|---|
| CRM integration | Customer email, account name, product based on opportunity |
| CPQ integration | Form, options, and quantities derived from a quote line |
| Marketing campaign | A specific product model with campaign-relevant defaults |
| Distributor portal | Distributor-specific options and contact details |
| Quoting workflow | Full configuration from a previous quote for revision |