A collection reference works as a shared style key. Layers groups the products whose metafield points at the same collection. It does not add every product inside that collection to the family.
How it works
Product list metafields
- You configure one or more metafield namespace/key pairs in Settings → Product Families.
- During a bulk catalog import or a product webhook sync, Layers reads the configured metafields on each product.
- Layers starts with the product that owns the metafield and the products it references.
- Products already assigned to a manual or attribute-driven family, or to a metafield family from a different key, stay in their existing family.
- Layers creates or updates the family named
Auto: {namespace}.{key}only when at least two eligible products remain. - 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.
Collection reference metafields
- You configure the metafield in Settings → Product Families, the same way as a product list metafield.
- During catalog sync, Layers reads the referenced collection on each product.
- Products that reference the same collection join one family named
Auto: {namespace}.{key} (Collection {collection ID}). Products that reference a different collection join a different family. - The family becomes active once at least two products belong to it. A family with a single product stays in draft.
- Products already assigned to a manual or attribute-driven family, or to a metafield family from a different key, stay in their existing family.
Configure family metafields
- Go to Settings → Product Families.
- In the Family Metafields card, click Add Metafield.
- Select the metafield from the combobox. Only
list.product_referenceandcollection_referencemetafields produce families; other types are ignored. - Click Save.
- Layers backfills families from existing metafield values as soon as you save. You don’t need to trigger a catalog resync.
Examples
Product list example
Given acustom.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.
Collection reference example
Given acustom.style metafield that references a collection on four products:
Layers creates an active family for collection
501 containing products 1001, 1002, and 1003. Product 1004 is the only product that references collection 502, so its family stays in draft until another product references the same collection. Other products that belong to collection 501 in Shopify but don’t reference it in custom.style are not added.
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.keyare 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.
Limitations
- Only Shopify metafields of type
list.product_referenceorcollection_referenceproduce 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.