---
updatedAt: 2026-10-29T10:59:17.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# About reviews metadata

> 🚧 Important:
>
> You can display metadata regardless of the eCommerce platform you are using. However, metadata filtering is currently available exclusively to merchants using non-hosted custom or generic eCommerce platforms. Please contact your Yotpo representative if you'd like to start leveraging orders metadata in reviews.
>
> **Review-related metadata takes 6 hours to appear in Yotpo Reviews and on-site.**

Leverage metadata collected upon order creation to allow shoppers to filter reviews according to customer, order, and/or product-related fields such as membership type, location, delivery type, order history, and more!

![](https://files.readme.io/0f41627-screenshot-soldejaneiro.com-2019.11.20-14-54-48.png "screenshot-soldejaneiro.com-2019.11.20-14-54-48.png")

Using Yotpo's new order creation schema, you can configure predefined or custom properties to collect and leverage as filters right in your reviews widget. You can also choose whether to reflect this data in-line within each review. <a href="https://support.yotpo.com/en/article/the-reviews-widget-7793371#filter-by-metadata" target="_blank"> Learn more</a>

## Widget pre-sorting

Pre-sorting your widget allows you to surface certain reviews based on your sorting criteria. The widget will load in a pre-sorted state according to the metadata parameters defined upon order creation.

To pre-sort your Reviews Widget according to metadata params, add the snippet below to your Reviews Widget snippet:

```html
data-presorting='[
{"type": "customer_property", "key": "state", "value": "New York"},
{"type": "customer_custom_property", "key": "age", "value": 22},
{"type": "customer_custom_property", "key": "still_alive", "value": true}
]'
```

## Widget pre-filtering

Pre-filtering your widget allows you to display only certain reviews based on your filtering criteria. The widget will load in a pre-sorted state according to the metadata parameters defined upon order creation.

To pre-filter your Reviews Widget according to metadata params, add the snippet below to your Reviews Widget:

```html
data-prefilter='{
"order_properties":{"year":["2017"]},
"customer_properties":{"state": ["New York"]},
"customer_custom_properties":null}'
```

## Pre-sorted, pre-filtered widget

The snippet below reflects the Yotpo Reviews Widget with pre-filtered and pre-sorted fields:

```html
<div class="yotpo yotpo-main-widget"
data-product-id="{{ product.id }}"
data-name="{{ product.title | escape }}"
data-url="{{ shop.url }}{{ product.url }}"
data-image-url="{{ product.featured_image | product_img_url: "large" |replace: '?', '%3F' | replace: '&','%26'}}"
data-description="{{ product.description | escape }}"
data-prefilter='{"order_properties":{"year":["2017"]},"customer_properties":{"state": ["New York"]},"customer_custom_properties":null}'
data-presorting='[{"type": "customer_property", "key": "state", "value": "New York"},{"type": "customer_property", "key": "age", "value": 22},{"type": "customer_property", "key": "still_alive", "value": true}]'>
</div>
```

> 👍 Additional metadata fields are available!
>
> You can include product properties such as color, size, and material, order properties such as delivery type, or customer properties such as country, address, and phone number.

## Reviews metadata endpoints

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Endpoint
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <a href="/reference/create-order" target="_blank">Create an order within the Yotpo system</a>
      </td>

      <td>
        Use this endpoint to create orders within the Yotpo system. For metadata fields and properties, see the **Create Order + Order Metadata** body sample.
      </td>
    </tr>

    <tr>
      <td>
        [Create review](https://docs.yotpo.com/reference/create-review)
      </td>

      <td>
        Use this endpoint to asynchronously create reviews in the Yotpo system. For metadata fields and properties, see the **Create Review + Metadata** body sample.
      </td>
    </tr>

    <tr>
      <td>
        [Add metadata to an existing review](https://docs.yotpo.com/reference/add-metadata-to-an-existing-review)
      </td>

      <td>
        Use this endpoint to add metadata to an existing review. The `review_id` can be retrieved using the **Retrieve All Reviews** endpoint.
      </td>
    </tr>

    <tr>
      <td>
        [Get review metadata](https://docs.yotpo.com/reference/get-review-metadata-by-review-id)
      </td>

      <td>
        Use this endpoint to retrieve a review's order, customer, and product metadata by `review_id`. The `review_id` can be retrieved using the **Retrieve All Reviews** endpoint.
      </td>
    </tr>

    <tr>
      <td>
        [Update existing review metadata](https://docs.yotpo.com/reference/update-existing-review-metadata)
      </td>

      <td>
        Use this endpoint to update or remove metadata associated with an existing review. The `review_id` can be retrieved using the **Retrieve All Reviews** endpoint.
      </td>
    </tr>

    <tr>
      <td>
        [Retrieve review filters and values](https://docs.yotpo.com/reference/get-filters-and-values)
      </td>

      <td>
        If you're collecting orders metadata properties, this call can be used to retrieve all possible filter-types, and their corresponding values, for a specific product.  

        For example, `hair_type` and `straight`,`curly`,`short`,`damaged`, etc.  

        * \*Important:\*\* In order to retrieve filters and values, the product (`domain_key`) defined must have at least one review published to the Reviews Widget.
      </td>
    </tr>
  </tbody>
</Table>

## Metadata properties

> 📘 Tip:
>
> The predefined and custom metadata properties below can be leveraged to pre-sort and/or pre-filter your Reviews Widget according to the properties you configure. <a href="https://support.yotpo.com/docs/reviews-widget-smart-filters#filter-by-metadata" a target="_blank">Learn more</a>

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Properties
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Predefined Properties
      </td>

      <td>
        Yotpo supports several predefined fields on products, orders, and customers:  

        * `product_properties`: Color, Size, Vendor, Material, Model, Coupon Used
        * `order_properties`: Coupon Used, Delivery type
        * `customer_properties`: State, Country, Address, Phone NumberThese fields are all optional.Note: You can use `order_properties` only for reviews that have the `order_id` attached to them. If there is no `order_id`, you can use only `custom_order_properties`.
      </td>
    </tr>

    <tr>
      <td>
        Custom Properties
      </td>

      <td>
        Custom properties can be included in orders and retrieved as part of reviews.  

        There are three types of custom fields:  

        * `custom_product_properties`
        * `custom_customer_properties`
        * `custom_order_properties`These fields are all optional.
      </td>
    </tr>

    <tr>
      <td>
        Validations & Errors
      </td>

      <td>
        Field names are not case sensitive and can contain numbers & symbols.\
        Two fields cannot have the same name.\
        **There’s a limit of 10 custom fields per type (order/customer/product).** 
      </td>
    </tr>

    <tr>
      <td>
        General
      </td>

      <td>
        Fields are case sensitive everywhere they’re configured.
      </td>
    </tr>
  </tbody>
</Table>

> 🚧 Country codes for `customer.country` param:
>
> To comply with Google Seller Ratings conventions, the `customer.country` param requires\
> two-letter uppercase country code values from <a href="https://datahub.io/core/country-list" target="_blank">this list</a> of compatible codes. Default country code: `US`

# Sibling pages

* [Retrieve review filters and values](https://docs.yotpo.com/reference/get-filters-and-values.md)