Skip to main content
mutation

Requires write_products access scope. Also: The app must have access to the input fields used to create the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to create collection.

Creates a collection to group products together in the online store and other sales channels. For example, an athletics store might create different collections for running attire, shoes, and accessories.

Use the collectionCreate mutation when you need to:

  • Create a new collection for a product launch or campaign
  • Organize products by category, season, or promotion
  • Automate product grouping using conditions (for example, by tag, type, or price)

Collections can include products manually and can also include products automatically based on rules, sources, or conditions.

Defining a collection's membership

Define membership with sources on the collection argument (CollectionCreateInput). Each source adds products through conditions (such as product tag, title, or metafield—see CollectionSourceInclusionConditionInput for the full list) and through manual selections.


Note

The input argument and its ruleSet field are deprecated. Existing integrations should migrate to collection and sources — a ruleSet rule maps to an equivalent source condition (for example, a tag rule becomes a productTag condition). If both collection and input are provided, collection is used.



Note

The created collection is unpublished by default. To make it available to customers, use the publishablePublish mutation after creation.


Learn more about using metafields with collection conditions.

CollectionInput!
required

The properties to use when creating the collection.


Was this section helpful?

Anchor to CollectionCreatePayload returnsCollectionCreatePayload returns

Collection

The collection that has been created.

[UserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?