younifyd
Menu

quantityPricingByVariantUpdate

Updates quantity pricing on a PriceList for specific ProductVariant objects. You can set fixed prices (see PriceListPrice), quantity rules, and quantity price breaks in a single operation.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the quantityPricingByVariantUpdate action (under Quantity).
  3. Fill in the fields below, then reference the result from later steps as {{quantitypricingbyvariantupdate.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.

graphql
mutation QuantityPricingByVariantUpdate($priceListId: ID!, $input: QuantityPricingByVariantUpdateInput!) {
  quantityPricingByVariantUpdate(priceListId: $priceListId, input: $input) {
    productVariants {
      availableForSale
      availablePublicationsCount {
        count
        precision
      }
      barcode
      compareAtPrice
      createdAt
      defaultCursor
      deliveryProfile {
        activeMethodDefinitionsCount
        coversAllItems
        default
        id
        locationsWithoutRatesCount
        name
        originLocationCount
        productVariantsCount
        productVariantsCountV2
        unassignedLocations
        version
        zoneCountryCount
      }
      displayName
      id
      inventoryItem {
        countryCodeOfOrigin
        createdAt
        duplicateSkuCount
        harmonizedSystemCode
        id
        inventoryHistoryUrl
        legacyResourceId
        locationsCount
        measurement
        provinceCodeOfOrigin
        requiresShipping
        sku
        tracked
        trackedEditable
        unitCost
        updatedAt
        variant
      }
      inventoryPolicy
      inventoryQuantity
      legacyResourceId
      position
      price
      product {
        availablePublicationsCount
        bodyHtml
        bundleConsolidatedOptions
        category
        combinedListing
        combinedListingRole
        compareAtPriceRange
        createdAt
        customProductType
        defaultCursor
        descriptionHtml
        descriptionPlainSummary
        featuredImage
        featuredMedia
        feedback
        giftCardSettings
        giftCardTemplateSuffix
        handle
        hasOnlyDefaultVariant
        hasOutOfStockVariants
        hasVariantsThatRequiresComponents
        id
        isGiftCard
        legacyResourceId
        mediaCount
        onlineStorePreviewUrl
        onlineStoreUrl
        priceRange
        priceRangeV2
        productCategory
        productComponentsCount
        productType
        publishedAt
        publishedOnCurrentChannel
        publishedOnCurrentPublication
        requiresSellingPlan
        resourcePublicationOnCurrentPublication
        sellingPlanGroupCount
        sellingPlanGroupsCount
        seo
        standardizedProductType
        status
        storefrontId
        tags
        templateSuffix
        title
        totalInventory
        totalVariants
        tracksInventory
        updatedAt
        variantsCount
        vendor
      }
      publishedOnCurrentChannel
      publishedOnCurrentPublication
      requiresComponents
      selectedOptions {
        name
        optionValue
        value
      }
      sellableOnlineQuantity
      sellingPlanGroupCount
      sellingPlanGroupsCount {
        count
        precision
      }
      showUnitPrice
      sku
      storefrontId
      taxCode
      taxable
      title
      unitPrice {
        amount
        currencyCode
      }
      unitPriceMeasurement {
        measuredType
        quantityUnit
        quantityValue
        referenceUnit
        referenceValue
      }
      updatedAt
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

priceListIdstringrequired

The ID of the price list for which quantity pricing will be updated.

inputobjectrequired

The input data used to update the quantity pricing in the price list.

quantityPriceBreaksToAddarray<object>required3 fields
quantityPriceBreaksToDeletearray<string>required
quantityPriceBreaksToDeleteByVariantIdarray<string>
quantityRulesToAddarray<object>required4 fields
quantityRulesToDeleteByVariantIdarray<string>required
pricesToAddarray<object>required3 fields
pricesToDeleteByVariantIdarray<string>required
json
{
  "priceListId": "string",
  "input": {
    "quantityPriceBreaksToAdd": [
      {
        "variantId": "string",
        "price": "string",
        "minimumQuantity": "string"
      }
    ],
    "quantityPriceBreaksToDelete": [
      "string"
    ],
    "quantityRulesToAdd": [
      {
        "increment": "string",
        "minimum": "string",
        "variantId": "string",
        "maximum": "string"
      }
    ],
    "quantityRulesToDeleteByVariantId": [
      "string"
    ],
    "pricesToAdd": [
      {
        "variantId": "string",
        "price": "string",
        "compareAtPrice": "string"
      }
    ],
    "pricesToDeleteByVariantId": [
      "string"
    ],
    "quantityPriceBreaksToDeleteByVariantId": [
      "string"
    ]
  }
}

Response

Read the result with {{quantitypricingbyvariantupdate.response.data.data.quantityPricingByVariantUpdate}}. If the API returns errors, the step fails and they are at {{quantitypricingbyvariantupdate.response.data.errors}}.

productVariantsarray<object>
availableForSaleobject
availablePublicationsCountobject
barcodeobject
compareAtPriceobject
createdAtobject
defaultCursorobject
deliveryProfileobject
displayNameobject
idobject
inventoryItemobject
inventoryPolicyobject
inventoryQuantityobject
legacyResourceIdobject
positionobject
priceobject
productobject
publishedOnCurrentChannelobject
publishedOnCurrentPublicationobject
requiresComponentsobject
selectedOptionsobject
sellableOnlineQuantityobject
sellingPlanGroupCountobject
sellingPlanGroupsCountobject
showUnitPriceobject
skuobject
storefrontIdobject
taxCodeobject
taxableobject
titleobject
unitPriceobject
unitPriceMeasurementobject
updatedAtobject
userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.