> For the complete documentation index, see [llms.txt](https://docs.codegiganten.de/plugin-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/data-fields.md).

# Data fields

Decide which product data InsightSearch receives and which of it filters, rules and similarity may use.

Data fields are the product information InsightSearch receives from your shop: name, price, brand and categories, but also properties such as colour or size and your own custom fields. Only fields that are transferred and active can be used later in filters, in the rule builder and in weighting. You need this page when a field is missing in a template, a filter does not work as expected or you want to show labels (badges) on the product cards.

There are two places that belong together:

| Place                                      | Question it answers                                                                 |
| ------------------------------------------ | ----------------------------------------------------------------------------------- |
| Area "Data fields" in the plugin dashboard | Which fields does InsightSearch know, which are active, and what type do they have? |
| "Edit data fields"                         | Which data does your shop send to InsightSearch in the first place?                 |

## The area "Data fields"

Open it via **Content → InsightSearch** and, in the sidebar, **Products & data → Data fields**.

1. At the top, select the product feed or data source under "Data source".
2. The list shows all fields of this source. Use "Search" to find a field by name or type. A counter such as "12 of 30 fields active" sits above the list.
3. Narrow the list down with the selection buttons "All", "Active", "Inactive", "Used in templates" and "Check type".
4. "Refresh list" reloads the fields.

<figure><img src="https://923488348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FebcjSiStaIxyVJ83vjsL%2Fuploads%2Fgit-blob-4fc6f552150cc13a3807e8b342ab9820543257c1%2Fcross-selling-pro-or-ki-%2B-warenkorb-cross-selling-%2B-bundles-and-sets-datenfelder.png?alt=media" alt="Data fields section with the field groups"><figcaption></figcaption></figure>

### Groups

| Group                          | Content                                                                                        |
| ------------------------------ | ---------------------------------------------------------------------------------------------- |
| "Core fields"                  | Name, price, brand, categories, availability. Every feed and every push delivers them.         |
| "Properties and custom fields" | Properties (colour, size …) and custom fields of your shop. Well suited for filters and rules. |
| "AI fields"                    | Fields created by InsightSearch itself, for example product type or image features.            |

Each row shows "Field", "Type", "Used in" (how many templates use the field) and the switch "Active". AI fields cannot be switched off: "AI fields are managed by InsightSearch automatically."

### Field types

The type decides which conditions the rule builder offers for a field.

| Type          | Suitable for                                                               |
| ------------- | -------------------------------------------------------------------------- |
| "Exact value" | Conditions such as "equals" or "is one of", for example colour or material |
| "Text"        | Partial matches in longer texts                                            |
| "Number"      | "at least" or "at most", for example volume or power                       |
| "Yes/No"      | Switches, for example "Marked as top seller"                               |
| "Date"        | Periods                                                                    |

If a type was detected incorrectly, open the row menu and choose "Change type". In the dialog "Change attribute type" you see the "Current type" and select the "New type". Then re-read the product data, otherwise the change has no effect.

{% hint style="info" %}
The marker "Check type" points to a likely mistake: the name suggests a number, but the field is stored as yes/no. A filter like "at least 20" does not work then. Set the type to "Number" and re-read the data.
{% endhint %}

### Switching fields off

The switch "Active" removes a field from filters, rules and similarity. If the field is still used in a template, the plugin asks first ("Field is used in templates") and lists the affected templates. If you confirm with "Switch off anyway", the rules and boosters using this field are dropped from the calculation.

After every change the notice "You changed fields. Re-read the product data once so the change takes effect." appears. Then click "Re-read product data". Until then, affected fields show "Waiting for reindex".

## "Edit data fields": what your shop transfers

Here you choose which product data InsightSearch receives for recommendations. Open the editor with the button "Edit data fields" in the area "Data fields" or in the area "Sources".

The editor is only available for data sources your shop creates itself: the product feed from a Shopware sales channel of type product comparison (the default for live shops) or the push (meant for development and staging environments). For an external feed you see: "This source is an external feed. Its fields cannot be edited here."

### Which products are transferred

For the product feed, a dynamic product stream decides which products are transferred. The button "Open product stream" takes you there. If no stream is assigned, all products of the sales channel are transferred.

### Structure

| Group                     | Content                                                                                      |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| "Required fields"         | Without these fields InsightSearch cannot calculate recommendations.                         |
| "Product data"            | Standard Shopware fields such as name, description, brand or dimensions.                     |
| "Properties"              | Property groups such as colour or size.                                                      |
| "Custom fields"           | Your shop's own custom fields.                                                               |
| "Fields of other plugins" | Custom fields created by plugins, collapsed at first. Usually of no use for recommendations. |

For each field you see:

| Column   | Meaning                                                                                                                                                         |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Field"  | Field name in the index. Filters and the rule builder show it under this name.                                                                                  |
| "Active" | Whether the field is sent with the export or push.                                                                                                              |
| "Source" | Where the value comes from: "Product", "Custom field", "Property" or "Fixed value".                                                                             |
| "Value"  | Which field of the selected source is used, for example the property group "Colour". "Automatic (determined by the system)" means InsightSearch chooses itself. |

Badges mark fields as "Required" and "Recommended". Fields with a lock are fixed by InsightSearch ("Fixed: InsightSearch needs this field as it is."). Search and the selection buttons "All", "Active", "Inactive", "Required", "Recommended" help you find fields faster.

Add another field with "Add custom field".

### Badges on product cards

A badge is the small label on the product card, for example "Sale" in red. In the badge field, use "Add badge rule" to create one or more rules:

* "Text from" and "Text field": where the text comes from.
* "Colour from" and "Colour / colour field": where the colour comes from, or "Fixed colour" with a colour picker.
* "Remove" deletes a rule.

Whether badges appear in the storefront is also controlled per placement with the switch for badges.

### Saving and testing

* "Test export" (product feed only) checks whether the Shopware product export can be generated without errors with these settings.
* "Save" (for push "Save field settings") applies the settings.
* Afterwards you see "Saved. Re-read the product data once so InsightSearch knows the new fields." with the button "Re-read now".
* If your export is generated by a scheduled task, re-reading resets it and starts reading automatically as soon as the new export is ready.
* If you leave the page with unsaved changes, the plugin asks first ("Keep editing" or "Discard and leave").

{% hint style="warning" %}
Changes directly affect the data sent to InsightSearch. For your own mappings, check that source and value fit. Otherwise data is missing in the recommendations.
{% endhint %}

## Walkthrough: using a new field in a rule

An example: you only want to recommend products of a certain material group that is maintained in a custom field.

1. Open **Products & data → Data fields**, select the data source and click "Edit data fields".
2. Find the custom field in the group "Custom fields" and switch on "Active".
3. Save and click "Re-read now".
4. When reading has finished, check in the area "Data fields" that the field is active and has the right type.
5. Use the field in the recommendation template in the rule builder.

{% hint style="info" %}
Rules in the rule builder narrow the selection down, they do not prefer products. If you want to place certain products deliberately, use "Fixed products" in the template.
{% endhint %}

## Permissions

To change data fields and field types or to re-read data, an admin user in Shopware needs the permission to edit the system configuration.

## Read more

{% content-ref url="/pages/bOsKhfEoKG9Mcf9pbuHy" %}
[Filters and rule builder](https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/filters-and-rule-builder.md)
{% endcontent-ref %}

{% content-ref url="/pages/OxFN5VKGROb1uxX81J2Q" %}
[Weighting, diversity and boosters](https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/weighting-and-boosters.md)
{% endcontent-ref %}

{% content-ref url="/pages/BzGfjVoUyUDgxHj1GUsV" %}
[The plugin dashboard](https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/plugin-dashboard.md)
{% endcontent-ref %}

{% content-ref url="/pages/e00VEeT8TubzE8TB5J6M" %}
[When do changes take effect?](https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/when-changes-take-effect.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.codegiganten.de/plugin-documentation/en/apps/cross-selling-pro-ai-cart-cross-selling-bundles-and-sets/data-fields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
