Skip to main content

Collection Fields

Collections group products together using rules, hand-picked products, other collections, or a mix

The Collections data type covers every kind of collection on your store: rule-based (smart), hand-picked (manual), and collections that combine both. It supports Shopify's newer collection features, such as excluded products, membership pulled in from other collections, and rules that target individual variants, that the legacy Smart Collection and Manual Collection formats cannot represent.

A collection's membership is defined by one or more sources. Each source can add products by rules, by hand-picked products or variants, or by pulling in the contents of other collections. Most collections have a single source, and a file without any Source: columns works exactly like a legacy Smart or Manual collection file.

The column names and values are the same as Matrixify's Collections sheet, so a file exported by either app imports into the other. Files exported by Altera before September 2026 with the older column names (Source, Source Target, Must Match, Rule: Product Column, Rule: Mode, Product: Handle, and so on) still import unchanged; see Previous column names. Use one set of column names per file.

Sample Files

Download sample spreadsheets to see the structure for importing collection data:

  • Mixed Sources Collections - Shows a collection combining tag rules with an exclusion, a hand-picked product, and hand-picked variants, plus a second collection that pulls it in as a sub-collection alongside its own rules

  • Remove Products from a Collection - Shows the six columns that remove hand-picked products from a collection, one row per product, with Condition: Command set to DELETE

  • Exclude Products from a Collection - Shows how to keep specific products out of a collection, even when its rules match them, with Inclusion: Type set to Exclude and Condition: Field set to Manual Selection

General

ID

Description

Example Value

Shopify collection identifier

12345678

If present, the ID will be used to group multiple rows together into a single collection. When importing, the ID will be used to find the existing collection on the store. If no match is found, the app will fall back to the Handle, and then the Title.

Handle

Description

Example Value

URL-friendly identifier

summer-sale

The handle is the URL-friendly version of the collection title used in the collection's URL. If the ID is not present, the handle is used for grouping multiple rows together into a single collection and finding an existing collection on the store.

When a row matches an existing collection by its ID and the Handle cell contains a different value, the import renames the collection to the new handle and records an info message (CLTN020). Renaming a handle changes the collection's storefront URL. If another collection already uses the new handle, Shopify rejects the change and the row fails with that error. When a row matches by Handle, the collection's existing handle is never changed, even if the cell's spelling differs from the handle stored on the store.

Handles keep non-Latin characters as Shopify does (Latin accents are transliterated, other scripts stay as they are), and the Convert handles to English letters option on the import setup page converts them to ASCII instead (see Convert non-Latin handles to ASCII).

Command

Description

Example Value

Action to perform

