Queries and mutations for managing Discount Groups in the platform.
Queries
Query Discount Groups
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Discount Group
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Mutations
Create Discount Group
Update Discount Group
| Arguments | |
|---|---|
versionLong | |
actionsArray of DiscountGroupUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Discount Group
| Arguments | |
|---|---|
versionLong | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Output types
DiscountGroup
Allowing to group discounts.
idString | Unique identifier of the DiscountGroup. |
versionLong | Current version of the DiscountGroup. |
keyString | User-defined unique identifier of the DiscountGroup. |
sortOrderString | Value between
0 and 1 that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.The sort order is unique among all DiscountGroups and CartDiscounts. |
isActiveBoolean | A DiscountGroup must be active for its CartDiscounts to be considered during discount application. |
nameString | Name of the DiscountGroup. |
nameAllLocalesArray of LocalizedString | Name of the DiscountGroup. |
descriptionString | Description of the DiscountGroup. |
descriptionAllLocalesArray of LocalizedString | Description of the DiscountGroup. |
createdAt | Date and time (UTC) the DiscountGroup was initially created. |
lastModifiedAt | Date and time (UTC) the DiscountGroup was last updated. |
createdBy | IDs and references that created the DiscountGroup. |
lastModifiedBy | IDs and references that last modified the DiscountGroup. |
Discount Group Query Result
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of DiscountGroup |
Input types
DiscountGroupDraft
keyString | User-defined unique identifier for the DiscountGroup. If the value is used by another Discount Group, a DuplicateField error is returned. |
sortOrderString | Value between
0 and 1 that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.If the value is used by another Cart Discount or Discount Group, a DuplicateField error is returned. |
nameArray of LocalizedStringItemInputType | Name of the DiscountGroup. |
isActiveBoolean | A DiscountGroup must be active for its CartDiscounts to be considered during discount application. Default:true |
descriptionArray of LocalizedStringItemInputType | Description for the DiscountGroup. |
DiscountGroupUpdateAction
setKey | |
setSortOrder | |
setName | |
setIsActive | |
setDescription |
Update actions
Set Key
keyString | New value to set. If the value is used by another Discount Group, a DuplicateField error is returned. |
Set Sort Order
sortOrderString | New value to set (between
0 and 1).
A CartDiscount with a higher value will be prioritized.If the value is used by another Cart Discount or Discount Group, a DuplicateField error is returned. |
Set Name
nameArray of LocalizedStringItemInputType | New value to set. If omitted, any existing value is removed. |
Set Is Active
isActiveBoolean | New value to set. A DiscountGroup must be active for its CartDiscounts to be considered during discount application. |
Set Description
descriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |