Skip to main content
Layers can build product families automatically from Shopify list.product_reference metafields. Configure which metafields to watch, and Layers groups eligible products into families during catalog sync. Use this when an existing Shopify metafield already encodes “these products belong together”, for example a Related styles or Color siblings list maintained on each product.

How it works

  1. You configure one or more metafield namespace/key pairs in Settings → Product Families.
  2. During a bulk catalog import or a product webhook sync, Layers reads the configured metafields on each product.
  3. Layers starts with the product that owns the metafield and the products it references.
  4. Products already assigned to a manual or attribute-driven family, or to a metafield family from a different key, stay in their existing family.
  5. Layers creates or updates the family named Auto: {namespace}.{key} only when at least two eligible products remain.
  6. Layers sorts eligible product IDs before building the family, so the same set of products always maps to the same family regardless of metafield ordering.

Configure family metafields

  1. Go to Settings → Product Families.
  2. In the Family Metafields card, click Add Metafield.
  3. Select the metafield from the combobox. Only list.product_reference metafields produce families; other types are ignored.
  4. Click Save.
  5. Layers backfills families from existing metafield values as soon as you save. You don’t need to trigger a catalog resync.
You can configure multiple metafields. Each is handled as a separate source, and can create families from products that are not already assigned to a higher-priority family.

Example

Given a custom.related_styles metafield on three products that all reference each other: Assuming none of these products already belongs to another family source, Layers creates a single family Auto: custom.related_styles containing products 1001, 1002, and 1003. The owning product is included, and the sorted product IDs collapse to one family regardless of which product is being processed.

Conflict resolution

  • If a product is moved into a new metafield-driven family for the same namespace.key, Layers removes it from any older metafield family for that same key. A family left with fewer than two products is deleted.
  • A product already assigned to a manual or attribute-driven family stays in that family.
  • If a product is already assigned to a metafield family from a different key, the first key to claim it keeps the product. Other keys can still create families from their remaining eligible products when at least two products remain.

Removing metafields from the config

When you remove a metafield from the Family Metafields config (or clear it entirely), Layers cleans up the families it previously produced:
  • Memberships in metafield-sourced families for the removed namespace.key are deleted.
  • Families left with no members are deleted.
  • Families left with only one member are demoted to draft.
  • Manual and attribute-sourced families are not touched.
Cleanup runs as part of the same backfill job that reconciles attribute-driven families. Removing a metafield entry reclaims its families immediately, without waiting for the next product sync.

Limitations

  • Only Shopify metafields of type list.product_reference produce families.
  • A family must contain at least two unique products to be created.
  • Metafield-driven families are read-only in the Product Families dashboard. To change their membership, edit the underlying metafield values on your products in Shopify.

See also