# Feeds (legacy)

First you need to create your feeds, then Google evaluates them.

## Create feeds

1. **Generate your feed(s).** You transmit most of your inventory data to
   Google by feeds. To get started, create your Merchant feed (and Services feed if applicable):

   - [Merchants feed:](https://developers.google.com/actions-center/legacy/reference/starter-integration/merchants-feed) The Merchants feed describes your merchants and merchant level action links.
   - [Services feed](https://developers.google.com/actions-center/legacy/reference/starter-integration/services-feed) **(optional / not recommended)** : It is not recommended to implement services feeds for new starter integrations. If you are looking to maintain your existing integration, follow [this legacy documentation](https://developers.google.com/actions-center/legacy/archived-guides/starter-integration-feeds).

   **Required and Recommended fields**

   | Feed | Field name | Description | Required? |
   |---|---|---|---|
   | Merchant | merchant_id | Unique identifier for the merchant | Yes |
   | Merchant | name | Name of the merchant | Yes |
   | Merchant | geo | Address and geo coordinates of the merchant | Yes |
   | Merchant | telephone | Telephone of the merchant | Yes |
   | Merchant | category | [Place type](https://developers.google.com/maps/documentation/places/web-service/supported_types#table1) of the merchant | Nice to Have |
   | Merchant | action_link | Information regarding Merchant Specific Deep Links | Yes |
   | Merchant | brand_id | String that identifies the consumer-facing brand to use | Optional |

   > [!NOTE]
   > **Note:** All additional fields outlined in the reference section should be ignored.

   > [!IMPORTANT]
   > **Key Point:** You are only required to upload merchant feed.

   To start, check out the sample feeds
   - [In-Person Appointment Feeds](https://developers.google.com/actions-center/verticals/healthcare/samples/starter-feed-samples/in-person-appointment)
   - [Online/Virtual Appointment Feeds](https://developers.google.com/actions-center/verticals/healthcare/starter-feed-samples/online-appointment)

   You can learn more about specifying action links in the legacy starter integration
   feeds
   [here](https://developers.google.com/actions-center/verticals/healthcare/tutorials/tutorial-specifying-action-links).

   Include
   [feed metadata](https://developers.google.com/actions-center/verticals/healthcare/reference/starter-integration/feed-metadata) in each of your feeds that instructs Google on
   how to interpret the feed.

   The following is a feed metadata snippet:

   ```
   "metadata": {
    "generation_timestamp": "1467993600",
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
   }
   ```

   > [!NOTE]
   > **Note:** All feeds must be uploaded with processing_instruction PROCESS_AS_COMPLETE. PROCESS_AS_INCREMENTAL is deprecated and cannot be used.

2. **Export your feeds.** The feeds format is described with the
   [protocol buffer 3 syntax](https://developers.google.com/protocol-buffers/docs/proto3),
   however you can reference the samples mentioned above to see the JSON format.
   We recommend that you upload the feeds in JSON format.


   If you really want to proceed with pb3 format, for general information on how to use protocol
   buffers to generate a pb3 file, see
   [Protocol Buffer Basics: Java](https://developers.google.com/protocol-buffers/docs/javatutorial).
3. **Upload the feeds to your SFTP server.** To upload your feeds, use
   the
   [SFTP server information](https://developers.google.com/actions-center/legacy/reference/archived-guides/starter-integration-setup#create-sftp-server) that Google provided to you and the
   private key that you created in
   [Setup](https://developers.google.com/actions-center/legacy/reference/archived-guides/starter-integration-setup#create-keys). The Google SFTP server is available at
   `sftp://partnerupload.google.com` on port `19321`.

   Upload your files with unique names, such as a name that includes a
   timestamp. Unique names help with troubleshooting and allow queries for
   the feed status.

   To determine the size of the feeds and frequency of delivery, use the
   following guidelines:
   - Size of feed files and shards:
     - Keep the feed file size below 200MB (after compression). Compress them using `gzip`
     - If your file may reach more than 200MB (after compression), split them in multiple shards following the [Sharding feed files](https://developers.google.com/actions-center/legacy/tutorials/tutorial-sharding) tutorial. However, the legacy starter integration alone is unlikely to reach the 200MB limit.
   - Frequency of complete updates:
     - A complete merchant feed is provided once a day.
     - (If implemented) A complete service feed is provided once a day.

   > [!NOTE]
   > **Note:** Google processes feed files as soon as they're uploaded to the SFTP server. If the feed is sharded into multiple files, the process begins after you upload the last file. If your feed contains errors, you receive an email with the [feed error codes](https://developers.google.com/actions-center/legacy/reference/starter-integration/feed-error-codes).

## Google evaluates feeds

Once you upload your feeds, Google processes and evaluates them for quality
and completeness. We look at several factors:

- Feeds meet the specifications.
- Feeds include all required fields.
- Each merchant has at least one `action_link` or one service with at least `action_link` defined.
- The majority of your merchant data matches with Google Maps locations.

> [!NOTE]
> **Note:** To ensure a smooth integration, perform a pre-evaluation of the factors above, except for the last one, before you submit your feeds.