Menu
quantityRulesAdd
Creates or updates existing quantity rules on a price list. You can use the quantityRulesAdd mutation to set order level minimums, maximumums and increments for specific product variants.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the quantityRulesAdd action (under Quantity).
- Fill in the fields below, then reference the result from later steps as
{{quantityrulesadd.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation QuantityRulesAdd($priceListId: ID!, $quantityRules: [QuantityRuleInput!]!) {
quantityRulesAdd(priceListId: $priceListId, quantityRules: $quantityRules) {
quantityRules {
increment
isDefault
maximum
minimum
originType
productVariant {
availableForSale
availablePublicationsCount
barcode
compareAtPrice
createdAt
defaultCursor
deliveryProfile
displayName
id
inventoryItem
inventoryPolicy
inventoryQuantity
legacyResourceId
position
price
product
publishedOnCurrentChannel
publishedOnCurrentPublication
requiresComponents
selectedOptions
sellableOnlineQuantity
sellingPlanGroupCount
sellingPlanGroupsCount
showUnitPrice
sku
storefrontId
taxCode
taxable
title
unitPrice
unitPriceMeasurement
updatedAt
}
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"priceListId": "string",
"quantityRules": [
{
"increment": 0,
"minimum": 0,
"variantId": "string",
"maximum": 0
}
]
}
Response
Read the result with {{quantityrulesadd.response.data.data.quantityRulesAdd}}. If the API returns errors, the step fails and they are at {{quantityrulesadd.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?