About attributes with repeated fields

When submitting your product data, you can submit multiple values for some attributes. For example, you can submit multiple values for the additional_image_link attribute in order to submit multiple images of your product.

This article explains how this process works for each supported format.

Before you begin

Make sure you know the requirements for each attribute and whether or not the attribute accepts repeated fields. Learn more about the product data specification

You can submit product data in many different ways. Before reading this article, make sure you understand how you submit your data. Learn more about data feeds

How it works

Sometimes you may want to submit multiple values for an attribute. For example, to submit shipping costs for multiple areas using the shipping attribute, you'll need to submit a different value for each area.

Exactly how this process works is different depending on the format of your product data.

Text feed: Google Sheets

If you submit your product data through Google Sheets, you have 2 options: separate each value with a comma or create multiple columns (one for each value). Here's what those options look like.

Separate each value with a comma (option 1)

Add each value to the same cell, but separate them with a comma ( , ). For example, to submit 3 values for the product_type attribute:

  N O P
1 ... product_type ...
2 ... Home,Garden & Kitchen,Dishware ...
3 ... ... ...

For an attribute with sub-attributes, separate each sub-attribute with a colon, but still separate each overall value with a comma. For example, here's how to submit 3 values for the shipping attribute:

  N O P
1 ... shipping ...
2 ... US:80302:Same Day:30.00 USD,US:94002-95460:Overnight:16.00 USD,US:900*-901*:Ground:2.30 USD ...
3 ... ... ...

If you're submitting a URL that contains a comma, make sure that comma is encoded (as %2C). For example, to submit 2 image URLs (that contain commas) for the additional_image_link attribute:

  I J K
1 ... additional_image_link ...
2 ... http://example.com/image2%2C3.jpg,http://example.com/image2%2C4.jpg ...
3 ... ... ...

Create multiple columns (option 2)

You can instead create multiple columns for the attribute and add 1 value to each column. For example, to submit 3 values for the product_type attribute:

  N O P Q R
1 ... product_type product_type product_type ...
2 ... Home Garden & Kitchen Dishware ...
3 ... ... ... ... ...

For an attribute with sub-attributes, separate each sub-attribute with a colon, and add each overall value to its own column. For example, here's how to submit 3 values for the shipping attribute:

  N O P Q R
1 ... shipping shipping shipping ...
2 ... US:80302:Same Day:30.00 USD US:94002-95460:Overnight:16.00 USD US:900*-901*:Ground:2.30 USD ...
3 ... ... ... ... ...
Text feed: Tab-delimited

If you submit your product data through a tab-delimited feed, you have 2 options: separate each value with a comma or create multiple columns (one for each value). Here's what those options look like.

Create multiple columns (option 1)

You can create multiple columns for the attribute and add 1 value to each column. For example, to submit 3 values for the product_type attribute:

  N O P Q R
1 ... product_type product_type product_type ...
2 ... Home Garden & Kitchen Dishware ...
3 ... ... ... ... ...

For an attribute with sub-attributes, separate each sub-attribute with a colon, and add each overall value to its own column. For example, here's how to submit 3 values for the shipping attribute:

  N O P Q R
1 ... shipping shipping shipping ...
2 ... US:80302:Same Day:30.00 USD US:94002-95460:Overnight:16.00 USD US:900*-901*:Ground:2.30 USD ...
3 ... ... ... ... ...

Separate each value with a comma (option 2)

This option does not work with Excel and some other spreadsheet programs, as they automatically add additional quotation marks. If you're using Excel (or another spreadsheet program that is not Google Sheets), we recommend that you use the other option described above.

Add each value to the same cell, but separate them with a comma ( , ). For example, to submit 3 values for the product_type attribute:

  N O P
1 ... product_type ...
2 ... Home,Garden & Kitchen,Dishware ...
3 ... ... ...

For an attribute with sub-attributes, separate each sub-attribute with a colon, but still separate each overall value with a comma. For example, here's how to submit 3 values for the shipping attribute:

  N O P
1 ... shipping ...
2 ... US:80302:Same Day:30.00 USD,US:94002-95460:Overnight:16.00 USD,US:900*-901*:Ground:2.30 USD ...
3 ... ... ...

If you're submitting a URL that contains a comma, make sure that comma is encoded (as %2C). For example, to submit 2 image URLs (that contain commas) for the additional_image_link attribute:

  I J K
1 ... additional_image_link ...
2 ... http://example.com/image2%2C3.jpg,http://example.com/image2%2C4.jpg ...
3 ... ... ...
XML feed

If you submit your product data through an XML feed, specify multiple values by submitting the attribute multiple times.

For example, to submit 3 values for the shipping attribute:

<g:shipping>
  <g:country>US</g:country>
  <g:region>MA</g:region>
  <g:service>Same Day</g:service>
  <g:price>30.00 USD</g:price>
</g:shipping>
<g:shipping>
  <g:country>US</g:country>
  <g:region>900*-901*</g:region>
  <g:service>Overnight</g:service>
  <g:price>16.00 USD</g:price>
</g:shipping>
<g:shipping>
  <g:country>US</g:country>
  <g:region>CA</g:region>
  <g:service>Ground</g:service>
  <g:price>2.30 USD</g:price>
</g:shipping>
Content API v2 (XML)

If you submit your product data through the Content API using XML, specify multiple values by submitting the attribute multiple times.

For example, to submit 3 values for the shipping attribute:

<shipping>
  <price currency="USD">30.00</price>
  <country>US</country>
  <region>900*-901*</region>
  <service>Same Day</service>
</shipping>
<shipping>
  <price currency="USD">16.00</price>
  <country>US</country>
  <region>CA</region>
  <service>Overnight</service>
</shipping>
<shipping>
  <price currency="USD">2.30</price>
  <country>US</country>
  <region>TX</region>
  <service>Ground</service>
</shipping>
Content API v2 (JSON)

If you submit your product data through the Content API using JSON, specify multiple values by submitting the values within the same attribute array.

For example, to submit 3 values for the shipping attribute:

"shipping": [
  {
    "country": "US",
    "price": {
        "value": "30.00",
        "currency": "USD"
    },
    "region": "900*-901*",
    "service": "Same Day"
  },
  {
    "country": "US",
    "price": {
        "value": "16.00",
        "currency": "USD"
    },
    "region": "CA",
    "service": "Overnight"
  },
  {
    "country": "US",
    "price": {
        "value": "2.30",
        "currency": "USD"
    },
    "region": "TX",
    "service": "Ground"
  }
]
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue