A custom Contentful app that allows you to browse and select BigCommerce product variants, storing the variant SKU in a short text field. This app provides full variant support that is missing from other BigCommerce integrations.
UPDATED Has the ability now to be served in the sidebar location and the SKU short code stored in the rich text field
- Browse all BigCommerce products with their variants
- Search products by keyword
- View variant details including options (size, color, etc.), SKU, and price
- Select variants and store their SKU in Contentful short text fields
- Display selected variant information in the field
- Clean, user-friendly interface using Contentful's Forma 36 design system
Before installing this app, you need:
- A BigCommerce store with API access
- BigCommerce API credentials:
- Store Hash: Found in your BigCommerce store URL (e.g., if your URL is
https://store-abc123.mybigcommerce.com, your store hash isabc123) - Access Token: Generate from your BigCommerce store's API settings with at least read access to Products
- Store Hash: Found in your BigCommerce store URL (e.g., if your URL is
- Log in to your BigCommerce store admin
- Go to Settings > API > API Accounts
- Click Create API Account
- Select V2/V3 API Token
- Set OAuth Scopes:
- Products: Set to Read-only (minimum required)
- Save and copy your Access Token (you won't be able to see it again)
- Note your Store Hash from the store URL
npm installnpm startThis will create or update your app definition in Contentful and run the app in development mode.
- Go to your Contentful space
- Navigate to Settings > Apps > Manage Apps
- Find your "BC Variant Picker" app and click Configure
- Enter your BigCommerce credentials:
- Store Hash: Your BigCommerce store hash
- Access Token: Your BigCommerce API access token
- Click Save
- Go to Content model and select the content type you want to use
- Add a new field or edit an existing Short text field
- Go to the Appearance tab
- Select BC Variant Picker from the list of apps
- Save your content type
- Open an entry that uses the BC Variant Picker field
- Click the Browse Variants button
- A dialog will open showing all your BigCommerce products and their variants
- Use the search box to find specific products
- Click Select next to the variant you want to use
- The variant's SKU will be saved to the field
- The field will display the product name, variant options, and price
Click the Clear button next to the field to remove the selected variant.
npm run buildBuilds the app for production to the build folder.
npm run uploadUploads the build folder to Contentful and creates a bundle that is automatically activated.
npm run upload-ciFor CI/CD pipelines. Requires these environment variables:
CONTENTFUL_ORG_ID- Your Contentful organization IDCONTENTFUL_APP_DEF_ID- The app definition IDCONTENTFUL_ACCESS_TOKEN- A personal access token
src/
├── components/
│ ├── VariantBrowser.tsx # Main variant browsing UI
│ └── LocalhostWarning.tsx # Development warning
├── locations/
│ ├── ConfigScreen.tsx # App configuration (API credentials)
│ ├── Field.tsx # Field editor location
│ └── Dialog.tsx # Dialog for variant selection
├── services/
│ └── bigcommerce.ts # BigCommerce API client
└── index.tsx # App entry point
This app uses the BigCommerce V3 Catalog API to fetch products and variants:
GET /catalog/products- List all products with variantsGET /catalog/products?keyword=search- Search products
Required API scopes:
- Products: Read-only
Make sure you've entered both the Store Hash and Access Token in the app configuration screen.
Your Access Token is invalid or expired. Generate a new one in BigCommerce.
Your API token doesn't have the required permissions. Ensure it has at least read access to Products.
- Check that your BigCommerce store has products with variants
- Try searching for a specific product name
- Verify your API credentials are correct
- React - UI framework
- TypeScript - Type safety
- Contentful App SDK - Contentful integration
- Forma 36 - Contentful's design system
- Vite - Build tool
- BigCommerce V3 API - Product data
This project was bootstrapped with Create Contentful App.