A Guide to Product Custom Fields vs Metafields in BigCommerce

When building and managing a BigCommerce store, understanding how to organise your product data is crucial for creating a seamless and engaging storefront experience. Custom fields and metafields are two key ways of managing product data in BigCommerce. In this guide, we’ll go through their differences and the best use cases for each. 

Modeling your products in BigCommerce

When creating your product catalogue in BigCommerce for the first time, the first task will be to list all the data that needs to be stored within the platform.  You will quickly have a list of fields that are common between products.  This will include those which are used to create variant options, e.g. size and colour,  and those that will be used to power filters on category pages, e.g. brand, features, etc. In addition to these product attributes, you will also identify content blocks that make sense to attach to the product model. The most obvious is a product’s description but beyond that, you might have further content blocks that are relevant to specific product types, that advertise promotions, or other unique selling points of your brand. 

BigCommerce’s product model provides built-in fields, but you have two main options for additional data: custom fields and metafields.

Custom Fields

Custom fields are the simplest way to manage product data in BigCommerce. They can be managed in the admin when editing a product. For theme developers, Stencil has good support for them making them easy to integrate into your site design. Each custom field consists of a key-value pair, and products can have multiple custom fields with the same key, provided the values are unique.

Benefits of Custom Fields

  1. Ease of Use: Custom fields can be easily managed directly within the BigCommerce admin.
  2. Quick Integration: They can be quickly integrated into your storefront by modifying your theme.
  3. Essential for Enterprise Plans: On the Enterprise plan, custom fields power product filtering on category and search results pages.
  4. Ideal for Short Text: Perfect for short pieces of text or flags that tailor the theme’s business logic.

Limitations of Custom Fields

  1. Character Limit: Custom fields have a character limit of 255 characters.
  2. Limited Flexibility: Not suitable for managing extensive content or complex data.
  3. No validation: There’s no way to restrict or validate the available options by field.

Use Cases for Custom Fields

  • Displaying product specifications such as dimensions, weight, and material.
  • Adding promotional tags or flags (e.g., “Best Seller”, “Limited Edition”).
  • Providing short descriptions or additional product details.

Metafields

Metafields offer greater flexibility and capacity for managing extensive product data. Unlike custom fields, metafields can store up to 65,535 characters, making them ideal for richer content and more complex data requirements. However, out-of-the-box metafields are only accessible via the API and require more involved theme modifications to display on the storefront. There are apps available that abstract away the complexity of metafields and ultimately provide a better content management experience than custom fields.

Benefits of Metafields

  1. High Capacity: Can store up to 65,535 characters.
  2. Versatile Use Cases: Suitable for additional content blocks, product translations, and creating custom storefront experiences. They can also be used as the storage layer for third-party apps
  3. Broad Applicability: Available not just for products, but also for brands, categories, carts, customers, and more.

Challenges with Metafields

  1. API Access: Only available via the API, requiring development knowledge.
  2. Complex Integration: More complicated to integrate into the storefront than custom fields.
  3. Management: Requires third-party apps for day-to-day management.

Use Cases for Metafields

  • Including detailed buyer’s guides or extended product descriptions.
  • Managing multi-language product content for international stores.
  • Creating unique product page layouts with additional content blocks.
  • Our Mega Menu app uses metafields to ensure site navigation can be rendered server-side. 

Using Metafields in BigCommerce

BigCommerce sites powered by a Stencil theme can use metafields by making a GraphQL API call. This can be achieved by adding the query to the front matter of your templates or client-side using JavaScript. Server-side queries performed before the page is rendered are preferable for site speed and SEO, while client-side solutions may be suitable for dynamic experiences where SEO is less critical.

Enhancing Metafield Management with Apps

To address the challenge of managing metafields, we developed the Metafields Manager app. This app simplifies the process by allowing you to create and manage metafields easily. You can define shared metafields in advance, specifying the type of field (e.g., text, number, date, list of options), streamlining the process of enriching your product data.

Shared Metafields

Shared metafields allow you to define your product metafields ahead of time, making it easier to manage them. This approach helps avoid the complexity of remembering the namespace and key for each field, letting you focus on enhancing your product data.

Use Cases for Shared Metafields

  • A list of related products, e.g. goes well with, other customers considered
  • New stock arrival date
  • Product documentation PDFs, e.g. installation & usage instructions
  • A list of common product sashes/badges.
An example of quickly editing a product’s shared metafields using Metafields Manager.

Conclusion

Both custom fields and metafields offer unique advantages for managing product data in BigCommerce:

  • Custom Fields: Quick and easy to use, natively supported in BigCommerce admin, and ideal for short text and simple data. However, they are limited by a 255-character limit and not suitable for extensive content management.
  • Metafields: Highly versatile with support for up to 65,535 characters, ideal for managing rich content and complex data. They require third-party apps for easier management and more development effort for integration.

By understanding the strengths and limitations of each, you can choose the best approach when populating your BigCommerce product catalogue that will in turn power your storefront experience.

Tom Robertshaw
Stay up to date with Hypa news and features