Collection metafield
Layers creates a metafield definition on collections that allows you to set a default sort order for each collection directly from Shopify.Default sort order
This metafield lets you assign a Layers sort order to a collection. When set, the Browse API will use this sort order as the default when no sort order is specified in the request. Namespace:app--{app_id}--layers (auto-generated by Shopify)
Key: default_sort_order
Owner Type: COLLECTION
Type: metaobject_reference
Validation: References app--278936322049--sort_order metaobjects only
Metafield definition
How to set a default sort order
To set a default sort order for a collection:- Go to Products → Collections in your Shopify admin
- Select the collection you want to configure
- Scroll down to the Metafields section
- Find the Default Sort Order field
- Select from the available Layers sort orders in the dropdown
The default sort order metafield references the Sort Order metaobjects created by Layers. If you delete a sort order in Layers, any collections using it as the default will need to be updated to select a different sort order.
Shop and app installation metafields
Layers stores configuration data on both the shop and the app installation so that storefront integrations, the tracking pixel, theme app extensions, and Liquid templates can all read it. Every metafield in this section is written to both owners and stays in sync — read whichever one your context supports.
These metafields are automatically managed and should not be edited manually.
Was your store connected before the dual-write rolled out? If you don’t yet see values under
shop.metafields.layers.* or shop.metafields.commerce_blocks.*, trigger a resync from Settings → Integrations in the Layers dashboard, or wait for the next scheduled push.Embed settings
Contains the API tokens and integration configuration needed for the Layers storefront pixel and SDK. Namespace:layers
Key: embed_settings
Type: json
Schema
Field descriptions
Example value
Additional injects
Stores any additional scripts or styles configured to be injected into your storefront. Namespace:layers
Key: additional_injects
Type: json
Schema
Field descriptions
Example value
Commerce Blocks tokens
These metafields provide the API tokens needed for Layers theme app extensions and blocks. They are stored in a separate namespace to be accessible by Shopify’s theme app extension system. Namespace:commerce_blocks
layers_token
Key:layers_token
Type: single_line_text_field
Description: The storefront API token for search and browse requests from theme blocks.
Example Value: sf_xyz789ghi012
layers_tracking_token
Key:layers_tracking_token
Type: single_line_text_field
Description: The analytics tracking token for event collection from theme blocks.
Example Value: trk_abc123def456
store_config
Key:store_config
Type: json
Description: Basic store configuration for theme blocks.