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:
| Suffix | Description | Available For |
|---|---|---|
#code | Option's configuration code | All widgets |
#priceCode | Option's price code | All widgets |
#name | Option's display name | Non-text widgets |
#blockName | The block's name | All widgets |
#inputValue | User-entered value | Text, Number, Slider, Color, Engrave |
#line1, #line2, ... | Individual lines | Engrave (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):
| Suffix | Description |
|---|---|
#variable | The 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:
| Mode | Prefix | Behavior |
|---|---|---|
| String | None | References 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.
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:
| Location | Example |
|---|---|
| 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 fields | Various |
String-Only Fields (Frontend)
These fields only support string mode — no formulas, no variables:
| Location | Example |
|---|---|
| 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} |
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}
Available only for Bundles.
Operators
When in formula mode, these operators are available:
| Operator | Description | Example |
|---|---|---|
+ | Addition | =5 + 3 → 8 |
- | Subtraction | =10 - 4 → 6 |
* | Multiplication | =6 * 7 → 42 |
/ | Division | =20 / 4 → 5 |
^ | Exponentiation | =2 ^ 3 → 8 |
& | 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
- Variables Reference - Named calculations for reusable logic
- Formula Functions Reference - All available formula functions