> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Data feed setup

> Set up the CSV data feed for the WEBSALE search module: provide product data, category columns and profiles for efficient search queries.

The data feed forms the basis for the search and filter functions in your online shop. It delivers the required product data to the search database and thus enables efficient processing of search queries. In this section you will learn how to set up the data feed for your search module and which information is included by default.

***

## Basics

### General

* The data feed is created in **CSV format**.
* A separate data feed is required **per subshop**.
  * Note: Depending on the booked data feed package, additional costs may apply if an upgrade to a higher package is required.
* The **column names** in the data feed correspond to the **technical field names** of the product data fields.
* The category columns in the data feed are named as follows:
  * `AllCategories`: Column for the category names.
  * `CatIDs`: Column for the category indexes.
  * `AllCatIDs`: Column for the technical representation of all category indexes.

### Setup as well as adjustment and extension of the data feed

The setup of the data feed can be done independently, provided that an appropriate product feed profile has been provided. The required profiles are provided by the WEBSALE support team and can be configured as needed. If no own implementation is desired, the WEBSALE support team takes over the complete setup.

Adjustments and extensions of the data feed are also possible independently, provided you have access to the associated export template. Alternatively, changes can be conveniently commissioned via the WEBSALE request portal.

### Data fields and settings by default

By default, data fields and settings are defined that are suitable for most shops. If deviations or additional fields are required, these can be submitted when commissioning in the **WEBSALE request portal**.

#### File name of the data feed

The file name of the data feed is formed by default according to the following scheme: `ShopID-SubshopID.csv`

**Example:**

* **ShopID:** meinshop
* **SubshopID:** deutsch
* **File name:** meinshop-deutsch.csv

### Dependency on the search module configuration

Only the fields that were previously activated when configuring the search module can be used in the data feed.

<Info>
  If additional fields are required, the configuration of the search module must be adjusted accordingly.
</Info>

***

## Standard data fields in the data feed

The data feed contains the following fields in the standard template. These fields are purely output; the configuration of whether a field can be searched, filtered, or sorted is done separately in the search module configuration.

For better understanding, we have divided the standard data fields in the data feed into the following groups.

### Technical data fields

These fields are required by the search module to execute the search function and assign the results correctly to the matching products. They are mandatory fields and must always be included in the data feed.

| **Field name**  | **Description**                                                  |
| --------------- | ---------------------------------------------------------------- |
| `ProdIndexBase` | Base product index (technical parameter)                         |
| `AllCategories` | List of categories (entire string)                               |
| `CatIDs`        | Current category index in which the product was found / assigned |
| `AllCatIDs`     | Technical structure of all category indexes, category path       |

### Product data fields

These fields contain the product properties and information to be searched, filtered, or sorted. They are extensible and can be supplemented with additional data fields to enable further functions or search options.

