> For the complete documentation index, see [llms.txt](https://ta-product-labels-and-badges.tech-arms.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ta-product-labels-and-badges.tech-arms.io/setup-conditions/product-conditions/include-products/how-to-use-product-metafields-to-customize-label-badge-display.md).

# How to Use Product Metafields to Customize Label/Badge Display?

### 1. What is a Metafield? <a href="#id-1.-what-is-a-metafield" id="id-1.-what-is-a-metafield"></a>

Metafields in Shopify allow you to store custom information that isn't captured in the standard Shopify admin. They can help customize your store’s functionality and appearance.

For example, if you want to store information about a product’s origin, like "Organic", but Shopify doesn’t have a place for it, you can use Metafields to save this info.

💡 **Metafield = custom data attached to a product**

Learn how to create a Product Metafield here: [How to Create Product Metafields in Shopify: A Step-by-Step Guide](/faqs/pro-tips/how-to-create-product-metafields-in-shopify-a-step-by-step-guide.md)

### 2. Why Metafields Help Customize Label/Badge Display? <a href="#id-2.-why-metafields-help-customize-label-badge-display" id="id-2.-why-metafields-help-customize-label-badge-display"></a>

Our app allows you to add labels or badges to products based on the values stored in metafields, such as product origin, ratings, or other unique characteristics. This feature enables you to customize product displays in your store quickly.

### 3. Step-by-step Guide <a href="#id-3.-step-by-step-guide" id="id-3.-step-by-step-guide"></a>

#### 1️⃣ Step 1: Choose Display Condition Type <a href="#id-1-step-1-choose-display-condition-type" id="id-1-step-1-choose-display-condition-type"></a>

Go to **Product Conditions** > Select **With specific Metafield(s)**

<figure><img src="https://product-labels-docs.tech-arms.io/~gitbook/image?url=https%3A%2F%2F340561356-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNvBHInFsm4Ct08xZ2f0e%252Fuploads%252Fgit-blob-d10967c11157887f9451ee1cb71916f3e1c0095d%252Fimage%2520%28132%29.png%3Falt%3Dmedia&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=306bd84b&#x26;sv=2" alt=""><figcaption><p>Select With Specific Metafield(s)</p></figcaption></figure>

#### 2️⃣ Step 2: Choose the Metafield You Want to Use <a href="#id-2-step-2-choose-the-metafield-you-want-to-use" id="id-2-step-2-choose-the-metafield-you-want-to-use"></a>

* Click **Add Metafield**
* Choose **Metafield type = Product Metafield**
* Choose a Metafield from your existing **Shopify Metafield list**.

<figure><img src="https://product-labels-docs.tech-arms.io/~gitbook/image?url=https%3A%2F%2F340561356-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNvBHInFsm4Ct08xZ2f0e%252Fuploads%252Fgit-blob-55a5a348b51e423e85972868f3d25bd4bd78e256%252Fmetafield1.gif%3Falt%3Dmedia&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=e3df5197&#x26;sv=2" alt=""><figcaption><p>Select Metafield</p></figcaption></figure>

* Our app supports many data types, including:
  * Single line text, Multi-line text
  * Integer, Decimal, Date and Time, Date
  * Dimension, Volume, Weight, True or False, Color (code)
  * Rating, Money

#### 3️⃣ Step 3: Enter the Value You Want to Match <a href="#id-3-step-3-enter-the-value-you-want-to-match" id="id-3-step-3-enter-the-value-you-want-to-match"></a>

Enter the value you want to match for the Metafield. The app will then find products with matching values and display the corresponding label/badge

<figure><img src="https://product-labels-docs.tech-arms.io/~gitbook/image?url=https%3A%2F%2F340561356-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNvBHInFsm4Ct08xZ2f0e%252Fuploads%252Fgit-blob-b492000e3d72d3f7f7c9d9e81eabc34f4ca60b46%252Fimage%2520%2818%29.png%3Falt%3Dmedia&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=e7176ecd&#x26;sv=2" alt=""><figcaption><p>Enter value you want to match</p></figcaption></figure>

**Examples:**

* Metafield `origin` = `organic`: The label/badge will appear on products where the `origin` metafield is set to `organic`
* Metafield `rating` = `5`: The label/badge will appear on products where the `rating` metafield is set to `5` .

You can also add a list of values to the metafield condition. Learn more in this article: [Using a List of Values Metafield to Display Labels/Badges](/setup-conditions/product-conditions/include-products/using-a-list-of-values-metafield-to-display-labels-badges.md)

#### 4️⃣ Step 4: Choose Matching Option <a href="#id-4-step-4-choose-matching-option" id="id-4-step-4-choose-matching-option"></a>

In this step, you will define the logic for how the system validates your Metafield data to display labels/badges. There are two levels of matching logic you should consider:

**a. Value Matching Type (Individual Metafield Logic)**

Depending on the Metafield type you selected, the system provides specific matching options:

* **For Single Value Metafields:**
  * **Exist:** The condition is met if the Metafield has any value assigned to the product (regardless of the content).
  * **Match at least one of:** The condition is met if the product's Metafield value matches at least one of the values you entered.
* **For List of Values Metafields:**
  * **Exist:** The condition is met if the Metafield has any value assigned to the product (regardless of the content).
  * **Include:** The condition is met if the product contains **all** the values you entered (the product may have additional values as well).
  * **Match all of:** The condition is met if the product's list **exactly matches** your input (identical content and quantity).
  * **Match at least one of:** The condition is met if **at least one** value in the product's list matches your input.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2FLSet8LOLV8oQWoZ3GiHF%2Fimage.png?alt=media&amp;token=35786591-e8b1-4dc0-bfe6-f076e95bbcd9" alt=""><figcaption></figcaption></figure>

**b. Metafield Matching Type (Logic Between Multiple Metafields)**

If you select **two or more Metafields**, this section will appear at the bottom to determine how they interact:

* **Must satisfy all metafields (Match all):** The product must meet the conditions of **every** selected Metafield to display the label.
* **Just need to satisfy 1 of all metafields (Match one):** The product only needs to meet **at least one** of the selected Metafield conditions to display the label.

<figure><img src="https://4175789379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hvZuxfHGxWaI6LN7rVY%2Fuploads%2FTDwNin7T8wgsBEeChc02%2Fimage.png?alt=media&amp;token=3f831b9d-c813-4625-8543-5f25923c92a8" alt=""><figcaption></figcaption></figure>

#### 5️⃣ Step 5: Save and Preview on Your Storefront <a href="#id-5-step-5-save-and-preview-on-your-storefront" id="id-5-step-5-save-and-preview-on-your-storefront"></a>

### 4. Pro Tips <a href="#id-4.-pro-tips" id="id-4.-pro-tips"></a>

* Be sure to enter values correctly for your Metafields.
* Ensure that Storefront API access is turned on in the Metafield.

  <figure><img src="https://product-labels-docs.tech-arms.io/~gitbook/image?url=https%3A%2F%2F340561356-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNvBHInFsm4Ct08xZ2f0e%252Fuploads%252FJpuTDnUE2ibriZxPUt1F%252Fimage.png%3Falt%3Dmedia%26token%3Dbfd1211b-e559-47d3-96e5-4892404d9f5c&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=2b8274e4&#x26;sv=2" alt=""><figcaption></figcaption></figure>
* This feature is available from the **Pro** plan.
* Ensure your product has the Metafield with the value you set.
* You can also use variant metafields as conditions to display labels or badges: [How to Use Variant Metafields to Customize Label/Badge Display](/setup-conditions/product-conditions/include-products/how-to-use-variant-metafields-to-customize-label-badge-display.md)
