# Metafield Creation

Metafields allow you to store additional information that isn’t included in Shopify by default. They help you add custom details to products, collections, customers, orders, and other areas of your store. These fields can be used to display extra information on the storefront, power dynamic theme sections, or support specific app features.

***

### **How to Create a Metafield Definition**

Follow the steps below to create new metafields for your store:

1. **Go to Shopify Admin**\
   Open your Shopify dashboard and click **Settings** at the bottom-left.
2. **Open Custom Data**\
   Select **Custom data** from the left-hand menu.
3. **Choose an Object Type**\
   Click the object where you want to add a metafield, such as:
   * Products
   * Collections
   * Customers
   * Orders
   * Variants, etc.
4. **Add a New Definition**\
   Click **Add definition**.
5. **Set Up the Metafield Properties**
   * **Name:** Give a clear label (e.g., Material, Ingredients, Care Guide).
   * **Namespace and Key:** Create a unique identifier (e.g., `custom.material`).
   * **Content Type:** Select the appropriate data type:
     1. Text
     2. Number
     3. URL
     4. File
     5. Date
     6. Color
     7. Rating
     8. Boolean
     9. And more.
   * **Example:** For a “Material” field, choose **Single line text**.
6. **Save the Definition**\
   Click **Save** to finish adding the metafield.

***

### **How to Add Metafield Values**

Once a metafield definition is created, you can start entering values:

1. Open the **product, collection, customer**, or other object where you want to add data.
2. Scroll down to the **Metafields** section.
3. Enter the value in the provided field.
   * Example for a product: Material → *Cotton*
   * Example for a customer: Size Preference → *Large*
4. Click **Save**.

***

### **Examples of Common Metafields**

* **Product Metafields**
  1. Material → Cotton
  2. Stone Shape → Round
  3. Care Instruction → Hand wash only
  4. Additional Image → File upload
  5. Video URL → Link to video
* **Collection Metafields**
  1. Banner Image
  2. Short Description
  3. Tagline

***

### **Where Metafields Are Used**

Metafields help you:

* Display custom data on product pages (e.g., materials, delivery info, ingredient lists).
* Manage additional content for collections and pages.
* Store customer preferences and personalize the shopping experience.
* Power dynamic content in custom Shopify themes.

### How to create metafields?

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Flf0zuS3pnoHVKPsHAmfW%2Fuploads%2F8J72URYkHGPqRgsM0sDi%2F5%20-%20Metafield.mp4?alt=media&token=d79fa7a7-236f-483d-856d-7c877398497d>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wedesigntech-1.gitbook.io/elegance/template-creation/metafield-creation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