MERGE

  • NEW: Create a new collection (will skip if collection already exists)

  • MERGE: Update existing collection or create if not found

  • UPDATE: Update existing collection (will skip if collection doesn't exist)

  • REPLACE: Delete the collection and create it again from the file. The new collection gets a new ID

  • DELETE: Remove the collection from the store

  • IGNORE: Skip this collection during import

With MERGE and UPDATE, sources are handled incrementally: only the sources named in the file are touched (see Source: Command), and sources not named in the file are left alone. Within a source, the file's rows add rules and products the source does not have yet, and rows marked Condition: Command DELETE remove the rule or product they name; everything else on the source is kept. Sources owned by other apps are never modified, and a file with no source or rule data at all (for example, a title-only update) leaves the collection's existing sources untouched.

With REPLACE, the collection is deleted and created again with only what the file contains. Rules, products, metafields, and sales channels that are not in the file are gone, and the collection gets a new ID: menu items and metafields on other objects that pointed at the old ID no longer resolve. Files exported by Altera reference other collections by handle, so re-importing a full export re-links sub-collections. The replacement is validated before the delete, so a row that cannot be created leaves the existing collection in place.

Title

Description

Example Value

Collection name

Summer Sale Items

The main title of the collection that will be displayed to customers. If neither ID nor Handle is present, the title is used for grouping multiple rows together into a single collection. A title is required when creating a new collection.

Body HTML

Description

Example Value

Collection description

<p>All our summer sale items</p>

The main description of the collection in HTML format. You can include plain text or formatted HTML with images, videos, links, and tables.

Sort Order

Description

Example Value

Product sorting method

Manual

  • Alphabet (ALPHA_ASC): A-Z by title

  • Alphabet Descending (ALPHA_DESC): Z-A by title

  • Best Selling (BEST_SELLING): Sort by sales volume

  • Created (CREATED): Oldest products first

  • Created Descending (CREATED_DESC): Newest products first

  • Manual (MANUAL): Custom ordering

  • Most Relevant (MOST_RELEVANT): Shopify's relevance-based sorting

  • Price (PRICE_ASC): Lowest price first

  • Price Descending (PRICE_DESC): Highest price first

A new collection with a blank Sort Order cell is created as Best Selling. When the file has no Sort Order column at all, Shopify picks its own default for new collections (Most Relevant). The sort order applies to the whole collection, across all of its sources. Note that when a collection uses Manual sorting, products that newly match a rule are appended to the end of the manual order. To set the order yourself, use the Sort columns with Sort Order set to Manual.

Template Suffix

Description

Example Value

Alternative template name

sale-template

Allows you to use a custom template for displaying this specific collection. Work with your developer to create new templates in your theme.

Updated At

Description

Example Value

Last modification time - Export only

2024-12-05 06:12:35 -0500

The timestamp when the collection was last modified. This field is export-only and cannot be imported. ISO-formatted timestamps are also supported.

Image Src

Description

Example Value

Collection image URL

https://cdn.shopify.com/s/files/1/0001/collection.jpg

The URL of the featured image that represents the collection. The image must be publicly accessible.

Image Width

Description

Example Value

Image width - Export only

1200

The width of the collection's featured image in pixels. This field is export-only and cannot be imported.

Image Height

Description

Example Value

Image height - Export only

800

The height of the collection's featured image in pixels. This field is export-only and cannot be imported.

Image Alt Text

Description

Example Value

Image alternative text

Summer sale collection banner

Alternative text for accessibility and SEO purposes.

Products Count

Description

Example Value

Total products - Export only

25

The total number of products currently in the collection, across all of its sources. This field is export-only and automatically calculated by Shopify.

Row

Description

Example Value

Row number - Export only

2

Used when a collection spans multiple rows (for example, when including multiple rules or products). This field is export-only.

Top Row

Description

Example Value

Main collection row - Export only

TRUE

  • TRUE: This is the primary row for the collection

  • FALSE: This is a secondary row (for example, for rules or products)

This field is export-only.

Sources and Conditions

A source is one part of a collection's membership. Each source has its own rules, hand-picked products, or referenced collections, and a collection's products are the combination of all its sources. A collection can have up to 10 sources.

Rows group into sources by the Source: ID, Source: Type, Source: Title, and Source: Description columns together: rows that repeat the same values are one source, wherever they sit in the collection, and a row that leaves all four blank belongs to the source above it. If your file has no source columns at all, all of the collection's rows form a single source, which is how legacy Smart and Manual collection files behave.

When you update an existing collection, each block of rows is matched to one of its sources in this order does:

  1. By the numeric Source: ID, as an export writes it. This is the reliable way to point at one specific source.

  2. By the Source: Title and Source: Description, when the file names one.

  3. When the file gives neither, by the first existing source with the same Source: Type. A blank Source: Type matches the first Products or Variants source.

Rows that match no source create a new one when the Source: Command is MERGE (the default).

The third rule keeps small files simple. For example, to remove hand-picked products from a collection, a file needs only Handle (the collection), Source: Type set to Products, Inclusion: Type set to Include, Condition: Field set to Manual Selection, the product handle in Condition: Value, and Condition: Command set to DELETE. The rows edit the collection's first Products source. The Remove Products from a Collection sample shows this layout; replace the handles with your own.

The easiest way to learn the layout is to build one collection in the Shopify admin, export it, and copy the pattern.

Source: ID

Description

Example Value

Shopify source identifier

23778787514

The identifier of the source in Shopify, filled in by an export. On import it identifies which existing source the rows refer to; if nothing matches, the app falls back to matching the Source: Title and Source: Description, and then, when the file names no title, to the first source with the same Source: Type (see Sources and Conditions).

When creating new sources you can leave it empty, or write your own text such as s1 to group the rows of one source inside the file. Such text is not stored in Shopify, so it cannot point at an existing source.

Source: Command

Description

Example Value

Action to perform on source

MERGE

  • MERGE: Add the file's rules and products to the source if it can be identified, keeping what the source already has, or create the source if not. This is the default when the value is blank.

  • REPLACE: Replace the source's rules and hand-picked products with the file's data; the row fails if no existing source matches

  • DELETE: Remove just this source from the collection, leaving its sibling sources intact. For an app-owned source, this unlinks it.

Source commands apply when the collection-level Command is MERGE or UPDATE. Imports are incremental: sources not named in the file are left alone, and removing a source always requires an explicit DELETE. MERGE is additive: a rule or product the source already has is kept, a new one is added, and a row whose Condition: Command is DELETE removes the rule or product it names. Only a source REPLACE rebuilds the source from the file wholesale. An existing source's Source: Type cannot change: delete the source and create a new one to change it.

A DELETE on the collection's last remaining source empties the collection: it stays on the store with zero sources and zero products. See Emptying a collection.

If the collection Command is REPLACE, source commands are ignored: the collection is created again with the sources in the file. A source block whose Source: Command is DELETE has nothing to act on in that case, so its rows are skipped and the import reports a warning (CLTN009) that names the source. The same applies when the collection is being created.

Files without source columns (such as legacy Smart or Manual collection files) target the collection's only source automatically. If the collection has more than one source, the import fails with an error instead of guessing; export the collection with the Collections data type to edit it.

Source: Type

Description

Example Value

What the source adds

Products

  • Products: Conditions apply to product fields, and products can be selected manually. This is the default when the value is blank.

  • Variants: Conditions apply to variant fields, and individual variants can be selected manually with product-handle | Variant Title.

  • Collections: Products come from other collections, which you select manually. Each row references one collection with Condition: Field set to Manual Selection.

  • App 2315872 | Products: A source provided by an app, written with the app's ID and the type of source it provides. App sources and their conditions are managed by the app that owns them, so they cannot be changed from the file; the app source is linked by its Source: ID.

Only needs to be set on the source's first row. If a row hand-picks a variant while the type is Products, the source is imported as a Variants source.

Source: Title

Description

Example Value

Source name

promo

Your own name for the source, so that you can tell sources apart. It is one of the columns that groups rows into sources, and it is stored as the source's title in Shopify. Source titles do not need to be unique across collections. If left blank, the source is titled Untitled Source. Shopify keeps at most 255 characters.

Source: Description

Description

Example Value

Optional source description

Products from summer promo

An optional description of the source. It is one of the columns that groups rows into sources.

Inclusion: Type

Description

Example Value

Include or exclude

Include

  • Include: Products matching the conditions on this row are added to the source. This is the default when the value is blank.

  • Exclude: Products matching the conditions on this row are removed from the source, even if they match the include rules.

Exclude rules support the Tag, Type, Vendor, Category, Category with Subcategories, and Collection fields, and hand-picked products with Manual Selection. An exclude rule on any other field (for example Title) is skipped with a warning (CLTN009). Exclude cannot be used in a Collections source.

The value is not case sensitive. Any value other than Include or Exclude (for example Exclud) skips that row with a warning (CLTN009) rather than treating it as an include rule, because a typo here would otherwise put products into the collection that you meant to keep out.

Inclusion: Match

Description

Example Value

Rule matching logic

any condition

  • all conditions: A product is added by this source only if all of the source's include rules are TRUE

  • any condition: A product is added by this source if at least one of the source's include rules is TRUE

The value on an Include row sets the logic for the source's include rules, and the value on an Exclude row sets it for the exclude rules. When you create a new source and leave the cell blank, include rules default to all conditions and exclude rules to any condition (a product is removed if it matches at least one exclude rule). When you edit a source that already exists on the store, a blank cell keeps the source's current setting, so you can add rules without restating the matching logic. Leave it blank on Manual Selection rows.

The value is not case sensitive, and the short forms any, any conditions, all, and all condition are also accepted. Any other value is reported with a warning (CLTN009) and treated as blank.

Condition: Command

Description

Example Value

Action to perform on this rule row

MERGE

  • MERGE: Add the rule or hand-picked product on this row to the source, or keep it if the source already has it. This is the default when the value is blank.

  • DELETE: Remove the rule or hand-picked product on this row from the source. The row must spell the rule the way an export writes it (same field, relation, and values). A rule that is not on the source is reported and nothing is removed.

Condition commands apply to MERGE source edits. On a new source or a source REPLACE there is nothing to delete, so DELETE rows are skipped with a warning.

Condition: Field

Description

Example Value

Product field to evaluate

Vendor

  • Tag: Product tag

  • Title: Product title

  • Type: Product type

  • Vendor: Product vendor

  • Status: Product status. Include rules only

  • Category: Product category

  • Category with Subcategories: Product category, also matching products in its subcategories

  • Price: Variant price

  • Compare at price: Variant compare at price

  • Inventory stock: Variant inventory quantity

  • Weight: Variant weight

  • Variant title: Product variant title

  • Collection: Collection membership. With Inclusion: Type set to Exclude, products in the referenced collection are excluded

  • Manual Selection: A hand-picked product, variant, or collection named in Condition: Value

  • Metafield: namespace.key: Product metafield

  • Variant Metafield: namespace.key: Product variant metafield

  • Is Price Reduced: Product is on sale (compare at price is set and greater than price)

Metafield rules require a metafield definition to exist for the namespace and key on your store. Metafield: uses the product definition and Variant Metafield: uses the variant definition, in a Products source or a Variants source. When a product definition and a variant definition have the same namespace and key, the two fields are separate rules: a MERGE row adds one next to the other, and a DELETE row removes only the one it names. The older spellings Variant Price, Variant Compare At Price, Variant Inventory, and Variant Weight are also accepted.

Condition: Relation

Description

Example Value

Comparison method

Equals

  • Equals

  • Does not equal

  • Contains

  • Does not contain

  • Starts with

  • Ends with

  • Greater than

  • Less than

  • Is empty (only for Compare at price)

  • Is not empty (only for Compare at price)

  • Includes (Tag and Metafield fields)

  • Does not include (Tag field)

Which relations apply depends on the field: Tag and Metafield rules use Includes and Does not include, Status rules use Equals and Does not equal, numeric fields use Equals, Does not equal, Greater than, and Less than, and text fields accept the rest. The spellings Not Equals, Not Contains, Starts With, and Greater Than from the legacy Smart Collections sheet are also accepted. A relation the field does not take fails the row with the field's relations listed (see CLTN024). Leave the cell blank on Manual Selection rows.

Condition: Value

Description

Example Value

Value to compare against

Nike

The value that the field will be compared against. Several values can go in one cell separated by commas (red, blue); to keep a comma inside a value, escape it with a backslash (Smith\, Jones). Use Condition: Match to say whether a product must match any or all of them.

  • Category and Category with Subcategories: the taxonomy ID (aa-1), a breadcrumb (Apparel & Accessories > Clothing), or the export's form aa-1 | Apparel & Accessories > Clothing

  • Price and Compare at price: a number, for example 10.00

  • Inventory stock: a whole number

  • Weight: a number with its unit (1.5 kg); the units g, kg, oz, and lb are accepted, and a bare number is in the store's weight unit

  • Status: Active, Draft, Archived, or Unlisted

  • Collection: the handle or ID of the other collection

  • Manual Selection in a Products source: the product handle or ID

  • Manual Selection in a Variants source: product-handle | Variant Title. A cell with only the product handle selects all of the product's variants

  • Manual Selection in a Collections source: the handle or ID of the collection, one per row

  • Is Price Reduced: no value needed

Condition: Match

Description

Example Value

How several values in one row must match

OR

  • OR: A product matches this rule if it matches at least one of the values in Condition: Value

  • AND: A product matches this rule only if it matches all of the values

For example, Tag / Includes / sale, clearance with OR takes products that have either tag, and with AND only products that have both. Shopify restricts which match types each relation accepts: Equals style relations accept OR, Does not equal and Does not contain accept AND, and Tag and Contains rules accept both. Exports write the match type on every rule row; on import, a match type the relation does not accept falls back to the one it does.

Multiple Sources Example

One collection with three sources: tag rules with an exclusion, hand-picked products, and the contents of another collection. Collection-level fields (Title, Command, and so on) only need to be set on the collection's first row; exports repeat them on every row of the collection except Body HTML and the metafields, which are written on the first row only.

Handle

Title

Command

Source: ID

Source: Type

Source: Title

Inclusion: Type

Inclusion: Match

Condition: Field

Condition: Relation

Condition: Value

summer-sale

Summer Sale

MERGE

s1

Products

promo

Include

any condition

Tag

Includes

summer, clearance

summer-sale

s1

Products

promo

Exclude

Vendor

Equals

Acme

summer-sale

s2

Products

editor-picks

Include

Manual Selection

blue-shirt

summer-sale

s2

Products

editor-picks

Include

Manual Selection

red-hat

summer-sale

s3

Collections

from-shoes

Include

Manual Selection

mens-shoes

Sub-Collection Limitations

Sub-collections can only be nested one level deep. This is a Shopify limitation:

  • A collection that pulls its products from other collections cannot itself be referenced as a sub-collection.

  • A collection cannot reference itself as a sub-collection.

Rows in a Collections source can only reference collections; rule rows are not allowed in that source.

Collections in the same file can reference each other in any row order: when a referenced collection appears later in the file, the sub-collection source is applied automatically once every collection has been imported. References that don't match any collection, in the file or on the store, produce a warning.

Emptying a Collection

To empty a collection while keeping it on the store, delete all of its sources: set Source: Command to DELETE on every source. The collection stays in place with zero sources and zero products. App-owned sources are only unlinked from the collection, so they stay available to other collections.

Two things that look like they should empty a collection do not: blank cells don't clear sources, and a collection REPLACE with no source data leaves the existing sources in place.

If Shopify rejects the delete with error CLTN018 (Shopify has in the past required every collection to keep at least one source), you can instead use the collection Command REPLACE with a single rule that matches no products. For example, use a tag no product on your store has:

Handle

Title

Command

Condition: Field

Condition: Relation

Condition: Value

retired-sale

Retired Sale

REPLACE

Tag

Includes

no-products-match

Linked Products

These columns set the order of the products inside the collection. On import they only apply when Sort Order is Manual, and the products must already be in the collection. On export, the group is off by default because it writes one row for every product in the collection.

Sort: Position

Description

Example Value

Display order in collection

5

Positions follow th. When your file lists every product in the collection, the positions are sort keys: the products are sorted by their values and renumbered from 1, so you can use gaps such as 10, 20, 30, or a decimal such as 1.5 to place a product between two others. When your file lists only some of the products, each listed product moves to the exact position given and the other products keep their order, so one row can add a product to an existing collection at position 4 in a single import. In that case a decimal is rounded down and a position past the end places the product last. An empty position means that product is not moved. The position applies to the collection as a whole (Shopify keeps one manual order across all sources). On export the position is only written for collections whose Sort Order is Manual; other sort orders list the products with a blank position.

Sort: Product ID

Description

Example Value

Product identifier

987654

The Shopify ID of the product whose position you want to set.

Sort: Product Handle

Description

Example Value

Product URL handle

blue-t-shirt

The handle of the product, used when it cannot be found by Sort: Product ID. Useful when moving collections between stores where the product IDs differ.

Metafields and SEO

Metafields can be imported and exported with collections to store custom metadata, SEO information, and additional attributes.

For detailed information about working with metafields, see our Metafields guide.

SEO fields are special metafields, exported with Shopify's string type:

  • SEO Title: Metafield: title_tag [string]

  • SEO Description: Metafield: description_tag [string]

On import these two columns set the collection's SEO title and description whatever type the header carries; a blank cell leaves the field unchanged.

If no SEO title or description is provided, Shopify automatically generates them from the collection's title and description.

Sales Channels

Each collection can be published to the sales channels installed on your store. These are dynamic columns: there is one pair of columns for each sales channel, with the channel's name after the colon, for example Published: Online Store and Published At: Online Store. Do an export first to see the exact column names for your store.

Published

Description

Example Value

Publication status for specific channel

TRUE

  • TRUE: Collection is published and visible on the specified sales channel

  • FALSE: Collection is unpublished and hidden from the specified sales channel

  • Blank: Collection is unpublished from the specified sales channel, the same as FALSE

Each sales channel is controlled independently. A Published: [Sales Channel] column that is present in the file sets that channel on every collection in the file, so remove the column when a channel should be left alone. A new collection with no Published: columns at all is published to the Online Store.

Published At

Description

Example Value

Publication date and time for a channel

2026-12-25 10:00:00 +0200

A date in the past records when the collection was published. A date in the future schedules the publication on channels that support it (the Online Store does); on a channel that does not, the collection is left unpublished with a warning so it is not published right away by mistake. Leave the cell blank to publish at import time.

A scheduled channel exports as Published: FALSE with the future date in Published At:. Importing that pair keeps the schedule; FALSE with a past date, or with no date, unpublishes the channel.

Previous column names

Files exported by Altera between July and September 2026, and files in the legacy Smart or Manual collection layouts, keep importing unchanged. Their columns map onto the current ones as follows.

Previous column

Current column

Source

Source: Title

Source ID

Source: ID

Source Command

Source: Command

Source Description

Source: Description

Source Target

Source: Type (Sub Collection is now Collections, Shared is App <id> \| <Type>)

Must Match

Inclusion: Match

Rule: Mode

Inclusion: Type

Rule: Product Column

Condition: Field

Rule: Relation

Condition: Relation

Rule: Condition

Condition: Value

Rule: Match Type

Condition: Match (any is OR, all is AND)

Rule: Include Descendants

Condition: Field set to Category with Subcategories

Product: ID, Product: Handle

Condition: Field Manual Selection with the product in Condition: Value

Product: Variant ID, Product: Variant SKU

Condition: Field Manual Selection with product-handle \| Variant Title

Product: Position

Sort: Position with Sort: Product ID or Sort: Product Handle

Published, Published Scope

Published: Online Store and Published: Point of Sale

The Published, Published At, and Published Scope columns are still accepted on import. Published sets the Online Store, and Published Scope extends it to Point of Sale (web unpublishes there, global publishes there). The per-channel Published: columns take priority when both are present.

Export Filters

You can use these filters to limit which collections are exported:

  • handle: Filter by collection handle

  • id: Filter by collection ID

  • product_count: Filter by number of products in the collection (equals, not equals, greater than, less than)

  • product_id: Filter collections containing specific products

  • publishable_status: Filter by status (published/unpublished). Shopify decides this by the Online Store channel only, so a collection that is published to other channels but not to the Online Store counts as unpublished

  • published_at: Filter by publish date

  • title: Filter by collection title

  • type: Filter by the collection's kind: Smart collections (rule-based), Manual collections (hand-picked), or Mixed (new-style) (collections using the newer features: several sources, rules and picks in one source, exclusions, variant targeting, sub-collections, or app sources)

  • updated_at: Filter by last update date

Did this answer your question?