アクション リンクを使用すると、ユーザーはパートナーのウェブサイトにリンクするディープリンクを操作してアクションを実行できます。ディープリンクは販売者のナレッジパネルに表示されます。このガイドでは、フィードにアクション リンクを追加する方法について説明します。
アクション リンクは次の 2 か所で提供できます。
- 販売者フィード - 単一の販売者が類似したアクションを実行する複数のサービスを提供している場合、販売者フィードを介してアクション リンクを実装します。
- サービス フィード - 1 つの販売者が異なるアクションを実行する複数のサービスを提供している場合は、サービス フィードを介してアクション リンクを実装します。
販売者レベルのアクション リンク
特定の販売者のすべてのサービスで、ユーザーがパートナーのウェブサイトの同じランディング ページにリダイレクトされる場合は、販売者フィードでアクション リンクを指定する必要があります。
通常、販売者ごとにサービスは 1 つしかないため、これが唯一の有意義な実装となります。
次に例を示します。
- 販売者が、ヨガ教室、ボクシング教室、サイクリング教室、ヘアカット、ヘアカラー、シャンプーなどの複数のサービスを提供している場合。アクション リンクをクリックすると、販売者のサービス カタログ全体が表示されるランディング ページにリダイレクトされます。
アクションのタイプは、販売者フィードの ActionLink の一部である ActionLinkType を使用して指定する必要があります。
// 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; }
サービスレベルのアクション リンク
販売者がサービスごとに異なるディープリンクを持っている場合や、販売者が料理の注文や食事の予約など、異なるアクションを実行する複数のサービスを持っている場合は、サービス フィードでアクション リンクを提供する必要があります。
次に例を示します。
- レストランで食事の予約と料理の注文ができる。1 つのアクション リンクはユーザーをレストランの予約ページにリダイレクトし、もう 1 つはユーザーを料理の注文ページにリダイレクトします。
アクションのタイプは、サービス内の ServiceType と、販売者フィードの ActionLink の一部である ActionLinkType を使用して指定できます。
enum ServiceType { SERVICE_TYPE_UNSPECIFIED = 0; // Service that provides dining reservation. SERVICE_TYPE_DINING_RESERVATION = 1; // Service that provides food ordering in general, could be either takeout // or delivery or both. SERVICE_TYPE_FOOD_ORDERING = 2; // Service that only provides food delivery. SERVICE_TYPE_FOOD_DELIVERY = 6; // Service that only provides food takeout. SERVICE_TYPE_FOOD_TAKEOUT = 7; // Services that provide event based ticketing (e.g. concerts, sporting // events, shows). Do not use for Reserve with Google integrations. SERVICE_TYPE_EVENT_TICKET = 3; SERVICE_TYPE_TRIP_TOUR = 4; // Service that provides appointments or classes. Recommended for (1) health // and fitness, (2) spa and beauty, and (3) financial consults and // evaluations services. Please see the supported service types: // https://developers.google.com/maps-booking/guides/end-to-end-integration/overview SERVICE_TYPE_APPOINTMENT = 5; // Service that provides appointment for an online class or session which // will be fully virtual. Must be set if enabling virtual service bookings. SERVICE_TYPE_ONLINE_APPOINTMENT = 8; // Service that allows users to shop from the given merchant. It could // either be delivery or pickup. SERVICE_TYPE_SHOPPING = 9; }
OrderOnlineMetadata の使用
OrderOnlineMetadata は、さまざまなオンライン ショッピングの配送方法について、手数料、最小注文額、在庫状況など、ユーザーに表示する情報を指定するために使用されます。このメタデータが含まれている場合、販売者フィードのアクション リンクとともに含まれます。
統合でこの情報が必要な場合に、フィードに適切に含める方法について詳しくは、次のドキュメントをご覧ください。
- このメタデータを含む小売注文フィードのサンプル
- 可用性メタデータの追加と更新に関するチュートリアル
- OrderOnlineMetadata のリファレンス定義