# Item Data Structure

## Overview

The Fredhopper data structure is item-based. All data must be linked to a valid item in order for it to be accepted/processed and each item must belong to at least one valid category. An item is typically a product, but it can also be another type of data that needs to be stored within FAS, e.g. a content article.

<figure><img src="/files/nmndkTqdKutOOywelkiA" alt=""><figcaption></figcaption></figure>

### Data Types (Base-Types) <a href="#dataintegrationspecification-csvproductdata-datatypes-base-types" id="dataintegrationspecification-csvproductdata-datatypes-base-types"></a>

Each new data attribute that is created and included within the product feed must have a base-type value assigned. This dictates the type of data that can be included within the field and how it is used within FAS. The following data types (base-types) are accepted by Fredhopper:

<table data-full-width="true"><thead><tr><th width="139">Base Type</th><th width="247">Value Range</th><th>Note</th></tr></thead><tbody><tr><td>int</td><td>Between 0 and 2147,483,647<br>(<a href="http://www.java2s.com/Tutorial/SCJP/0160__Utility-Classes/IntegerMAXVALUEisthelargestvalueandIntegerMINVALUEthesmallestthatanintprimitivecancontain.htm">Integer.MAX_VALUE</a>)<br></td><td>The <em>int</em> data type is intended for <strong>non-negative integer attribute values</strong> (0, 1, 2, 10, ...) which can be used for (bracketed) facets and sorting on, e.g. stock amounts, ratings, etc.</td></tr><tr><td>float</td><td>Between 0.00001 and <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html">Float.MAX_VALUE</a>; 0.0 as a special value</td><td>The <em>float</em> data type can hold <strong>positive floating point numbers</strong> (0.1, 12.6767676, ....) and is typically used for bracketed facets and sorting on prices, margin, discounts etc. For technical reasons, values less than 0.00001 are not allowed and so '0.0' is treated equivalently to 'undefined'.</td></tr><tr><td>list</td><td>1 out of n values<br>(n = 32765)</td><td>The <em>list</em> data type represents one of a fixed list of values. List attributes have <strong>locale independent value identifiers</strong> (typically the lowercase English representation or database id of a value) and <strong>multi-lingual, locale dependent display values</strong>. Identifiers should be unique to the attribute and not contain spaces, UPPERCASE characters or any special characters (,"/\ etc.). Basically, the identifiers may contain the letters a to z and an underscore (_) only.</td></tr><tr><td>list64</td><td>1 out of 64 values</td><td>Same as list. However, if the attribute only has a <strong>maximum of 64 different values,</strong> <em>list64</em> is more efficient in terms of memory usage and performance compared to the list type.</td></tr><tr><td>set</td><td>1..n out of n values<br>(n = 32765)</td><td>The <em>set</em> data type is identical to the list data type but, per item, this attribute can have <strong>more than 1 value</strong>. Lists and sets are typically used for facets.</td></tr><tr><td>set64</td><td>1..64 out of 64 values</td><td>Same as set. However, if the attribute only has a <strong>maximum of 64 different values,</strong> <em>set64</em> is more efficient in terms of memory usage and performance compared to the set type.</td></tr><tr><td>hierarchical</td><td>nested categories</td><td>The <em>hierarchical</em> data type is used for categorisation (classification) of the items. An <strong>item should at least have one hierarchical attribute</strong>, and this attribute is always named <em>categories</em>. Categories can have child categories which can in turn have child categories. The number of children (levels) is not limited and does not have to be the same across all categories. Items can exist in one or more categories. The top-level category value is called universe. <strong>Fredhopper supports only one hierarchical attribute per universe</strong>.</td></tr><tr><td>text</td><td>any unicode string, must be shorter than 32768 characters</td><td>The <em>text</em> type is a <strong>data type without locale specific values</strong>, i.e. its value is the same across all locales. It is typically used for product codes that are locale independent and need to be displayed or searchable free text. It is possible to create a facet or sort on a text type attribute. However, it is recommended to use list and set attribute types for facets because they perform better, and text does not allow multi select facets.</td></tr><tr><td>asset</td><td>any multi lingual value</td><td>The <em>asset</em> data type holds multilingual free text data and is meant for free text search and display purposes. Typical examples of this are product descriptions or image references. An asset value does not have a locale independent identifier. It is <strong>not possible to create facets or sort on assets.</strong></td></tr><tr><td>ref</td><td>any primary universe product id</td><td>The <em>ref</em> data type represents a reference from one item to one or more other items in a Relational Universe (link). This reference can be used to have an item inherit attributes from the items that are referring to it. This data type is used in travel/leisure and B2B Retail installations to deal with different prices per holiday (travel), or different prices per customer segment (B2B Retail).</td></tr><tr><td>datetime</td><td>any date/timestamp after 1970-01-01T00:00:00 using the <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO-8601</a> standard</td><td><p>The <em>datetime</em> data type represents instances in time down to seconds precision. The values are read as <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO-8601</a> strings, and are then stored internally within FAS as milliseconds since 00:00:00 UTC on 1 January 1970. An offset from UTC can be specified as part of the datetime, and UTC will be assumed if it is not specified. Attributes that are set as datetime can then be used for selection, sorting and facets.</p><p>Please note, that the timezone of the datetime string is used only for parsing the date. An alternative response date format can be specified in the Merchandising Studio for each universe/locale, as well as a timezone. That means for example that you can parse the dates as ISO 8601, with the UTC timezone, and display them for the Sydney timezone by customising the display format. It is the display format that gets returned in the FAS query responses and shown on the Preview Page, rather than the input datetime string.</p><p>Examples for ISO 8601 formatted dates include:<br>2021-06-27T13:55:48+01:00 - a datetime with UTC+1 offset<br>2021-06-27T13:55:48Z - a datetime with UTC timezone<br>2021-06-27T13:55:48 - a datetime without a timezone, UTC will be used<br>2021-06-27T13:55 - a datetime without seconds or timezone specified<br>2021-06-27T13:55+01:00 - a datetime without seconds specified</p></td></tr></tbody></table>

{% hint style="danger" %}
**datetime, int**, **float** and **text** are non-localisable attribute base-types. The values supplied for attributes of these types should be sent only once (not one per locale) per product or variant in the input files. That single value will be available for that product or variant across all locales.
{% endhint %}

The following table provides a quick guide on how the above Data Types can be used within key Fredhopper elements:

<table data-full-width="true"><thead><tr><th width="136">Data Type</th><th width="82" align="center">Facets</th><th align="center">Facets (Multi-Select)</th><th width="77" align="center">Ranking</th><th width="127" align="center">Localisation</th><th align="center">Search (product-level)</th><th align="center">Search (relational/varient-level)</th><th align="center">Multiple values per item</th></tr></thead><tbody><tr><td>asset</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr><tr><td>datetime</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr><tr><td>float</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr><tr><td>int</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr><tr><td>hierarchical (category)</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td></tr><tr><td>list, list64</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr><tr><td>set, set64</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td></tr><tr><td>text</td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/add.png" alt="(plus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td><td align="center"><img src="https://attraqt.atlassian.net/wiki/s/-1682142759/6452/6cc0f47e38352140d9ce7b4cc420ef4f9034f994/_/images/icons/emoticons/forbidden.png" alt="(minus)"></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crownpeak.gitbook.io/product-discovery/sending-and-managing-product-data/flatfiles/item-data-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
