Metafield content types and values
Each type of metafield accepts a range of supported values for different use cases. Refer to the following table of metafield content types for more information:
- supported values for each type of metafield
- example use cases for each type of metafield
- if the content type can be used as a metafield list
For more information, refer to the developer documentation for metafields.
Metafield content types are grouped by category based on the value of the metafield type. For example, Dimension, Volume, and Weight are all types of measurement data, and are grouped together in the Measurement category. Metafield content types are grouped into the following categories:
- Date and time
- Measurement
- Number
- Text
- Reference
- Other
- Advanced
Your most frequently used metafield types are grouped in the Most used section for easier access.
Date and time
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| Date and time | A date and time value. This metafield type supports date values in ISO 8601 format and time values in UTC time. | Yes | Add launch event dates or product release dates with times. |
| Date | A date and time value. This metafield type supports date values in ISO 8601 format and time values in UTC time. | Yes | Add launch event dates or product release dates. |
Measurement
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| Dimension | This metafield type supports both whole number and decimal values. Dimension uses either metric or imperial units of measurement. | Yes | Add box heights or product lengths, such as the length of a scarf. |
| Volume | This metafield type supports both whole number and decimal values. Volume uses either metric or imperial units of measurement. | Yes | Add the volume capacity of a water bottle. |
| Weight | This metafield type supports both whole number and decimal values. Weight uses either metric or imperial units of measurement. | Yes | Add the weight of a product or ingredient, for example, grams of sugar. |
| Antenna gain | This metafield type supports both whole number and decimal values. Antenna gain uses decibels isotropic or decibels dipole units. | Yes | Add the antenna gain rating for wireless devices or networking equipment. |
| Area | This metafield type supports both whole number and decimal values. Area uses either metric or imperial units of measurement. | Yes | Add the surface area of a product, such as the coverage area of a rug or tile. |
| Battery charge capacity | This metafield type supports both whole number and decimal values. Battery charge capacity is measured in milliamp hours. | Yes | Add the battery capacity of a device, such as a phone or laptop battery. |
| Battery energy capacity | This metafield type supports both whole number and decimal values. Battery energy capacity is measured in watt hours. | Yes | Add the energy capacity of a battery pack or power bank. |
| Capacitance | This metafield type supports both whole number and decimal values. Capacitance uses picofarads, nanofarads, microfarads, or farads. | Yes | Add the capacitance of electronic components. |
| Concentration | This metafield type supports both whole number and decimal values. Concentration uses milligrams per gram or milligrams per milliliter. | Yes | Add the concentration of an ingredient, such as CBD content per milliliter. |
| Data storage capacity | This metafield type supports both whole number and decimal values. Data storage capacity uses bytes, kilobytes, megabytes, gigabytes, or terabytes. | Yes | Add the storage capacity of a USB drive or hard drive. |
| Data transfer rate | This metafield type supports both whole number and decimal values. Data transfer rate uses bits per second, kilobits, megabits, or gigabits per second. | Yes | Add the transfer speed of networking equipment or USB cables. |
| Display density | This metafield type supports both whole number and decimal values. Display density uses pixels per inch or dots per inch. | Yes | Add the screen resolution density of a display or monitor. |
| Distance | This metafield type supports both whole number and decimal values. Distance uses kilometers or miles. | Yes | Add the range of a vehicle or the distance rating of equipment. |
| Duration | This metafield type supports both whole number and decimal values. Duration uses units from nanoseconds to years. | Yes | Add the battery life duration or warranty period of a product. |
| Electric current | This metafield type supports both whole number and decimal values. Electric current uses milliamperes, amperes, or kiloamperes. | Yes | Add the current rating of a charger or power supply. |
| Electrical resistance | This metafield type supports both whole number and decimal values. Electrical resistance uses ohms or kiloohms. | Yes | Add the resistance value of electronic components. |
| Energy | This metafield type supports both whole number and decimal values. Energy uses joules, calories, kilojoules, or kilocalories. | Yes | Add the calorie content of a food product or energy output of a device. |
| Frequency | This metafield type supports both whole number and decimal values. Frequency uses hertz, kilohertz, megahertz, or gigahertz. | Yes | Add the processor speed or wireless frequency of an electronic device. |
| Illuminance | This metafield type supports both whole number and decimal values. Illuminance uses lux or foot-candles. | Yes | Add the light output of a lamp measured at a surface. |
| Inductance | This metafield type supports both whole number and decimal values. Inductance uses microhenries, millihenries, or henries. | Yes | Add the inductance rating of electronic coils or transformers. |
| Luminous flux | This metafield type supports both whole number and decimal values. Luminous flux is measured in lumens. | Yes | Add the brightness output of a light bulb or flashlight. |
| Mass flow rate | This metafield type supports both whole number and decimal values. Mass flow rate uses various units combining mass and time, such as kilograms per hour. | Yes | Add the flow rate of industrial equipment or dispensing machines. |
| Power | This metafield type supports both whole number and decimal values. Power uses milliwatts, watts, horsepower, or kilowatts. | Yes | Add the power output of a motor, appliance, or power tool. |
| Pressure | This metafield type supports both whole number and decimal values. Pressure uses pounds per square inch or bars. | Yes | Add the pressure rating of tires, pumps, or pressure washers. |
| Resolution | This metafield type supports both whole number and decimal values. Resolution uses pixels or megapixels. | Yes | Add the camera resolution of a phone or digital camera. |
| Rotational speed | This metafield type supports both whole number and decimal values. Rotational speed is measured in revolutions per minute. | Yes | Add the RPM rating of a motor, drill, or fan. |
| Sound level | This metafield type supports both whole number and decimal values. Sound level is measured in decibels. | Yes | Add the noise level of an appliance or speaker output. |
| Speed | This metafield type supports both whole number and decimal values. Speed uses kilometers per hour, feet per second, miles per hour, or meters per second. | Yes | Add the maximum speed of a vehicle or the wind speed rating of equipment. |
| Temperature | This metafield type supports both whole number and decimal values. Temperature uses Celsius, Fahrenheit, or Kelvin. | Yes | Add the operating temperature range of a device or the serving temperature of food. |
| Thermal power | This metafield type supports both whole number and decimal values. Thermal power uses BTU per hour, kilowatts, or tons of refrigeration. | Yes | Add the heating or cooling capacity of HVAC equipment. |
| Voltage | This metafield type supports both whole number and decimal values. Voltage is measured in volts. | Yes | Add the voltage rating of an electronic device or power adapter. |
| Volumetric flow rate | This metafield type supports both whole number and decimal values. Volumetric flow rate uses various units combining volume and time, such as liters per minute. | Yes | Add the flow rate of a pump, showerhead, or irrigation system. |
Number
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| Decimal | Decimal values can be in the range of +/-9999999999999.999999999, with up to 13 digits before the decimal and up to 9 digits after. | Yes | Add a carat weight for jewelry. |
| Integer | Integer values can be in the range of -4,611,686,018,427,387,904 to 4,611,686,018,427,387,903. | Yes | Add a page count for books. |
Text
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| Multi-line text |
This metafield type supports plain text with line breaks. You can choose your minimum and maximum lengths and regular expression rules. | No | Add shipping notes or return policies. |
| Rich text | This metafield type supports text with line breaks and inline styling, including heading styles, bold, italic, and underline. Can only be connected to theme settings that work with rich text. Themes handle styling in different ways, which might override the styles you apply here. Check with your theme’s documentation to better understand how the rich text metafield will be styled in your theme. | No | Add long-form stories about your brand or product, including styling. |
| Single line text |
This metafield type supports plain text with no line breaks. You can limit single-line fields to preset choices that you specify when you create your metafield definition. | Yes | Add short notes and announcements. |
Reference
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| Company | This metafield type supports linking to one or more companies in a metafield list. | Yes | Add a company metafield in the Companies section of your Shopify admin to connect related companies. |
| Customer | This metafield type supports linking to one or more customers in a metafield list. | Yes | Add a customer metafield in the Customers section of your Shopify admin to connect related customers. |
| Article | This metafield type supports linking to one or more blog posts in a metafield list. | Yes | Link related blog posts to products or collections to enhance storytelling, such as featuring style guides or how-to articles on product pages. |
| Product | This metafield type supports linking to one or more products in a metafield list. | Yes | Store and display featured products on product pages or collection pages in your online store. |
| Collection | Allows you to link to an existing collection. This metafield type supports linking to one or more collections in a metafield list. | Yes | Include a "Complete the look" collection for fashion products in your online store. |
| Product variant | This metafield type supports linking to one product variant. | Yes | Store and display other clothing items in the same color on product pages in your online store. |
| File |
This metafield type supports uploading a single file in one of the following file types:
Refer to File format requirements for supported file types. | Yes | Add a PDF file for assembly instructions. |
| Metaobject | Supports linking to single or multiple metaobject entries. Metaobject reference (list) type is used in product attributes and can be connected to variant options | Yes | Add and display a custom influencer profile on select product pages or connect to a product option |
| Page | Allows you to link to an existing page. This metafield type supports linking to a single or multiple pages in a metafield list. | Yes | Insert your policy page or a detailed care guide on products in your online store. |
Other
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| True or false | Creates a checkbox for selecting whether a condition is true or false. | No | Add whether an option is available, such as whether an item can be engraved. |
| Color | This metafield type supports RGB values in #RRGGBB format. | Yes | Store the color of a product and then set the background of the product page to the same color. |
| Rating | This metafield type supports decimal values along a given scale, depending on how you configure your definition. | Yes | Add an audience score or a star rating for a product. |
| ID | This metafield type supports unique single-line text values. | No | Store the identifier of a resource in another system. |
| URL | This metafield type supports HTTP, HTTPS, mailto:, sms:, and tel: URLs. You can limit URLs to specific domains when you create your metafield definition.
| Yes | Add a link to book reviews or product videos that are hosted on a specific website. |
| Money | This metafield type supports both whole number and decimal values. Currency code must match store currency. | No | Track product cost details, such as distributor cost or ship to warehouse cost. |
| Link | This metafield type supports single-line plain text with no line breaks, and HTTP, HTTPS, mailto:, sms:, and tel: URLs. You can limit URLs to specific domains when you create your metafield definition. | Yes | Add a link to book reviews or product videos that are hosted on a specific website. |
Advanced
| Content type | Description | Use in a list | Example |
|---|---|---|---|
| JSON | This metafield type supports raw JSON data for advanced use cases when you need a structured data source. | No | Add a table of specifications that has different columns for each product, for example, tables of ingredients. |
| Mixed reference | This metafield type supports references of any type. Developer support is needed to use this type in your storefront. Learn more about custom data for developers. | Yes | Create dynamic landing pages in your Hydrogen Storefront. |