| **Field name**             | **Description**                                                                                                                                            |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Number`                   | Product number                                                                                                                                             |
| `Name`                     | Product name                                                                                                                                               |
| `Descr`                    | Product description                                                                                                                                        |
| `Price`                    | Product price                                                                                                                                              |
| `OrgPrice`                 | Original price (price before reduction)                                                                                                                    |
| `CreationDate`             | Creation date of the product (Unix timestamp)                                                                                                              |
|                            | Information whether the product is new. <br />If the information is passed in a different product data field, this must be specified during configuration. |
| `PR-SalesRank`             | Information whether the product is a top seller (sales rank)                                                                                               |
| `PR-RatingScore(min, max)` | Information about the product rating. <br />By default, the WEBSALE product rating is used.                                                                |
| *\<Variants>*              | All variants / versions of the products, for example color, size, etc.                                                                                     |

### Data fields for product availability

If stock management is used in the online shop, the search module by default only takes into account products that:

* **Have a stock greater than 0** or
* whose **stock status is not "red"**

These settings ensure that only actually available products are shown to users in the online shop, which increases user-friendliness and purchase readiness.

In the online shop, a **filter for availability** can be provided. This enables users to also display products that:

* **Have a stock less than or equal to 0** or
* whose **stock status is "red"**

| **Field name**     | **Description**                          |
| ------------------ | ---------------------------------------- |
| `Inventory-Active` | Check whether stock management is active |
| `Inventory-Type`   | Type of stock management (dynamic/fixed) |
| `Inventory`        | Actual stock                             |
| `StoreID`          | Stock article number (from ERP)          |

### Example of a data feed template v8s

The following example shows how a typical CSV data feed template can be structured:

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
Number~t~
ProdIndexBase~t~
IsBaseProduct~t~
Name~t~
Price~t~
OrgPrice~t~
Descr~t~
CreationDate~t~
Inventory-Active~t~
Inventory-Type~t~
Inventory~t~
StoreID~t~
AllCategories~t~
CatIDs~t~
AllCatIDs~t~
Varianten-Attribut-1 (Beispiel Farbe)~t~
Varianten-Attribut-2 (Beispiel Groesse)~n~

{@PR-Articles}
~PR-Number~~t~
~PR-ProdIndex~~t~
{!PR-IsDepVarProduct}yes{/!PR-IsDepVarProduct}~t~
~PR-Name~~t~
~PR-Price~~t~
~PR-OrgPrice~~t~
~PR-Descr~~t~
~PR-CreationDate~~t~
{!PR-Inventory}yes{/PR-Inventory}{!PR-Inventory}no{/!PR-Inventory}~t~
{!PR-Amount}dynamic{/PR-Amount}{!PR-Amount}static{/!PR-Amount}~t~
~PR-Amount~~t~
~PR-StoreId~~t~
{@Cat-AllAssigned}{@Cat-Names}~Cat-Name~{!last}/{/!last}{/@Cat-Names}{!last}>{/!last}{/@Cat-AllAssigned}~t~
{@Cat-AllAssigned}~Cat-Index~{!last}>{/!last}{/@Cat-AllAssigned}~t~
{@Cat-AllAssigned}{@Cat-Data}~Cat-Index~{!last}/{/!last}{/@Cat-Data}{!last}>{/!last}{/@Cat-AllAssigned}~t~
~PR-Farbe~~t~
~PR-Groesse~~n~
{/@PR-Articles}
```

***

## Standard settings for the data feed

The data feed is created with predefined standard settings that are suitable for most shops. These settings regulate which data is exported and how the export is performed. The most important standard settings as well as optional adjustments are listed below.

