Collection Create Payload
Return type for mutation.
Anchor to FieldsFields
- collection (Collection)
- userErrors ([UserError!]!)
- Anchor to collectioncollection•Collection
The collection that has been created.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Anchor to Mutations with this payloadMutations with this payload
- collectionCreate (CollectionCreatePayload)
- •mutation
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.
There are two types of collections:
- Custom (manual) collections: You specify the products to include in a collection.
- Smart (automated) collections: You define rules, and products matching those rules are automatically included in the collection.
Use the
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 rules (for example, by tag, type, or price)
NoteNote: The created collection is unpublished by default. To make it available to customers, use the <a href="https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish"><code><span class="PreventFireFoxApplyingGapToWBR">publishable<wbr/>Publish</span></code></a> mutation after creation.
Learn more about using metafields with smart collections.
- Anchor to inputinput•Collection
Input! required The properties to use when creating the collection.
Arguments