Quantity Rule
Requires access scope.
The quantity rule for the product variant in a given context.
Anchor to FieldsFields
- Anchor to incrementincrement•Int!non-null
The value that specifies the quantity increment between minimum and maximum of the rule. Only quantities divisible by this value will be considered valid.
The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum must be divisible by this value.
- Anchor to isDefaultis•Boolean!
Default non-null Whether the quantity rule fields match one increment, one minimum and no maximum.
- Anchor to maximummaximum•Int
An optional value that defines the highest allowed quantity purchased by the customer. If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment.
- Anchor to minimumminimum•Int!non-null
The value that defines the lowest allowed quantity purchased by the customer. The minimum must be a multiple of the quantity rule's increment.
- Anchor to originTypeorigin•Quantity
Type Rule Origin Type! non-null Whether the values of the quantity rule were explicitly set.
- Anchor to productVariantproduct•Product
Variant Variant! non-null The product variant for which the quantity rule is applied.
Anchor to MutationsMutations
- •mutation
Creates or updates existing quantity rules on a price list. You can use the
mutation to set order level minimums, maximumums and increments for specific product variants.
- Anchor to priceListIdprice•ID!
List Id required The ID of the price list to which the quantity rules will be added or updated.
- Anchor to quantityRulesquantity•[Quantity
Rules Rule Input!]! required The list of quantity rules to add or update in the price list.
Arguments
- Anchor to quantityRulesquantity•[Quantity
Rules Rule!] The list of quantity rules that were added to or updated in the price list.
- Anchor to userErrorsuser•[Quantity
Errors Rule User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields