Queries and mutations for managing Product Selections in the platform.

Queries

Query Product Selections

QUERYproductSelections
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Get Product Selection

QUERYproductSelection
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Query Product Selection Assignments

QUERYproductSelectionAssignments
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Mutations

Create Product Selection

MUTATIONcreateProductSelection
Arguments
draft​

Update Product Selection

MUTATIONupdateProductSelection
Arguments
version​
Long​
actions​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Delete Product Selection

MUTATIONdeleteProductSelection
Arguments
version​
Long​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output types

ProductSelection

key​
String​

User-defined unique identifier of the ProductSelection.

name​
String​

Name of the ProductSelection.

nameAllLocales​
Array of LocalizedString​

Name of the ProductSelection.

productRefs​
productCount​
Int​

Number of Products that are currently assigned to this ProductSelection.

custom​

Custom Fields of the ProductSelection.

Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
Can be Individual, or IndividualExclusion​
id​
String​

Unique identifier of the ProductSelection.

version​
Long​

Current version of the ProductSelection.

createdAt​

Date and time (UTC) the ProductSelection was initially created.

lastModifiedAt​

Date and time (UTC) the ProductSelection was last updated.

createdBy​
Present on resources created after 1/02/2019 except for events not tracked.
lastModifiedBy​
Present on resources updated after 1/02/2019 except for events not tracked.

ProductOfSelectionQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of ProductOfSelection​

ProductOfSelection

productRef​
product​
variantSelection​
variantExclusion​

ProductVariantSelection

type​
String​
skus​
Array of String​

ProductVariantExclusion

Defines the Product Variants that are excluded from a Product Selection with IndividualExclusion ProductSelectionMode. Product Variants not listed remain available in the Product Selection.
skus​
Array of String​
Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection with IndividualExclusion ProductSelectionMode.

ProductSelectionMode

Individual
Mode of Product Selection used to include a specific list of individual Products
IndividualExclusion
Mode of Product Selection used to exclude a specific list of individual Products

ProductSelectionQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of ProductSelection​

ProductAssignmentQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of ProductAssignment​

ProductAssignment

productRef​
product​
productSelectionRef​
productSelection​
variantSelection​
variantExclusion​

ProductVariantSelection

type​
String​
skus​
Array of String​

ProductVariantExclusion

Defines the Product Variants that are excluded from a Product Selection with IndividualExclusion ProductSelectionMode. Product Variants not listed remain available in the Product Selection.
skus​
Array of String​
Non-empty array of SKUs representing Product Variants to be excluded from the Product Selection with IndividualExclusion ProductSelectionMode.

Input types

CreateProductSelectionDraft

key​
String​
name​
Can be Individual, or IndividualExclusion​
custom​

ProductSelectionMode

Individual
Mode of Product Selection used to include a specific list of individual Products
IndividualExclusion
Mode of Product Selection used to exclude a specific list of individual Products

ProductSelectionUpdateAction

addProduct​
changeName​
excludeProduct​
removeProduct​
setCustomField​
setCustomType​
setKey​
setVariantExclusion​
setVariantSelection​

Update actions

Add Product

Adds a Product to the Product Selection.

If the specified Product is already assigned to the Product Selection, but the existing Product Selection has a different Product Variant Selection, a ProductPresentWithDifferentVariantSelection error is returned.

ResourceIdentifier of the Product

variantSelection​

Defines which Variants of the Product will be included in the Product Selection. If not supplied all Variants are deemed to be included.

ProductVariantSelectionDraft

includeOnly​
Array of String​
includeAllExcept​
Array of String​

Change Name

name​

The new name to be set for the ProductSelection.

Exclude Product

variantExclusion​

ProductVariantExclusionDraft

skus​
Array of String​

Remove Product

ResourceIdentifier of the Product

Set Custom Field

name​
String​
Name of the Custom Field.
value​
String​
If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

Set Custom Type

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set Key

key​
String​
If key is absent or null, the existing key, if any, will be removed.

Set Variant Exclusion

Updates the Product Variant Exclusion of an existing Product Selection Assignment. A ProductVariantExclusion can only be set if the Product has already been excluded from the Product Selection with IndividualExclusion ProductSelectionMode.
If the specified Product is not assigned to the Product Selection, a ProductAssignmentMissing error is returned.

ResourceIdentifier of the Product

variantExclusion​
Determines which Variants of the previously excluded Product are to be excluded from the Product Selection with IndividualExclusion ProductSelectionMode. Leave it empty to unset an existing Variant Exclusion.

ProductVariantExclusionDraft

skus​
Array of String​

Set Variant Selection

Updates the Product Variant Selection of an existing Product Selection Assignment. A ProductVariantSelection can only be set if the Product has already been included in the Product Selection with Individual ProductSelectionMode.
If the specified Product is not assigned to the Product Selection, a ProductAssignmentMissing error is returned.

ResourceIdentifier of the Product

variantSelection​

Determines which Variants of the previously added Product are to be included in, or excluded from, the Product Selection. Leave it empty to unset an existing Variant Selection.

ProductVariantSelectionDraft

includeOnly​
Array of String​
includeAllExcept​
Array of String​