<Info>
  The settings listed here (e.g. filters for visibility or orderability) are part of the **product feed profile or export template** and are **not configured directly in the Admin Interface**. They can be adjusted independently if you have access to the corresponding export template. Alternatively, changes can be commissioned via the [WEBSALE request portal](https://websale.atlassian.net/servicedesk/customer/portals).

  **Example:** To include products that are currently not visible or not orderable in the feed, set the filters *"Only export products that are … visible"* and *"… orderable"* to `No` in the export template.
</Info>

<a id="31-einstellungen-für-produkte" />

### Settings for products

| **Configuration**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | **Setting** |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **Export dependent variations (as independent products)**<br />Variations of a product (for example sizes or colors) are exported as separate entries in the feed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes         |
| **Also export master data**<br />This setting controls whether, when variant products are used, the information of the associated master article is included in the data feed in addition to the specific variant information. This is particularly relevant for shops that store additional information in the master data that is not contained in the variants.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes         |
| **Only export products that are visible in the shop at the time of export**<br />This setting specifies that only products considered visible in the shop are included in the data feed. If the setting is disabled, all products are exported regardless of their visibility. <br />- **Visibility period:** Products that lie outside the defined periods ("Visible from" and "Visible until") are considered non-orderable and are not included in the data feed when the setting is activated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | No          |
| **Only export products that are orderable at the time of export**<br />The orderability of a product is checked according to the following criteria: <br />- **Variant products:** A product is considered orderable when at least one associated variant is orderable; such products are included in the data feed when the setting is activated. <br />- **"Orderable" field:** Products where the "Orderable" field is set to "No" are considered non-orderable and are not included in the data feed when the setting is activated. <br />- **Stock light:** Products whose stock light is "Red" (including "red-soft" and "red-hard") are considered non-orderable. If the search module configuration is set to only display available products, products with a stock light status of "Red" (regardless of the distinction between "red-soft" and "red-hard") can be included in the data feed, but are not considered in the search and filtering by default. | No          |
| **Remove HTML tags from product data**<br />HTML formatting is removed from the product data to ensure clean output.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes         |
| **Remove line breaks**<br />Removes line breaks from the product data to avoid formatting errors.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes         |

### Settings for categories

| **Configuration**                                                                                                                                                                                                                                                                                                          | **Setting** |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **Export categories hidden in the shop menu**<br />Categories that are not visible in the menu are still exported in the feed, since they are nevertheless used in the shop.                                                                                                                                               | Yes         |
| **Only export categories where the "PricePush" field is set to "yes"**<br />This setting controls whether only categories explicitly released for export in the import data should be included in the data feed, or whether all categories should be considered regardless of this marker.                                 | No          |
| **Only export categories whose robot settings "noindex" are not active**<br />Categories that are not excluded from search engines are included in the data feed. The setting is made in the TopRank Manager.                                                                                                              | No          |
| **Only export products of a category whose robot settings for products "noindex" are not active**<br />This setting controls whether only products assigned to categories whose import data permits indexing should be included in the data feed, or whether all products should be considered regardless of this setting. | No          |

### General formatting

| **Configuration**                                                                                                                                    | **Setting**          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| **ISO format**<br />Creates the feed in the ISO format that is also set for the subshop. The setting is made via the shop configuration shop.config. | 3-character ISO code |

### Timing of the export

The timing determines how often the data feed is updated.

Depending on the type of product maintenance or import method of the shop, the following settings can be used:

| **Configuration**                                                                                                    | **Setting**        |
| -------------------------------------------------------------------------------------------------------------------- | ------------------ |
| **Data feed export after Article Import Pro**<br />Setting for shops using Article Import Pro                        | After every import |
| **Data feed export after article import**<br />Settings for shops with automatic import (without Article Import Pro) | Once a day         |
| **Data feed export at an individual time**<br />Settings for shops with manual maintenance or other import formats   | Twice a day        |

### Trigger URL and token for automatic import of the data feed into the WEBSALE | search database

So that the data feed can be automatically imported into the WEBSALE | search database, a so-called trigger URL is used.

This URL is secured by an individual token provided by WEBSALE.

**Structure of the trigger URL**

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
http://<ShopID>-trigger.search.websale.net/<Token>
```

* `<ShopID>`: Your individual shop ID (assigned by WEBSALE)
* `<Token>`: A unique security token generated and provided by WEBSALE

**Example**

* ShopID: `meinshop`
* Token: `957caL8CBT2BWQVuQStJe7GVH`
* Separate triggering per subshop with the suffix `/SubShopID` (for example `/01-aa`)

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
http://meinshop-trigger.search.websale.net/957caL8CBT2BWQVuQStJe7GVH/SubShopID
```

<Info>
  Specifying the `SubShopID` directly after the token is required, since it ensures that the offset between the import processes of the individual subshops is minimized. If the `SubShopID` is not specified in the URL, all data feeds of all subshops are automatically imported, which can lead to increased data volume and potential overlaps after an import.
</Info>

***

## Adjustments and additional data fields

If deviations from the standard template or additional data fields are required, these can be commissioned via the **WEBSALE request portal**. Changes are implemented by the WEBSALE support team and require a check as to whether the desired fields are already activated in the search module configuration.
