> For the complete documentation index, see [llms.txt](https://alhena.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alhena.gitbook.io/docs/integrations/ecommerce/platforms/integrating-alhena-ai-with-sftp-product-feed.md).

# SFTP Product Feed

Connect a Google Shopping format product feed hosted on SFTP so Alhena can answer product questions with up-to-date details, pricing, and availability.

If your products already flow into a Google Shopping (Google Merchant Center) feed, Alhena can read that feed from an SFTP server and use it as your product catalog, with no store platform integration needed.

## Prerequisites

* A product feed in **Google Shopping format**, delivered to an SFTP server
* The SFTP **host**, **username**, and **password** for that server
* The full path to the feed file on the server

***

## Feed Requirements

### File format

* A tab- or comma-separated file with a header row, optionally gzipped (`.gz`)
* Column names follow Google's product data specification

### Required columns

| Column  | What it holds                                              |
| ------- | ---------------------------------------------------------- |
| `id`    | A unique ID for each item                                  |
| `title` | The product name                                           |
| `link`  | The product page URL                                       |
| `price` | The price with its currency code, for example `139.00 USD` |

Rows missing any of these, or with a zero or unreadable price, are skipped.

### Other columns Alhena uses

| Column                                                                              | How Alhena uses it                                                                       |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `description`                                                                       | Product description                                                                      |
| `image_link`, `additional_image_link`                                               | Product images (up to 10 per product)                                                    |
| `availability`                                                                      | `in_stock` is in stock; any other value is out of stock. Blank or missing means in stock |
| `sale_price`, `sale_price_effective_date`                                           | Sale price, applied within the date range if given                                       |
| `item_group_id`                                                                     | Groups rows into one product with variants                                               |
| `brand`, `color`, `material`, `pattern`, `size`, `age_group`, `condition`, `gender` | Product attributes the AI can use when answering questions                               |
| `product_type`, `google_product_category`                                           | Your product categories                                                                  |

Rows sharing an `item_group_id` become **one product with variants** (for example, a shirt in three sizes), as in Google Merchant Center.

{% hint style="info" %}
For different prices per market, [contact Alhena support](https://alhena.gitbook.io/docs/troubleshooting/troubleshooting.md#contact-support).
{% endhint %}

***

## Setup

1. In Alhena, go to **Settings > Integrations**
2. In the **E-commerce** section, turn on the **SFTP Product Feed** card
3. Fill in:
   * **SFTP Host** - Hostname only, for example `sftp.example.com`
   * **SFTP Username** and **SFTP Password**
   * **Remote File Path** - Full path starting with `/`, for example `/products_feed.txt.gz`
4. Click **Connect**

{% hint style="warning" %}
Alhena first downloads the feed during the next training run, so wrong SFTP details show up as a failed training run, not an error on the settings page. To change details, click **Disconnect** and connect again.
{% endhint %}

***

## Enabled Agents

| Agent                    | Description                                                                                                   |
| ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| **Product expert agent** | Answers product questions and recommends products using the details, pricing, and availability from your feed |

You can configure it under **AI Settings > Agents**.

***

## Keeping Your Catalog Up to Date

Alhena re-downloads the feed on every training run. It can also refresh stock status between runs; contact Alhena support to set up the schedule.

{% hint style="info" %}
If you also train on your website, its product and category pages are skipped since the feed covers them.
{% endhint %}

### Safety checks

Alhena stops the training run instead of loading a broken feed, for example when required columns are missing, there are no product rows, or more than 10% of rows can't be read. Fix the feed at its source, then run training again.

***

## Disconnecting

Go to **Settings > Integrations > SFTP Product Feed**, click **Disconnect**, and confirm. Products already loaded stay in your catalog until the next training run.
