Skip to main content

Smart Collection Fields

Smart collections automatically group products based on conditions you define

Updated over 2 weeks ago

Sample Files

Here are sample spreadsheets you can use to test the smart collection import functionality:

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.

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 and recreate the entire collection with only data from the file

  • DELETE: Remove the collection from the store

  • IGNORE: Skip this collection during import

When using MERGE or UPDATE, the rules in your file will completely replace any existing rules on the collection in Shopify. The existing rules will not be combined with the new rules.

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.

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 (allows setting Product: Position)

  • Price (PRICE_ASC): Lowest price first

  • Price Descending (PRICE_DESC): Highest price first

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.

Published

Description

Example Value

Visibility

TRUE

  • TRUE: Collection is published and visible to customers

  • FALSE: Collection is unpublished and hidden from customers

Published At

Description

Example Value

Publication time - Export only

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

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

Published Scope

Description

Example Value

Publication scope

web

  • global: Published on both Online Store and Point of Sale channels

  • web: Published only on Online Store channel

Sales Channels

Control publication status across individual sales channels by creating separate columns for each channel. This works similarly to Products, where you create one column per sales channel.

Use column names in the format Published: [Sales Channel Name] for example:

  • Published: Online Store

  • Published: POS

  • Published: Shop (for the Shop app)

  • Published: Facebook

  • Published: Buy Button

Published

Description

Example Value

Publication status for specific channel

TRUE

Control whether the collection is published on a specific sales channel.

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

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

  • Blank: No change to current publication status (skipped during import)

When importing, each sales channel can be controlled independently. If a column value is blank, that sales channel's publication status will remain unchanged during the import process.

This field has priority over the legacy "Published" and "Published Scope" fields. If you include both sets of fields, the sales channel columns will be used.

Row

Description

Example Value

Row number - Export only

2

Used when a collection spans multiple rows (e.g., 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 (e.g., for rules or products)

This field is export-only.

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. This field is export-only and automatically calculated by Shopify.

Rules

Smart collections use rules to automatically determine which products belong in the collection. Each rule compares a product field against a specified condition.

When importing with MERGE or UPDATE commands, the rules in your file will completely replace any existing rules on the collection. Existing rules will not be combined with the rules from your file.

Must Match

Description

Example Value

Rule matching logic

any condition

  • all conditions: Product is added to collection only if all rules are TRUE

  • any condition: Product is added to collection if at least one rule is TRUE

If not value is provided, the default is all conditions.

Rule: Product Column

Description

Example Value

Required

Product field to evaluate

Vendor

Yes

  • Title: Product title

  • Type: Product type

  • Category: Product category

  • Vendor: Product vendor

  • Variant Title: Product variant title

  • Variant Compare At Price: Variant compare at price

  • Variant Weight: Variant weight

  • Variant Inventory: Variant inventory quantity

  • Variant Price: Variant price

  • Tag: Product tag

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

  • Metafield: Product metafield (use format Metafield: namespace.key)

  • Variant Metafield: Product variant metafield (use format Variant Metafield: namespace.key)

Rule: Relation

Description

Example Value

Required

Comparison method

Equals

Yes

  • Greater Than (GREATER_THAN): Field value is greater than the condition value

  • Less Than (LESS_THAN): Field value is less than the condition value

  • Equals (EQUALS): Field equals the condition value

  • Not Equals (NOT_EQUALS): Field does not equal the condition value

  • Starts With (STARTS_WITH): Field value starts with the condition value

  • Ends With (ENDS_WITH): Field value ends with the condition value

  • Contains (CONTAINS): Field value contains the condition value

  • Not Contains (NOT_CONTAINS): Field value does not contain the condition value

  • Is Empty (IS_NOT_SET): Field has no value (only for Variant Compare At Price)

  • Is Not Empty (IS_SET): Field has a value (only for Variant Compare At Price)

Note that Tag rules can only use Equals relation.

Rule: Condition

Description

Example Value

Required

Value to compare against

Nike

Yes

The value that the product field will be compared against. If the condition is empty the rule will be skipped. For Category rules, you can use ID, Name, Breadcrumb, or ID|Breadcrumb format.

The only exception is the Is Price Reduced column, which does not require a condition value.

For Tag rules, you can provide multiple comma-separated values in a single cell (e.g., summer, sale, clearance). Each value will be created as a separate rule.

Multiple Conditions Example

To add multiple conditions to a smart collection, use multiple rows. You cannot include multiple conditions in a single row.

The first row contains the collection details and the first rule. Each additional row only needs the Handle (or ID) to group the rows together, plus the rule fields.

For example, to create a "Nike Summer" collection that matches products where the vendor is "Nike" and the tag is "summer":

Handle

Title

Must Match

Rule: Product Column

Rule: Relation

Rule: Condition

nike-summer

Nike Summer

all conditions

Vendor

Equals

Nike

nike-summer

Tag

Equals

summer

To match products where any condition is true (OR logic), set "Must Match" to "any condition":

Handle

Title

Must Match

Rule: Product Column

Rule: Relation

Rule: Condition

summer-or-sale

Summer or Sale

any condition

Tag

Equals

summer

summer-or-sale

Tag

Equals

sale

Note that the Must Match, Title, and other collection-level fields only need to be on the first row. Additional rows only require the handle for grouping and the rule fields (Rule: Product Column, Rule: Relation, Rule: Condition). All three rule fields are required for each rule row.

Products

Products that belong to the smart collection based on the defined rules. You can also manually adjust product positions when Sort Order is set to MANUAL.

Product: ID

Description

Example Value

Product identifier

987654

The unique identifier of a product in this collection.

Product: Handle

Description

Example Value

Product URL handle

blue-t-shirt

The URL handle of a product in this collection. Used as an alternative way to identify products when Product ID is not available.

Product: Position

Description

Example Value

Display order in collection

1

The position of the product in the collection. Only applies when Sort Order is set to MANUAL.

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:

  • SEO Title: Metafield: title_tag

  • SEO Description: Metafield: description_tag

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

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)

  • published_at: Filter by publish date

  • title: Filter by collection title

  • updated_at: Filter by last update date

Did this answer your question?