区分外卖订餐和外带操作链接(旧版)

旧版初级集成合作伙伴可以将不同的 action_link_type 与其 action_link 相关联。action_link_type 有助于确定用户使用该链接重定向到合作伙伴网站后可以执行哪些操作。

  • 您只能为每个 action_link 关联一个 action_link_type

在订餐时,用户可以请求执行以下两项操作:

  • 在餐厅取餐(订外带)
  • 请求将餐品配送到特定地点(订外卖)

我们建议参与“食品行动”计划的所有合作伙伴采用这种方法。如果您目前使用 action_link_type = ACTION_LINK_TYPE_ORDER_FOODservice_type = SERVICE_TYPE_FOOD_ORDERING 向我们发送 action_link,我们建议您更新 Feed,以符合当前方法。

支持外卖自提的商家

商家

{
  "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"
        }
      ]
    }
  ]
}

服务

{
  "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"
        }
      ]
    }
  ]
}

支持外卖订单的商家

商家

{
 "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"
        }
      ]
    }
  ]
}

服务

{
  "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"
        }
      ]
    }
  ]
}

支持外卖自提和外卖送餐的商家

如果商家同时支持“外卖”和“自提”这两项操作,建议您提供两个单独的 action_link,并将它们与相应的操作相关联。

商家

{
  "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"
        }
      ]
    }
  ]
}

服务

{
  "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"
        }
      ]
    }
  ]
}

通过单个网址支持这两项操作的商家

例如,如果 action_link 深层链接到餐厅的通用订餐页面,而用户需要在外卖自提之间进行选择,我们建议您执行以下操作:

提交 action_link 网址两次,将每个实例与相应的 action_link_type 相关联,如下所述:

  • 对于第一个实例,使用 action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_DELIVERYaction_link 添加标记
  • 对于第二个实例,使用 action_link_type = ACTION_LINK_TYPE_ORDER_FOOD_PICKUPaction_link 添加标记

商家

{
  "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"
        }

      ]
    }
  ]
}

服务

{
  "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"
        }
      ]
    }
  ]
}