Lab - Product FAQ Project Setup
Lab - Product FAQ Project Setup
Lab - Product FAQ Project Setup
In this multi-part lab exercise, you’re going to practice customizing your Catalyst storefront with a simple feature on the product detail page.
As you build out your own customizations with Catalyst, you’ll have a chance to explore its approach to GraphQL workflows and the built-in toolsets that empower you to build quickly and efficiently.
Prerequisites
For all labs ahead, you will need the following.
In this lab, you will:
In these exercises, you’ll be progressively building a Frequently Asked Questions (FAQ). Such a feature would provide a systematic way to present customers with the answers to frequently asked questions on a product-by-product basis - functionality that’s particularly useful for highly custom or highly technical products.
Using metafields, you’ll attach FAQ records to a product, then utilize custom GraphQL and built-in components to present them on the product detail page in an unobtrusive way.

Metafields are custom key/value pairs that can be assigned to various entities in BigCommerce, including products, allowing you a free-form method to express any arbitrary data that doesn’t fit into the schema of BigCommerce’s native fields. You’ll be inserting metafields to represent “frequently asked question” (FAQ) records on a product.
Adding or updating metafields requires the use of the BigCommerce REST Management API, so you’ll be utilizing Postman in this section to build the appropriate requests. In a real-world scenario in which non-technical users need the ability to edit these FAQs, you would likely develop a small companion app to manage them, or else install an app from the BigCommerce marketplace to enable a UI interface for metafields in general.
Each metafield has an assigned namespace, and when querying such fields using the GraphQL Storefront API, a namespace argument must be specified. You’ll create separate metafields for each FAQ, but all with a common namespace for a given locale (for example, “FAQ|en”). The string value of each metafield will be a JSON representation of a question and its answer.
For this section of the project setup, you’ll be using Postman.
/products/edit/{id}.Note the :product_id identifier in the URL path, which refers to a Path Variable defined on this request, rather than an environment or collection variable.
product_id (note there is no ”:” in this context) with your product ID as the value.key and the “question” and “answer” values, but take care to preserve the escaped JSON format. If the default locale in your storefront is not “en”, update the “namespace” value accordingly.You may, of course, choose to create more FAQ metafields on your chosen product, and/or to create them on other products. The following exercises will require only that you have at least three FAQs on at least one product.
Your product should now have the required data for the following exercises. If you’d like to verify the FAQ fields that now exist on the product, follow these steps to set up a “Get FAQ Metafields” request.
namespace with the value you want to filter on, such as “FAQ|en”.product_id with your product ID as the value.With the appropriate metafields now created on at least one product, you’re now set to begin customizing your Catalyst storefront to include FAQs.