Skip to content

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:

AreaWhat it containsTypical use
Quote details (top level)Quote number, customer, totals, currency, language, datesHeaders, address blocks, totals
userThe Mercura user who created the quote”Your contact” section
extra_fieldsThe request fields filled in when the quote was submittedCommercial terms, project info
form_submissionsThe configuration(s): every form element with its selected options, and the BoMProduct tables, specifications, images

Quote details

FieldTagExample valueDescription
id{d.id}2586The quote (request) ID.
revision_number{d.revision_number}1Revision of the quote. Combine with the ID for a quote number: {d.id}-{d.revision_number}.
origin_request_id{d.origin_request_id}nullID of the quote this one was copied from, if any.
name{d.name}Jane DoeCustomer name from the request fields.
email{d.email}jane.doe@example.comCustomer email from the request fields.
configuration_name{d.configuration_name}Project nameThe name given to the configuration.
conf_total{d.conf_total}516551Total price of the quote as a number, excluding VAT.
vat_total{d.vat_total}0Total VAT amount as a number. See VAT.
currencyCode{d.currencyCode}DKKISO currency code of the quote.
countrySlug{d.countrySlug}DKCountry code of the quote.
languageSlug{d.languageSlug}enLanguage the quote was made in. Useful for language-dependent text.
created_at{d.created_at}2026-09-17T08:52:37.000000ZCreation date and time (UTC). Format it with formatD.
updated_at{d.updated_at}2026-09-17T08:52:37.000000ZLast update date and time (UTC).

User (sales contact)

The user object describes the Mercura user who created the quote.

TagExample valueDescription
{d.user.name}Alex SellerFull name.
{d.user.email}alex@yourcompany.comEmail address.
{d.user.username}alex@yourcompany.comLogin name.
{d.user.level}adminUser level.
{d.user.company_id}1Company ID.
{d.user.discount_group_id}nullThe 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" } }
]
}
]
FieldDescription
nameName of the tab (for example Commercial Terms).
translationTranslated tab names, one key per language (da_name, de_name, …).
fields[].nameLabel of the field.
fields[].slugA stable identifier for the field. Use the slug to look up a field, because labels can change.
fields[].typeField type: text, number, textarea, checkbox or select.
fields[].valueThe value entered by the customer. Empty string when left blank.
fields[].translationTranslated 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].

TagExample valueDescription
{d.form_submissions[0].name}ConfigurationName of the configuration line.
{d.form_submissions[0].quantity}1Quantity of this configuration.
{d.form_submissions[0].price}516551.00Price of this configuration. Note: this is text, see Calculations.
{d.form_submissions[0].index}0Position of the configuration in the quote.
{d.form_submissions[0].form.id}2368ID of the configurator form.
{d.form_submissions[0].form.name}Migatronic CoWelder V2Name of the configurator form.
{d.form_submissions[0].form.description}nullDescription 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

FieldDescription
idUnique ID of the element.
labelThe element label, for example Robot or Software for PowerSource.
slugIdentifier of the element.
imageImage URL of the element, or an empty string.
descriptionDescription of the element, or an empty string.
groupId, groupSlugID of the group (step) the element belongs to.
groupLabelName of the group (step), for example Solution, Software or Freight.
typeelement-with-options or element-without-options.
optionsList of selected options (only for element-with-options).
valueThe entered value (only for element-without-options). Stored as text.

Option fields

FieldDescription
idProduct or option ID.
labelName of the selected option or product, for example UR12e.
slugIdentifier of the option. For products this is usually the article number (SKU).
imageImage URL, or an empty string when the option has no image.
descriptionDescription text. Can contain line breaks and Markdown.
priceFinal sales price of the option as a number. Negative for discount lines.
defaultPriceDefault price before adjustments.
basePriceBase price.
costPriceCost price.
marginMargin in percent.
discountDiscount applied to the option.
quantitySelected quantity.
productPropertiesThe product’s properties as name/value pairs, for example type, solution or welding-method. Empty list when the option has none.
optionExtraFieldsAdditional option fields, if configured.
valueSelected 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, rawValue

Tables

FieldExampleDescription
id44Table ID.
labelCoWelder QuoteTable title.
headerColumnssee belowColumns of the table, in order.
numColumns3Number of columns.
groupssee belowGroups (sections) in the table.

Access a table by position (tables[0]) or by its label (tables[label='Discounts']).

Header columns

FieldExampleDescription
id126Column ID.
labelDescriptionColumn heading.
fieldnameWhat the column shows, for example name, sku or sales_price.
widthPercentage50Column width in percent.
alignmentleftleft, center or right.

Groups and rows

FieldDescription
groups[].labelGroup heading, for example Essentials.
groups[].colSpanNumber of columns the group heading spans.
groups[].rows[].typeelement-with-options for product rows, subtotal for subtotal rows.
groups[].rows[].labelRow label, usually the form element label (for example Software for Robot).
groups[].rows[].optionRowsOne entry per selected option in that element.
groups[].rows[].subtotalsOnly 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 }
]
}
FieldDescription
fieldThe column this cell belongs to (name, sku, sales_price, …).
valueThe display value, already formatted (for example 398,870.00 kr).
rawValueThe unformatted value as a list. Use rawValue[0] for calculations or native numbers in Excel.
alignmentleft, center or right, as set in the BoM Builder.
isMarkdowntrue 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