Shopify Retrieve Product Details
Retrieves detailed information about a Shopify product (and optionally a product variant) including metafields.
This action supports fetching product-level, variant-level, and metafield-level data β with the ability to limit returned objects to reduce payload size.
Behind the scenes, it uses the Shopify Admin GraphQL API endpoint:
https://shopify.dev/docs/api/admin-graphql/latest/queries/product
and
https://shopify.dev/docs/api/admin-graphql/latest/queries/productvariant
Inputs
Name | Type | Description |
---|---|---|
Shopify Token | SensitiveString | Shopify private app access token or API access token. |
Shopify Domain | String | Your Shopify subdomain (e.g. yourstore.myshopify.com ). |
Which Way to Lookup Product Info? | String | Determines how the lookup is performed. Options: "using order line" , "using product only" , "using product and variant" . |
Product | Optional Number | Product ID to lookup. Used when mode is "using product only" or "using product and variant" . |
Product Variant | Optional Number | Product Variant ID to lookup. Used when mode is "using product and variant" . |
Line Item | Optional Object | Shopify order line item object. If provided and mode is "using order line" , product and variant IDs will be extracted automatically. |
Fields to Return | Optional List | A list specifying which data objects to include in the response. Helps reduce payload size. Possible values: ["product", "productMetafields", "productVariant", "productVariantMetafields"] . Example: ["productVariant", "productMetafields"] . |
Outputs
Name | Type | Description |
---|---|---|
Success | Boolean | Whether the product and/or variant details were successfully retrieved. |
Product Fields | Object | Core product details (excluding metafields). |
Product Metafields | Object | Product metafields, if any exist. |
Product Variant Fields | Object | Core product variant details (excluding metafields). |
Product Variant Metafields | Object | Product variant metafields, if any exist. |
Found Product Metafields? | Boolean | Indicates whether product metafields were found. |
Found Product Variant? | Boolean | Indicates whether a product variant was found. |
Found Product Variant Metafields? | Boolean | Indicates whether variant metafields were found. |
Example Use Cases
- Retrieve both product and variant details including metafields for price calculation or metadata enrichment.
- Fetch only product metafields by passing
"fields_to_return": ["productMetafields"]
. - Use
"using order line"
mode inside workflows triggered by new Shopify orders.
Updated 2 days ago