# Differentiating between Ordering Delivery and Takeout Action Links (Legacy)

> [!WARNING]
> **Warning:** This is a legacy tutorial and should only be used to maintain existing integrations. New integrations must use the [up-to-date tutorial](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=guides/tutorials/tutorial-differentiating-between-delivery-and-takeout-links).

<br />

> [!NOTE]
> **Note:** This guide is only applicable to Actions Center Legacy Starter integration partners who provide [`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) which allow users to perform Ordering actions.

> [!NOTE]
> **Objective:** This guide explains how partners can provide the Actions Center information regarding which food actions a user can complete via a specific `action_link`.

Legacy Starter Integration partners have the ability to associate different
`action_link_type` with their
[`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition).
`action_link_type` helps identify what kind of action a user can
perform when they are redirected to the partners' website using that link.

- You can only associate a single `action_link_type` with each action_link.

When ordering food, a user can request the following two actions to be
performed:

- Request food pickup from the restaurant (Order Food Takeout)
- Request food delivery to a specific location (Order Food Delivery)

This is recommended for all partners participating in Food Actions, if you
are currently sending us
[`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition)
with `action_link_type = ACTION_LINK_TYPE_ORDER_FOOD` or
`service_type = SERVICE_TYPE_FOOD_ORDERING` we recommend that
you update your feeds to be inline with the current approach.

> [!NOTE]
> **Note:** We will still continue to support the [old implementation](https://developers.google.com/actions-center/legacy/starter-feed-samples/food-ordering).

## Merchants supporting ordering food takeout pickup

> [!IMPORTANT]
> **Key Point:** To tag [`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) as Food Takeout only, we require using `action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT`

### Merchants

```json
{
  "merchant": [
    {
      "merchant_id": "merch10",
      "name": "Sample Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantsamplewebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.partnerwebsite.com/foodtakeout/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

### Services

```json
{
  "service": [
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Reservation",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Order"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/reserve_table/merch1",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

## Merchants supporting ordeirng food delivery

> [!IMPORTANT]
> **Key Point:** To tag [`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) as Food Delivery only, we require using `action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY`.

### Merchants

```json
{
 "merchant": [
    {
      "merchant_id": "merch10",
      "name": "Sample Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantsamplewebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.partnerwebsite.com/fooddelivery/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

### Services

```json
{
  "service": [
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Food Delivery",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Delivery"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/reserve_table/merch1",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

## Merchants supporting food takeout pickup and delivery

If a merchant supports both actions i.e. Food order delivery and Food order
pickup, it is recommended that you provide two separate
[`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition)
and associate them with the appropriate actions.

> [!NOTE]
> **Note:** Make sure the [`action_link`(s)](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) deep link to appropriate action and not a generic landing page.

### Merchants

```json
{
  "merchant": [
    {
      "merchant_id": "merch10",
      "name": "Sample Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantsamplewebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.partnerwebsite.com/foodtakeout/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        },
        {
          "url": "https://www.partnerwebsite.com/fooddelivery/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

### Services

```json
{
  "service": [
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Food Order",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Order"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodpickup/merch10",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    },
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Food Delivery",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Delivery"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/fooddelivery/merch10",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```

## Merchants supporting both actions via a single URL

For instance where an [`action_link`](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition)
which deeplinks to generic ordering page for the restaurant where the user would
be required to choose between **Food delivery** and **Food pickup**, we recommend the
following

Submit the [`action_link`](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition)
URL twice, associating each instance with the appropriate `action_link_type` as
mentioned below:

- For the first instance, tag the [`action_link`](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) using `action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY`
- For the second instance, tag the [`action_link`](https://developers.google.com/actions-center/verticals?vertical_redirect_fragment=reference/feed-specifications/merchants-feed#ActionLink-definition) using `action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_PICKUP`

### Merchants

```json
{
  "merchant": [
    {
      "merchant_id": "merch10",
      "name": "Sample Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantsamplewebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.partnerwebsite.com/foodtakeout+delivery/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        },
        {
          "url": "https://www.partnerwebsite.com/foodtakeout+delivery/merch34",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }

      ]
    }
  ]
}
```

### Services

```json
{
  "service": [
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Food Order",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Order"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodtakeout+delivery/merch10",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    },
    {
      "merchant_id": "merch10",
      "service_id": "10",
      "localized_service_name": {
        "value": "Food Delivery",
        "localized_value": [
          {
            "locale": "en",
            "value": "Food Delivery"
          }
        ]
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodtakeout+delivery/merch10",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION"
        }
      ]
    }
  ]
}
```