Skip to main content

Product Metafields

These metafields are written on the Product resource. See Shop Metafields for shop-wide aggregate data, or Customer Metafields for loyalty and profile data.


Okendo Reviews App Namespace​

These metafields are app-scoped and storefront-accessible. They can be queried through the Shopify Storefront API or accessed directly in Liquid using the raw namespace: app--1576377--reviews.

Widget Snippet Metafields​

All use the namespace app--1576377--reviews and are of type multi_line_text_field. The ai_* metafields are only written when the corresponding AI feature is enabled, and are deleted when the feature is disabled or when the product has insufficient data.

KeyDescription
reviews_widget_snippetPre-rendered HTML for the Widget Plus Reviews Widget.
star_rating_snippetPre-rendered HTML for the Widget Plus Star Rating badge.
ai_keyword_filtersPre-rendered HTML snippet for AI-generated keyword filters. Displays a set of keyword chips that shoppers can use to filter reviews by topic.
ai_text_summary_snippetPre-rendered HTML snippet for the AI-generated review summary. Displays a concise text summary of the product's reviews.
ai_chat_assistant_snippetPre-rendered HTML snippet for the AI chat assistant. Includes the chat starter prompts relevant to the product.

Note: If any metafield exceeds Shopify's limit of 65,536 characters, it is deleted to avoid stale data. Check for a missing value before rendering.

Liquid Usage​

{{ product.metafields.app--1576377--reviews.reviews_widget_snippet }}
{{ product.metafields.app--1576377--reviews.star_rating_snippet }}
{{ product.metafields.app--1576377--reviews.ai_keyword_filters }}
{{ product.metafields.app--1576377--reviews.ai_text_summary_snippet }}
{{ product.metafields.app--1576377--reviews.ai_chat_assistant_snippet }}

Aggregate Data Metafields​

These are app-scoped mirrors of the reviews namespace fields, under the namespace app--1576377--reviews. They are deleted when a product has no published reviews.

KeyTypeDescription
average_ratingratingApp-scoped mirror of reviews.rating. Contains the same Shopify native rating object.
review_countnumber_integerApp-scoped mirror of reviews.rating_count. Total number of published reviews.

Liquid Usage​

{{ product.metafields.app--1576377--reviews.average_rating.value }}
{{ product.metafields.app--1576377--reviews.review_count.value }}

Okendo Namespace​

KeyTypeDescription
summaryDatajson_stringA JSON object containing aggregate review statistics for the product. Useful for custom storefront sections that need raw numbers rather than pre-rendered HTML.

Summary Data Field Reference​

FieldTypeDescription
reviewCountnumberTotal number of published reviews for the product
reviewAverageValuestringAverage star rating across all reviews, formatted to one decimal place (e.g. "4.6")
fiveStarReviewCountnumberNumber of reviews that gave a 5-star rating
mediaCountnumberNumber of reviews that include at least one photo or video
percentageRecommendednumberPercentage of reviewers who indicated they would recommend the product (e.g. 91 = 91%)
attributeRatingsarrayPer-attribute aggregate ratings, corresponding to custom range-type review questions configured in Okendo (e.g. "Comfort", "Value for Money")

Each entry in attributeRatings has the following shape:

FieldTypeDescription
titlestringDisplay name of the attribute (e.g. "Comfort")
type"range" | "centered-range"The input style used when collecting this attribute. "range" runs from a min to a max; "centered-range" has a neutral midpoint.
valuenumberAggregate (average) rating value for this attribute
minLabelstring (optional)Label at the low end of the scale (e.g. "Poor")
midLabelstring (optional)Label at the midpoint — only relevant for "centered-range" (e.g. "Average")
maxLabelstring (optional)Label at the high end of the scale (e.g. "Excellent")

Example:

"attributeRatings": [
{
"title": "Comfort",
"type": "range",
"value": 4.2,
"minLabel": "Uncomfortable",
"maxLabel": "Very comfortable"
},
{
"title": "Value for Money",
"type": "centered-range",
"value": 3.8,
"minLabel": "Poor value",
"midLabel": "Fair",
"maxLabel": "Great value"
}
]

Liquid Usage​

{{ product.metafields.okendo.summaryData.reviewCount }}
{{ product.metafields.okendo.summaryData.reviewAverageValue }}
{{ product.metafields.okendo.summaryData.fiveStarReviewCount }}
{{ product.metafields.okendo.summaryData.mediaCount }}
{{ product.metafields.okendo.summaryData.percentageRecommended }}

{% for attribute in product.metafields.okendo.summaryData.attributeRatings %}
{{ attribute.title }}: {{ attribute.value }}
{% endfor %}

Reviews Namespace​

These metafields use Shopify's built-in rating and number_integer types, making them compatible with Shopify's native metafield features such as storefront filters and product listings. See Shopify's list of standard metafield definitions for more on these types.

Both fields are deleted when a product has no published reviews. Both use the namespace reviews.

KeyTypeDescription
ratingratingThe product's average review rating, represented as a Shopify native rating object.
rating_countnumber_integerThe total number of published reviews for the product.

Liquid Usage​

{% assign rating = product.metafields.reviews.rating.value %}
<p>Average rating: {{ rating.value }} / {{ rating.scale_max }}</p>

{{ product.metafields.reviews.rating_count.value }}