younifyd
Menu

inventoryItem

Fetch a single inventory item by its ID.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the inventoryItem action (under Inventory).
  3. Fill in the fields below, then reference the result from later steps as {{inventoryitem.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query InventoryItem($id: ID!) {
  inventoryItem(id: $id) {
    countryCodeOfOrigin
    createdAt
    duplicateSkuCount
    harmonizedSystemCode
    id
    inventoryHistoryUrl
    legacyResourceId
    locationsCount {
      count
      precision
    }
    measurement {
      id
      weight {
        unit
        value
      }
    }
    provinceCodeOfOrigin
    requiresShipping
    sku
    tracked
    trackedEditable {
      locked
      reason
    }
    unitCost {
      amount
      currencyCode
    }
    updatedAt
    variant {
      availableForSale
      availablePublicationsCount {
        count
        precision
      }
      barcode
      compareAtPrice
      createdAt
      defaultCursor
      deliveryProfile {
        activeMethodDefinitionsCount
        coversAllItems
        default
        id
        locationsWithoutRatesCount
        name
        originLocationCount
        productVariantsCount
        productVariantsCountV2
        unassignedLocations
        version
        zoneCountryCount
      }
      displayName
      id
      inventoryItem
      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
    }
  }
}

Variables

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

idstringrequired

The ID of the `InventoryItem` to return.

json
{
  "id": "string"
}

Response

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

countryCodeOfOriginstring

One ofAFAXALDZADAOAIAGARAMAWACAUATAZBSBHBDBBBYBEBZBJBMBTBOBABWBVBRIOBNBGBFBIKHCACVBQKY

createdAtstring
duplicateSkuCountnumber
harmonizedSystemCodestring
idstring
inventoryHistoryUrlstring
legacyResourceIdstring
locationsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

measurementobject
idstring
weightobject2 fields
provinceCodeOfOriginstring
requiresShippingboolean
skustring
trackedboolean
trackedEditableobject
lockedboolean
reasonstring
unitCostobject
amountstring
currencyCodestring

One ofUSDEURGBPCADAFNALLDZDAOAARSAMDAWGAUDBBDAZNBDTBSDBHDBIFBYNBZDBMDBTNBAMBRLBOBBWPBNDBGNMMKKHRCVEKYDXAFCLPCNYCOPKMFCDFCRCHRK

updatedAtstring
variantobject
availableForSaleboolean
availablePublicationsCountobject2 fields
barcodestring
compareAtPricestring
createdAtstring
defaultCursorstring
deliveryProfileobject12 fields
displayNamestring
idstring
inventoryItemobject

Recursive reference to InventoryItem, not further expanded.

inventoryPolicystring

One ofDENYCONTINUE

inventoryQuantitynumber
legacyResourceIdstring
positionnumber
pricestring
productobject40 fields
publishedOnCurrentChannelboolean
publishedOnCurrentPublicationboolean
requiresComponentsboolean
selectedOptionsarray<object>
sellableOnlineQuantitynumber
sellingPlanGroupCountnumber
sellingPlanGroupsCountobject2 fields
showUnitPriceboolean
skustring
storefrontIdstring
taxCodestring
taxableboolean
titlestring
unitPriceobject2 fields
unitPriceMeasurementobject5 fields
updatedAtstring

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

inventoryItem — Shopify — Documentation