Skip to main content

variantAnalytics

Requires permission products:product:read.

Returns variant statistics for your organization: totals of active and inactive variants, the average number of variants per product, variants per product, and lists of top-selling and low-stock variants. Needs the products read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query VariantAnalytics {
variantAnalytics {
distribution {
__typename
}
}
}

Response:

{
"data": {
"variantAnalytics": {
"distribution": {
"__typename": "VariantDistribution"
}
}
}
}
variantAnalytics: VariantAnalytics!

Type​

VariantAnalytics object​

Figures about the variants.