Data model
A reference of every metaobject and metafield used by the app, and the JSON structure of tables.
App identifier
App-owned data uses a namespace reserved for the app. Inside theme app extensions, it is written $app. In your theme code, use the resolved namespace:
| In app extensions | In theme code |
|---|---|
$app:tables (metaobject type) | app--31615844353--tables |
$app:specifications (metafield namespace) | app--31615844353--specifications |
Specification tables
Tables are metaobjects of type app--31615844353--tables, publicly readable on the storefront and translatable.
| Field | Type | Description |
|---|---|---|
name | Single-line text | Internal name of the table. |
status | Single-line text | active or preview. |
groups | JSON | Groups and attributes (see below). |
rule_set | JSON | Assignment conditions (see below). |
groups JSON
[
{
"id": "5c1f…",
"name": "Performance",
"attributes": [
{
"id": "9a2e…",
"name": "Battery life",
"type": "number_integer",
"icon": "battery.png",
"tooltip": "Measured at 50% volume.",
"scope": "product",
"comparable": true,
"convert_unit": false,
"metafield_reference": { "namespace": "sc_attributes", "key": "battery_life" }
}
]
}
]
| Property | Description |
|---|---|
name, tooltip | Displayed texts (translatable). |
type | Attribute type (see below). |
icon | File name of the icon in the store Files, usable with images[attribute.icon] in Liquid. |
scope | product or variant. |
comparable | Whether the attribute appears in comparison tables. |
metafield_reference | namespace and key of the metafield holding the value. For metaobject references, also metaobject_field_key and metaobject_thumbnail_field_key. |
product_option_name | product_option type only. |
show_compare_at_price | product_price type only. |
metaobject_type | metaobject_reference type only. |
convert_unit | dimension, weight and product_weight types. |
allow_zoom | Metafield references to images. |
scale_min, scale_max | rating (scale) type only. |
Attribute types
- Product information — value read from the product or variant:
product_option,product_type,product_category,product_vendor,product_description,product_price,product_sku,product_barcode,product_weight,product_collections,product_rating. - Metafield-based — value read from the metafield in
metafield_reference:metafield_reference,metaobject_reference,single_line_text_field,multi_line_text_field,number_integer,number_decimal,dimension,volume,weight,color,boolean,date,money,link,file_reference,rating(displayed as “Scale”).
rule_set JSON
{
"applied_disjunctively": true,
"rules": [
{ "column": "category", "relation": "equals", "condition": "el-4-8-5" },
{ "column": "tags", "relation": "contains", "condition": "wireless" }
]
}
applied_disjunctively:truewhen any condition must match,falsewhen all must match.column:type,vendor,tags,collection(collection ID) orcategory(taxonomy category ID).relation:equals,not_equalsorcontains.
Product metafields
Namespace app--31615844353--specifications:
| Key | Type | Description |
|---|---|---|
table | Metaobject reference | Table manually assigned to the product. Empty when the table is assigned by conditions. |
compare_with | List of products | Products compared with this product. |
comparable_variants | List of variants | Variants shown in the variant comparison table. |
hide_variant_selector | Boolean | Hides the variant selector of comparison tables for this product. |
Variant metafields
Namespace app--31615844353--specifications:
| Key | Type | Description |
|---|---|---|
exclude_from_variant_selector | Boolean | Removes the variant from comparison table variant selectors. |
Attribute values
Values managed in the app are stored as metafields in the sc_attributes namespace, with the attribute key as key, on the product (scope: product) or on each variant (scope: variant). They are regular merchant-owned metafields: you can read them in Liquid, edit them with bulk tools and translate them.
For metaobject_reference attributes, Shopify doesn’t allow metaobject references in metafields without a definition, so the value is the handle of the metaobject, stored as single-line text.
Import & export format
The CSV exported from Specification tables › Export has the columns Name, Handle, Status, Groups and Rule set. Groups and Rule set contain the JSON structures described above. Header names are always in English, so a file exported from an admin in one language can be imported into an admin in another language.
