Data Reference
When a quote is generated, Mercura sends a structured data set to your template. Every tag starting with d. reads from this data. This page describes every part of it, using a real quote for a welding robot configuration as the example.
Overview
This is the shape of the data, shortened for readability:
{ "id": 2586, "name": "Jane Doe", "email": "jane.doe@example.com", "origin_request_id": null, "revision_number": 1, "configuration_name": "Project name", "user": { "name": "Alex Seller", "email": "alex@yourcompany.com", "...": "..." }, "conf_total": 516551, "vat_total": 0, "currencyCode": "DKK", "countrySlug": "DK", "languageSlug": "en", "extra_fields": [ { "name": "Commercial Terms", "fields": [ "..." ] } ], "form_submissions": [ { "name": "Configuration", "quantity": 1, "price": "516551.00", "form": { "name": "Migatronic CoWelder V2", "data": { "elements": [ "...every question and the selected options..." ] }, "bom": { "tables": [ "..." ], "summary": { "rows": [ "..." ] } } } } ], "created_at": "2026-09-17T08:52:37.000000Z", "updated_at": "2026-09-17T08:52:37.000000Z"}The data has four main areas:
| Area | What it contains | Typical use |
|---|---|---|
| Quote details (top level) | Quote number, customer, totals, currency, language, dates | Headers, address blocks, totals |
user | The Mercura user who created the quote | ”Your contact” section |
extra_fields | The request fields filled in when the quote was submitted | Commercial terms, project info |
form_submissions | The configuration(s): every form element with its selected options, and the BoM | Product tables, specifications, images |
Quote details
| Field | Tag | Example value | Description |
|---|---|---|---|
id | {d.id} | 2586 | The quote (request) ID. |
revision_number | {d.revision_number} | 1 | Revision of the quote. Combine with the ID for a quote number: {d.id}-{d.revision_number}. |
origin_request_id | {d.origin_request_id} | null | ID of the quote this one was copied from, if any. |
name | {d.name} | Jane Doe | Customer name from the request fields. |
email | {d.email} | jane.doe@example.com | Customer email from the request fields. |
configuration_name | {d.configuration_name} | Project name | The name given to the configuration. |
conf_total | {d.conf_total} | 516551 | Total price of the quote as a number, excluding VAT. |
vat_total | {d.vat_total} | 0 | Total VAT amount as a number. See VAT. |
currencyCode | {d.currencyCode} | DKK | ISO currency code of the quote. |
countrySlug | {d.countrySlug} | DK | Country code of the quote. |
languageSlug | {d.languageSlug} | en | Language the quote was made in. Useful for language-dependent text. |
created_at | {d.created_at} | 2026-09-17T08:52:37.000000Z | Creation date and time (UTC). Format it with formatD. |
updated_at | {d.updated_at} | 2026-09-17T08:52:37.000000Z | Last update date and time (UTC). |
User (sales contact)
The user object describes the Mercura user who created the quote.
| Tag | Example value | Description |
|---|---|---|
{d.user.name} | Alex Seller | Full name. |
{d.user.email} | alex@yourcompany.com | Email address. |
{d.user.username} | alex@yourcompany.com | Login name. |
{d.user.level} | admin | User level. |
{d.user.company_id} | 1 | Company ID. |
{d.user.discount_group_id} | null | The user’s discount group, if any. |
{d.user.extra_fields} | [] | Additional user fields, if configured. |
Request fields (extra_fields)
extra_fields contains the request fields filled in when the quote was submitted. It is a list of tabs, and every tab has a list of fields.
"extra_fields": [ { "id": 2, "name": "Commercial Terms", "translation": { "da_name": null, "de_name": null, "...": "..." }, "fields": [ { "name": "Warranty", "slug": "warranty", "type": "textarea", "value": "", "translation": { "da_name": "Garanti" } }, { "name": "Payment", "slug": "payment", "type": "textarea", "value": "", "translation": { "da_name": "Betaling" } }, { "name": "Delivery", "slug": "delivery", "type": "textarea", "value": "", "translation": { "da_name": "Levering" } }, { "name": "Delivery Conditions", "slug": "delivery-conditions", "type": "textarea", "value": "", "translation": { "da_name": "Leveringsbetingelser" } } ] }]| Field | Description |
|---|---|
name | Name of the tab (for example Commercial Terms). |
translation | Translated tab names, one key per language (da_name, de_name, …). |
fields[].name | Label of the field. |
fields[].slug | A stable identifier for the field. Use the slug to look up a field, because labels can change. |
fields[].type | Field type: text, number, textarea, checkbox or select. |
fields[].value | The value entered by the customer. Empty string when left blank. |
fields[].translation | Translated field labels, for example da_name. |
The easiest way to print a single field is to search for it by its slug:
Warranty: {d.extra_fields[name='Commercial Terms'].fields[slug='warranty'].value}Danish label: {d.extra_fields[name='Commercial Terms'].fields[slug='delivery-conditions'].translation.da_name}To print all fields of a tab, use a loop.
Configurations (form_submissions)
form_submissions is a list of the configurations in the quote. Most quotes contain a single configuration, which you access with form_submissions[0].
| Tag | Example value | Description |
|---|---|---|
{d.form_submissions[0].name} | Configuration | Name of the configuration line. |
{d.form_submissions[0].quantity} | 1 | Quantity of this configuration. |
{d.form_submissions[0].price} | 516551.00 | Price of this configuration. Note: this is text, see Calculations. |
{d.form_submissions[0].index} | 0 | Position of the configuration in the quote. |
{d.form_submissions[0].form.id} | 2368 | ID of the configurator form. |
{d.form_submissions[0].form.name} | Migatronic CoWelder V2 | Name of the configurator form. |
{d.form_submissions[0].form.description} | null | Description of the form. |
Each configuration has two views of what the customer selected:
form.data.elements: the raw configuration. Every element of the form (as built in the Form Builder) with the options that were selected, including images, descriptions and product properties.form.bom: the Bill of Materials exactly as you designed it in the BoM Builder, with tables, groups, columns, subtotals and formatted prices.
Form elements (form.data.elements)
Path: d.form_submissions[0].form.data.elements
A list with one entry per form element, in form order. There are two types of elements.
Elements with options
Questions where the customer selects one or more options, such as a dropdown, radio buttons or product selection.
{ "id": 51824, "label": "Robot", "slug": 51824, "image": "", "description": "", "groupId": 11720, "groupSlug": 11720, "groupLabel": "Solution", "type": "element-with-options", "options": [ { "id": 2032561, "label": "UR12e", "slug": "36940412", "image": "https://…/32b460c6….webp", "description": "UR12e incl. MigaWeld", "defaultPrice": 398870, "price": 398870, "costPrice": 0, "basePrice": 398870, "margin": 100, "discount": 0, "quantity": 1, "productProperties": { "default-selected": "Default Track", "solution": "MotionPlus", "type": "Robot" }, "optionExtraFields": [] } ]}Elements without options
Free-input elements, such as a number or text field. They have a value instead of options.
{ "id": 52890, "label": "Software discount in %", "slug": 52890, "groupId": 11895, "groupLabel": "Software", "type": "element-without-options", "value": "50"}Element fields
| Field | Description |
|---|---|
id | Unique ID of the element. |
label | The element label, for example Robot or Software for PowerSource. |
slug | Identifier of the element. |
image | Image URL of the element, or an empty string. |
description | Description of the element, or an empty string. |
groupId, groupSlug | ID of the group (step) the element belongs to. |
groupLabel | Name of the group (step), for example Solution, Software or Freight. |
type | element-with-options or element-without-options. |
options | List of selected options (only for element-with-options). |
value | The entered value (only for element-without-options). Stored as text. |
Option fields
| Field | Description |
|---|---|
id | Product or option ID. |
label | Name of the selected option or product, for example UR12e. |
slug | Identifier of the option. For products this is usually the article number (SKU). |
image | Image URL, or an empty string when the option has no image. |
description | Description text. Can contain line breaks and Markdown. |
price | Final sales price of the option as a number. Negative for discount lines. |
defaultPrice | Default price before adjustments. |
basePrice | Base price. |
costPrice | Cost price. |
margin | Margin in percent. |
discount | Discount applied to the option. |
quantity | Selected quantity. |
productProperties | The product’s properties as name/value pairs, for example type, solution or welding-method. Empty list when the option has none. |
optionExtraFields | Additional option fields, if configured. |
value | Selected value for value-based options (for example DK for a country). |
Example tags:
Selected robot: {d.form_submissions[0].form.data.elements[label='Robot'].options[0].label}Robot type: {d.form_submissions[0].form.data.elements[label='Robot'].options[0].productProperties.type}Software discount: {d.form_submissions[0].form.data.elements[label='Software discount in %'].value} %Bill of Materials (form.bom)
Path: d.form_submissions[0].form.bom
The BoM follows the structure of the BoM Builder:
bom├── tables[] One entry per BoM table│ ├── label "CoWelder Quote"│ ├── headerColumns[] Column definitions (label, field, width, alignment)│ ├── numColumns Number of columns│ └── groups[] Sections inside the table│ ├── label "Essentials", "Software", …│ └── rows[] Rows inside the group│ ├── type "element-with-options" or "subtotal"│ ├── label "Robot", "Total discount", …│ ├── optionRows[] One line per selected option (form element rows)│ │ └── optionColumns[] One cell per column: field, value, rawValue│ └── subtotals[] One cell per column (subtotal rows)└── summary ├── label "Total" └── rows[] label, value, rawValueTables
| Field | Example | Description |
|---|---|---|
id | 44 | Table ID. |
label | CoWelder Quote | Table title. |
headerColumns | see below | Columns of the table, in order. |
numColumns | 3 | Number of columns. |
groups | see below | Groups (sections) in the table. |
Access a table by position (tables[0]) or by its label (tables[label='Discounts']).
Header columns
| Field | Example | Description |
|---|---|---|
id | 126 | Column ID. |
label | Description | Column heading. |
field | name | What the column shows, for example name, sku or sales_price. |
widthPercentage | 50 | Column width in percent. |
alignment | left | left, center or right. |
Groups and rows
| Field | Description |
|---|---|
groups[].label | Group heading, for example Essentials. |
groups[].colSpan | Number of columns the group heading spans. |
groups[].rows[].type | element-with-options for product rows, subtotal for subtotal rows. |
groups[].rows[].label | Row label, usually the form element label (for example Software for Robot). |
groups[].rows[].optionRows | One entry per selected option in that element. |
groups[].rows[].subtotals | Only on subtotal rows: one cell per column. |
Option rows and cells
Every entry in optionRows represents one line in the BoM and contains one cell per column in optionColumns:
{ "id": "2032561-51824", "product_id": 2032561, "option_id": null, "optionColumns": [ { "field": "name", "value": "UR12e", "rawValue": ["UR12e"], "alignment": "left", "isMarkdown": false }, { "field": "sku", "value": "36940412", "rawValue": ["36940412"], "alignment": "center", "isMarkdown": false }, { "field": "sales_price", "value": "398,870.00 kr", "rawValue": [398870], "alignment": "right", "isMarkdown": false } ]}| Field | Description |
|---|---|
field | The column this cell belongs to (name, sku, sales_price, …). |
value | The display value, already formatted (for example 398,870.00 kr). |
rawValue | The unformatted value as a list. Use rawValue[0] for calculations or native numbers in Excel. |
alignment | left, center or right, as set in the BoM Builder. |
isMarkdown | true when the value is Markdown text. |
The best way to read a cell is to search by its field, so your template keeps working when columns are reordered:
{d.form_submissions[0].form.bom.tables[0].groups[0].rows[0].optionRows[0].optionColumns[field='name'].value}Subtotal rows
Rows with type subtotal have subtotals instead of optionRows:
{ "id": 1419, "type": "subtotal", "label": "Total discount", "subtotals": [ { "field": "name", "value": "", "rawValue": null }, { "field": "sales_price", "value": "-78,290.00 kr", "rawValue": -78290 } ]}Note that rawValue in a subtotal is a single number, not a list.
Summary
The BoM summary holds the grand totals defined in the BoM Builder:
{d.form_submissions[0].form.bom.summary.label} → Total{d.form_submissions[0].form.bom.summary.rows[0].label} → Total price{d.form_submissions[0].form.bom.summary.rows[0].value} → 516,551.00 kr{d.form_submissions[0].form.bom.summary.rows[0].rawValue} → 516551