# Products

> Connecting a product source, mapping its fields and keeping the product list up to date.

Source: /en/features/products/

Every review is associated with a product. The **Products** screen shows which source your products are transferred to Sayproof from and which products are registered. When the product list is up to date:

- reviews are matched to the right product;
- product names are shown on the **Statistics** screen;
- the right **rating topics** are asked for each product type;
- if the channel has no invitation page, the invitation link opens the product's own page.

A review written for a product that is not in the catalogue is left for approval by the "Catalogue match" check.

Below the counters at the top of the screen there are two tabs. The single sentence above each tab explains what the tab is for:

- **Products:** all your products registered in Sayproof. The list's **Topic list** column shows the rating topics each product is asked about; the lists are set up on the **Rating topics** screen, opened with the **Go to Rating topics** button in the card heading. The **Reviews written** column counts every review written for the product, whatever its status.
- **Product sources:** where your product list comes from and how often it is read. A new source is added on this tab; clicking a source in the list opens its details. The **Next step** column shows what the source needs next: **Add a mapping**, **Fix the connection**, **Watch the read**, **Confirm switching off** or **Ready**; a source that has been turned off shows **Closed**.

Using this screen requires the "Can change settings" permission (Administrator); other roles do not see it in the menu.

## Product source

Products are read from one or more **product sources**. There are two source types; the type cannot be changed once the source has been saved:

| Type | When to use it |
|---|---|
| **Product file (XML, CSV, JSON)** | A product file your site publishes at a given address. A Google product file is of this type. |
| **Product service (API)** | A service that returns products in pages. The connection details are usually provided by your software team. |

Presets fill in the connection and mapping fields for you: the Google Merchant XML feed, the Google Merchant CSV feed and the Akinon Omnitron products API.

### Adding a new source

The **Add a source** button on the **Product sources** tab opens a three-step wizard:

1. **Type and name:** the source type and its name.
2. **Connection:** a **Preset** if one applies (choosing it fills in the fields), the address (`https`, without a port number), the file format, where the records are located in the file or the column separator, the sign-in method and the reading frequency.
   - Sign-in methods: No sign-in · Access key · Username and password · Custom header · Parameter in the address · By signing in.
   - Paging for a product service: Single page · By page number · By start and count · By next-page cursor. If the service returns a modification date, only changed products can be requested.
   - Reading frequency options: Every 15 minutes · Every hour · Every 6 hours · Once a day.
3. **Test:** A few records are read and the result is shown with an explanation: working, no records arrived, unreachable, settings wrong or unreadable. No data is saved during the test.

The **Save the source** button on the wizard's bottom bar saves the source with the details entered so far (the source name is required); the saved source appears in the list and its setup can be continued from the source's details.

Values such as passwords and access keys are stored encrypted and are never shown on screen again. If the source address or the sign-in address is moved to another domain, the saved sign-in details are not carried over to the new address; they must be entered again. If, during paging, the service returns a next-page address on another domain, no sign-in details are added to that request.

## Mapping

Once the source is connected, the **Mapping** tab is used to define which Sayproof fields the source fields are transferred to. The left side shows the fields found in the source (how many records contain them and example values) together with sample records; the right side shows the mapping rows.

| Sayproof field | Description |
|---|---|
| **Variant code** | The field that identifies the product; it is required. It must match the `variant_key` value in the order transfer and the product code of the review container on the page. |
| Product group | The code that brings together the variants of the same product |
| Product name | A required field |
| Product page | The fallback address for the invitation link |
| Product image | The address of the product image |
| Product type | Determines which rating topics are asked |
| GTIN (barcode) | The product's barcode; matches the product in the Google product reviews file |
| Manufacturer part number (MPN) | Matches the product in the Google product reviews file together with the brand |
| Brand | The product's brand; used together with the MPN |
| Catalog number | The product's number in the catalogue |
| Custom fields | Additional fields defined by the brand |

**GTIN (barcode)**, **Manufacturer part number (MPN)** and **Brand** are read as text; the Google Merchant presets map these fields automatically. For how they are used, see [Google product reviews](/en/integrate/google-reviews.md).

A value type is selected for each row: Text, Whole number, Decimal number, Yes / no, Date and time, List. The **Try** button shows whether each sample record would be read and, if not, why.

If the identifying field is moved to another source field, confirmation is requested before saving. In that case, products transferred with the old codes may be deactivated on the next full read.

## Reads and issues

The **Reads** tab shows the progress of the current read, past reads and issues at record level: the identifying field is empty, a required field is missing, a value could not be read, or the same variant code appears in more than one record. Clicking the number in the **Problem rows** column of the tab's table lists that read's problem rows in a side panel, with the record number, the reason and the details.

If a source fails to read a set number of times in a row (3 by default), brand administrators receive a single email. This number can be changed on the **Warning limits** tab of the **Settings** screen; a value of 0 turns the warning off.

For product service reads:

- If a read reaches the page limit (10,000 pages by default) and there are still pages to read, the read fails with the code `page_limit_reached: <limit>`; the next read continues from where it stopped. If the catalogue fills exactly the limit's number of pages and ends there, the read completes normally.
- If the service returns the same next-page cursor a second time, the read is stopped with the code `cursor_repeated`.
- If a read that requests only changed products is interrupted, the next read continues from where it stopped with the same date filter.
- The sources of brands whose service is frozen or closed are not read.

## Product protection

- Products that are not found in a full read are not deleted but **deactivated**; their reviews are retained. Only products from the source concerned are affected. A read that requests only changed products (even if it was interrupted and resumed) and a read that hit the page limit do not count as full reads; no products are deactivated after them.
- If a single read would deactivate more than half of the active products (at least 10 products), or if no records arrive at all, deactivation is held and waits for your confirmation; the read's other results (new and updated products) are saved. This prevents a faulty file from emptying the catalogue. The source's details show the **Switching off was held** warning. If the source is right, the **Confirm switching off and run** button in the warning asks for your confirmation, then reads the source again with deactivation confirmed and opens the **Reads** tab. Until you confirm, deactivation is held on later reads too.
- A source is turned off with the **Turn the source off** button next to the status label in its header (it asks for confirmation) and turned back on with **Turn the source on**; a source that is off also shows a **Turn the source on** button in the list. **Read now** is disabled while the source is off. Turning off or deleting a source (**Delete** tab) does not delete products.
- With unsaved changes on the connection or mapping tab, switching to another tab, **Read now** or **Map again** asks for confirmation first, so unsaved changes are not lost silently.

## Uploading from a file

For product file sources, a file you hold can be read once instead of the address. The file is read with the source's format settings. The **Try first (saves nothing)** option shows the result without writing any records. The trial appears as a separate row on the **Reads** tab, marked **Trial · not saved**; it does not change the **Last read** and **Next step** shown in the source list. A failed trial is not added to the count of failed reads in a row and sends no warning email. The **Upload from a file** card is not shown for a source that has been turned off.

## Product details

On the **Products** tab of a source's details, clicking a product shows its mapped fields, custom fields, when it was last seen in the source and the raw record received from the source.
