Attributes page of the dashboard, you have control over the attributes that are indexed and utilized by our search and browse engine. Here we’ll guide you through each attribute type and how to optimize them for your product listings.
Attributes for Product Options, Shopify’s Standard Product Taxonomy Metafields, and Product Metrics are automatically created during catalog syncs. Please contact support if you need assistance managing complex attributes.
Foundational Architecture
Attributes form the foundation layer of the Layers platform, enabling all higher-level functionality through their core properties:Attribute Types
Catalog Attributes
The code corresponds to your product schema using Dot Notation, which allows for the targeting of attributes or nested attributes within your data structure. Example of Dot Notation for a product attribute:metafields.custom.material.
Calculated Attributes

Automatic Product Recalculation
When you create a new calculated attribute or update an existing calculated attribute’s logic, the system automatically recalculates all products in your catalog in the background. This ensures that your calculated attribute values are immediately applied across your entire product catalog without requiring manual intervention.Recalculation is triggered only when you create a calculated attribute or modify its logic field. Updates to other fields (like nickname or filterable settings) do not trigger recalculation.
Data Access in Calculated Attributes
Calculated attributes can access two types of data:- Catalog Attributes: Use
_attribute:{attribute_code}to reference existing catalog attributes. For example,_attribute:price_range.fromor_attribute:published_at. - Raw Data: Use
_raw:raw.{path}to access raw underlying Shopify data before transformation. Use dot notation for nested properties. For example,_raw:raw.variantsor_raw:raw.featured_media.
AI-Powered Calculated Attributes
You can use AI to generate and understand calculated attributes without writing JSONLogic manually:Generate with AI
The “Generate with AI” feature allows you to describe what you want to calculate in natural language, and the system will automatically generate the JSONLogic expression for you. How to use:- Navigate to Attributes → Create new calculated attribute
- Click the Generate with AI button next to “Value Formula”
- Enter a natural language description of what you want to calculate (minimum 10 characters)
- Example: “Calculate the discount percentage from compare_at_price to current price”
- Example: “Count the total number of variants”
- Example: “Calculate days since published”
- Click Generate to start the AI generation process
- Monitor real-time progress updates as the AI generates and validates the expression
- Review the generated JSONLogic in the preview
- Click Apply to Form to use the generated expression
- Attempt 1: Initial generation based on your description
- Attempts 2-3: If validation fails, the AI receives error feedback and attempts to correct the expression
- Real-time updates: WebSocket events broadcast progress (generating → retrying → completed/failed)
- Validation: Each generated expression is validated for correct JSONLogic syntax and proper dependency prefixes
The AI has access to your store’s specific attributes (metafields, named tags, options, variants) and will generate expressions that reference the actual data available in your catalog.
Explain with AI
The “Explain with AI” feature provides human-readable explanations of existing JSONLogic expressions, making it easier to understand what a calculated attribute does. How to use:- Create or edit a calculated attribute with JSONLogic
- Scroll to the “What does this formula do?” section below the formula builder
- Click Explain with AI
- Review the plain-language explanation of your formula
- JSONLogic:
{"/": [{"-": [{"var": "_attribute:compare_at_price"}, {"var": "_attribute:price"}]}, {"var": "_attribute:compare_at_price"}]} - Explanation: “Calculates the discount percentage by comparing the original price to the current selling price. For example, if a product was 75, this would return 0.25 (25% off).”
Platform Default Calculated Attributes
The following calculated attributes are available by default in the Layers platform:SKU Coverage
SKU Coverage
Description: Ratio between total number of variants and their availability status.
Days Available
Days Available
Description: The number of days since the product became available, based on the imported Published At for the product. If no available date has been imported, the system uses the date the product was created.
Has Image
Has Image
Description: If the product has a featured image.
Age of Newest Variant
Age of Newest Variant
Description: The age of the most recently created variant.
Price Varies
Price Varies
Description: If price_range.from != price_range.to.
For a comprehensive guide to JSONLogic operators and how to write calculated attribute formulas, see JSONLogic Operators.
Additional Calculated Attribute Recipes
Beyond the platform defaults, you can create custom calculated attributes for specific business needs:Discount Percentage
Discount Percentage
Description: The percentage discount calculated from compare_at_price to current price. Returns 0 if no discount is available.Use Case: Sort products by discount amount or filter for products on sale. Create “Biggest Discounts” collections or exclude heavily discounted items from premium merchandising.Attributes: Filterable, Sortable | Value Type: Number (percentage)Example: A product with compare_at_price of 75 has a discount percentage of 25.
Variant Count
Variant Count
Description: The total number of variants for this product. Useful for filtering or sorting by product complexity.Use Case: Identify products with many options (high variant count) or single-variant products. Filter out products with too many variants from certain collections.Attributes: Filterable, Sortable | Value Type: Number (count)Example: A t-shirt available in 5 colors and 4 sizes (20 combinations) has a variant count of 20.
Attribute Options
Searchable Attributes
By marking an attribute as Searchable, your products can be found in search results if the search query matches the attribute’s value. This is ideal for text-based attributes such as product names, descriptions, or categories. Attributes that are marked as Searchable and contain an Image URL will automatically be used for Image Search.Partial Matching
The “Allow Partial Matching” option determines whether a product can match search queries that only partially match the attribute’s value. For instance, if you want customers to find a product by typing just a part of the SKU or Style Code, enable this option. If exact matches are preferred, such as for specific codes, you can disable this option.High-Signal Attributes
The “High-Signal Attribute” option treats an attribute as a high-signal field, giving it stronger influence on search results. When enabled, the attribute value is embedded as a separate semantic chunk, which increases its weight in the search ranking algorithm. This option is best suited for identity-driven attributes where exact matches should strongly influence relevance, such as brand names, vendor names, designer names, or collection identifiers. For example, when a customer searches for “Nike shoes,” enabling High-Signal on the vendor attribute ensures that products from Nike are prioritized more heavily in the results.High-Signal is only available for attributes that are marked as Searchable. Enable this option sparingly for attributes that truly represent product identity, as overuse may dilute its effectiveness.
Filterable Attributes
Setting an attribute as Filterable enables it to be used as a facet on category or search result pages. This allows customers to refine their searches based on specific product characteristics like size, color, or brand. Learn more in Filters / Facets.Sortable Attributes
Sortable attributes can be used to create custom Sort Orders for your product catalog. This is useful for allowing customers to sort products according to different criteria, such as price, popularity, or relevance.Groupable Attributes
Use a groupable attribute to group results and/or metrics by a shared value instead of by individual product IDs—for example, by a style code across variants or related products.- What it does: Treat all products with the same group value as one group (e.g., group by style_code) for ranking and reporting.
- When to use: When you want to rank or measure product families together (styles, sets, or kits).
- Where to enable: Edit an attribute and toggle “Groupable.”
- Works with: Metrics and Sort Orders.
Attribute Classes
Attribute classes provide additional metadata that helps the search engine understand how to process and optimize searches involving specific attributes. When you assign a class to an attribute, the engine can apply specialized handling that improves relevance and performance.Categorical Attributes
Categorical attributes represent discrete values that products can be grouped by, such as brand, color, material, or product type. The engine uses this classification to optimize faceted navigation and to understand when users are filtering by category versus searching for specific terms.Feature Attributes
Feature attributes describe product characteristics that customers might search for or filter by, such as size, weight, or technical specifications. The engine treats these differently from categorical attributes, applying appropriate matching logic for feature-based queries.Price Attributes
Price attributes are specifically designated for monetary values. This classification enables the engine to apply price-specific optimizations, including range-based filtering, price sensitivity detection in user intent processing, and appropriate sorting behaviors for price-related queries.Assigning the correct class to your attributes helps the search engine deliver more relevant results by understanding the semantic meaning of each attribute in your catalog.
Best Practices
- Use clear, descriptive nicknames for attributes to easily manage and identify them on the dashboard.
- When setting up searchable attributes, consider the search behavior of your customers and which attributes are most relevant to their queries.
- For filterable attributes, think about the facets that are most useful for customers when browsing your product range.
- Regularly review and update your attributes to keep up with changes in your product catalog and customer search behavior.