Skip to main content

Code Input Reference

Mimeeq uses a code input system to create dynamic values based on product configurations. This syntax is used across the platform for pricing patterns, SKU generation, BOM definitions, rules, and more.

Syntax

The code input system uses curly braces to reference values:

{fieldName#suffix}
  • fieldName: The identifier of the data source (block name, variable name, etc.)
  • suffix: Specifies which property to extract

Available Suffixes

Option Block References

Reference values from option blocks using the block name:

SuffixDescriptionAvailable For
#codeOption's configuration codeAll widgets
#priceCodeOption's price codeAll widgets
#nameOption's display nameNon-text widgets
#blockNameThe block's nameAll widgets
#inputValueUser-entered valueText, Number, Slider, Color, Engrave
#line1, #line2, ...Individual linesEngrave (multi-line)

Examples:

{Material#code}           → "OAK"
{Material#name} → "Solid Oak"
{Material#priceCode} → "WOOD-OAK-001"
{Width#inputValue} → "120"
{Embossing#line1} → "John"
{Embossing#line2} → "Smith"

Variable References

Reference defined variables using their name (only in formula-enabled fields):

SuffixDescription
#variableThe resolved value of the variable
{HAS_LINING#variable}     → "true"
{CHAR_COUNT#variable} → "15"
{SIZE_FORMAT#variable} → "a4"

See Variables Reference for details on creating and using variables.

Custom Field References

Custom fields defined in Settings can also be referenced using their key as the suffix:

{Material#weight}         → "2.5" (custom field "weight")
{Color#hexValue} → "#FF5500" (custom field "hexValue")

String Mode vs Formula Mode

Code inputs operate in two modes:

ModePrefixBehavior
StringNoneReferences are replaced with their values
Formula=Value is evaluated as a formula expression
{color#code}-{size#code}              → "BLU-XL" (string mode)
=CONCATENATE({color#code}, "-", {size#code}) → "BLU-XL" (formula mode)

Formula mode enables calculations, conditions, and text manipulation. See Formula Functions Reference for all available functions.

info

Formula mode and variables are optional features not available to all customers. String mode (basic code input syntax) is available to everyone. Contact us if you're interested in enabling formulas.


Where Code Inputs Are Used

Formula-Enabled Fields (Backend)

These fields support both string mode and formula mode, including variables:

LocationExample
Pricing patterns=CONCATENATE({color#priceCode}, "-", {size#priceCode})
Pricing code quantity=IF({bulk#variable}="true", 10, 1)
Variables (pricing & BOM)=COUNT_CHAR({embossing#inputValue})
BOM item fields (name, code, qty)=CONCATENATE("PART-", {size#code})
BOM custom fields (Text type)=IF({finish#code}="MATTE", "M", "G")
Bundle fieldsVarious

String-Only Fields (Frontend)

These fields only support string mode — no formulas, no variables:

LocationExample
SKU/Code structure{material#code}-{color#code}-{size#code}
Rules (show/hide mesh, components){material#visibility-code}
2D images{view#visibility-code}_{color#visibility-code}
2D layers in 3D{layer#visibility-code}
External models{model#code}
Download tab patterns{product#code}_{size#code}
Disable actions message overwrite{reason#name}
warning

String-only fields:

  • Ignore the = prefix (treated as literal text)
  • Cannot use {name#variable} references
  • Only support direct option references like {blockName#code}

Item Master Integration

For inventory integration, use the special ItemMaster construct:

{ItemMaster[LOOKUP_PATTERN]#commerceId}

The pattern inside brackets generates a lookup key that retrieves data from your Item Master:

{ItemMaster[{material#code}-{color#code}]#commerceId}
warning

Available only for Bundles.


Operators

When in formula mode, these operators are available:

OperatorDescriptionExample
+Addition=5 + 38
-Subtraction=10 - 46
*Multiplication=6 * 742
/Division=20 / 45
^Exponentiation=2 ^ 38
&Text concatenation="Hello" & " World"
=Equal=IF(5=5, "yes", "no")
<>Not equal=IF(5<>3, "yes", "no")
> < >= <=Comparison=IF(10>5, "bigger", "smaller")

Tips

String Comparisons

When comparing to string values in formulas, wrap the value in quotes:

=IF({HAS_LINING#variable}="true", "L", "N")
=IF({SIZE_FORMAT#variable}="a4", "A4", "Other")

Handling Empty Values

Check for empty strings before processing:

=IF({field#inputValue}="", 0, COUNT_CHAR({field#inputValue}))
=IF({field#inputValue}="", "", CONCATENATE("PREFIX-", {field#inputValue}))

See Also