Product Variant Options
International Enhancements for Multi-Storefront
This feature is currently available for Enterprise stores and Partner Sandboxes. If the feature is not working as expected, please contact technical support, as the feature likely needs to be enabled for the individual store. To become an enterprise customer, contact your BigCommerce Customer Service Manager or our support team.
Using the Catalog features of the Admin API, you can set and query information about a product variant option, such as option name and values.
Perform the following for product variant options:
- Set global variant option information for the catalog. Channels inherit global information by default.
- Create overrides for a channel locale using the
overridesForLocalefield. These override global store information. - Remove overrides for a channel locale
You can also set and remove information for shared variant options. The changes affect all products that you assign to the shared variant option. Querying variant options returns all variant options, including shared ones.
For a full schema, see the GraphQL Admin API reference.
Input fields
Setting or removing information requires that you specify ID fields in the input. For more information on how to specify ID fields, see Input fields.
Set variant options
Set information about a product variant option for a store or a locale within a storefront channel.
The following mutations let you set the name and values for existing variant options. You must first create the variant option for the product through the control panel or the REST Create a product variant option endpoint.
The responses may include all variant options, including those that are shared. However, to set shared variant options, use the mutations in Set shared variant options.
Set variant options at the global level
The following example sets the store’s global product variant option information, from which channels inherit by default. You can set the name and values for existing variant options.
Request
Response
Set variant options for a locale
The following example sets product variant option information for the locale within the specified storefront channel. These override global store information. You can set the name and values for existing variant options.
Request
Response
Remove variant options for a locale
The following example removes product variant option information for the locale within the specified storefront channel.
Request
Response
Set shared variant options
You can set information about a shared variant option for a store or a locale within a storefront channel. You must first create the shared variant options through the control panel. Changing a shared variant option affects all products that you assign to the shared variant option. You cannot customize shared variant options on a product level.
The following mutations let you set the name and values for existing shared variant options.
Set shared variant options at the global level
The following example sets global shared variant option information for the store, from which channels inherit by default. You can set the name and values for existing variant options.
Request
Response
Set shared variant options for a locale
The following example sets shared variant option information for the locale within the specified storefront channel. These override global store information. You can set the name and values for existing variant options.
Request
Response
Remove shared variant options for a locale
The following example removes shared variant option information for the locale within the specified storefront channel.
Request
Response
Query variant options
The following example retrieves variant information. You can retrieve global information for the store and overrides for the locale within the specified storefront channel. The query returns all variant options, including those that are shared.