younifyd
Menu

product

Retrieves a single Product by its ID or handle. Use this query to build product detail pages, access variant and pricing information, or fetch product media and metafields.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the product action (under Product).
  3. Fill in the fields below, then reference the result from later steps as {{product.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 Product($id: ID, $handle: String) {
  product(id: $id, handle: $handle) {
    availableForSale
    category {
      ancestors
      id
      name
    }
    compareAtPriceRange {
      maxVariantPrice {
        amount
        currencyCode
      }
      minVariantPrice {
        amount
        currencyCode
      }
    }
    createdAt
    descriptionHtml
    encodedVariantAvailability
    encodedVariantExistence
    featuredImage {
      altText
      height
      id
      originalSrc
      src
      thumbhash
      width
    }
    handle
    id
    isGiftCard
    onlineStoreUrl
    priceRange {
      maxVariantPrice {
        amount
        currencyCode
      }
      minVariantPrice {
        amount
        currencyCode
      }
    }
    productType
    publishedAt
    requiresSellingPlan
    seo {
      description
      title
    }
    tags
    title
    totalInventory
    trackingParameters
    updatedAt
    variantsCount {
      count
      precision
    }
    vendor
  }
}

Variables

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

idstring

The ID of the `Product`.

handlestring

The handle of the `Product`.

json
{
  "id": "string",
  "handle": "string"
}

Response

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

availableForSaleboolean
categoryobject
ancestorsarray<object>
idstring
namestring
compareAtPriceRangeobject
maxVariantPriceobject2 fields
minVariantPriceobject2 fields
createdAtstring
descriptionHtmlstring
encodedVariantAvailabilitystring
encodedVariantExistencestring
featuredImageobject
altTextstring
heightnumber
idstring
originalSrcstring
srcstring
thumbhashstring
widthnumber
handlestring
idstring
isGiftCardboolean
onlineStoreUrlstring
priceRangeobject
maxVariantPriceobject2 fields
minVariantPriceobject2 fields
productTypestring
publishedAtstring
requiresSellingPlanboolean
seoobject
descriptionstring
titlestring
tagsarray<string>
titlestring
totalInventorynumber
trackingParametersstring
updatedAtstring
variantsCountobject
countnumber
precisionstring

One ofEXACTAT_LEAST

vendorstring

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