您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

Variant option [variant_option]

Use the variant option [variant_option] attribute in combination with the item group title [item_group_title] and item group ID [item_group_id] attributes to specify all variant-identifying properties of this product when it's available in different variants. For example, a t-shirt with different sizes and colors, or a laptop with different memory sizes, display sizes, processors, and graphics options.

On this page


When to use

Optional Optional for each product. Use if your product is available in different variants.

Many products are available in different variations, for example t-shirts in different sizes and colors. If your product is a variant then use this attribute to specify its variant-identifying properties and values. This attribute will be used to show your product together with all its available variants to consumers in conversational AI as well as traditional Search experiences.

The variant option[variant_option] attribute can be used in all countries.


Format

Follow these formatting guidelines to make sure Google understands the data you're submitting.

Formatting specifications
Technical name variant_option
Type Group attribute with 2 sub-attributes
Sub-attributes
  • name [name]. Text. Max. 250 characters.
  • value [value]. Text. Max. 250 characters.
Repeated field Yes (up to 30)

File format examples

To ensure your attribute is recognized correctly, use the formatting specific to your feed type.

File format Example value (a shoe with variant dimensions "shoe width" and "size")
Text feeds (TSV) Shoe width:narrow,size:8
XML feeds

<g:variant_option>

<g:name>shoe width</g:name>

<g:value>narrow</g:value>

</g:variant_option>

<g:variant_option>

<g:name>size</g:name>

<g:value>8</g:value>

</g:variant_option>


Minimum requirements

These are the requirements you'll need to meet to provide valid variant options for your product:

  • Submit both the name[name] and value[value] sub-attributes.
  • Each variant with the same item group ID [item_group_id] attribute must have the same set of name[name]sub-attributes as the other variants in the product group. The variant must be distinguished from the other variants by having a combination of value[value]sub-attributes that is unique to that variant.

Best practices


Examples

A laptop with 3 custom variant dimensions

In a Google Sheet, you’d submit this in one cell as follows. As long as the sub-attributes don't contain reserved characters (commas, colons, and backslashes) no escaping is necessary:

  N O P
1 ... variant_option ...
2 ... cpu:ultra,display:max,memory:128GB ...
3 ... ... ...

Alternatively, you can also create multiple separate columns, each containing a single variant option. For example, to have one column for each value, you can submit this in 3 cells as follows:

  N O P Q R
1 ... variant_option variant_option variant_option ...
2 ... cpu:ultra display:max memory:128GB ...
3 ... ... ... ... ...

In a tab-separated text file, you can submit the variant options in one cell as follows. Tab characters are represented by the <tab> symbol. Each sub-attribute value has been quoted for consistency:

Header: …<tab>variant_option<tab>…

Product row: …<tab>cpu:ultra,display:max,memory:128GB<tab>…

Alternatively, you can also create multiple separate columns, each containing one variant option. For example, to have one column for each section, you can submit this in 3 tab-separated columns as follows:

Header: …<tab>variant_option<tab>variant_option<tab>variant_option<tab>…

Product row: …<tab>cpu:ultra<tab>display:max<tab>memory:128GB<tab>…

该内容对您有帮助吗?

您有什么改进建议?
false
Search
Clear search
Close search
Main menu
3457729932517915438
true
搜索支持中心
false
true
true
true
true
true
104514
false
false
false
false
false
⌂ 换网址