指定操作链接

借助操作链接,用户可以与深层链接互动,该链接会关联到合作伙伴的网站以执行操作。深层链接会显示在商家的知识面板中。本指南将介绍如何向 Feed 添加操作链接。

如果给定商家的所有服务都会将用户重定向到合作伙伴网站上的同一着陆页,您应通过商家 Feed 提供操作链接。

必须使用商家 Feed 中 ActionLink 的一部分 ActionLinkType 指定操作类型。

如需实现本地生活服务广告重定向集成,ActionLinkType 应设置为 ACTION_LINK_TYPE_BOOK_APPOINTMENT

  // Predetermined type of action associated with an action link.
  enum ActionLinkType {
    // The action link type is unspecified.
    ACTION_LINK_TYPE_UNSPECIFIED = 0;

    // The action link type is booking an appointment.
    ACTION_LINK_TYPE_BOOK_APPOINTMENT = 1;

    // The action link type is booking an online appointment.
    ACTION_LINK_TYPE_BOOK_ONLINE_APPOINTMENT = 2;

    // The action link type is ordering food for delivery or takeout or both.
    ACTION_LINK_TYPE_ORDER_FOOD = 3;

    // The action link type is ordering food for delivery.
    ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY = 4;

    // The action link type is ordering food for takeout.
    ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT = 5;

    // The action link type is making a dining reservation.
    ACTION_LINK_TYPE_MAKE_DINING_RESERVATION = 6;

    // The action link type allows users to shop from the given merchant. It
    // could either be delivery or pickup.
    ACTION_LINK_TYPE_SHOP_ONLINE = 7;
  }