アクション フィードを作成してアップロードする
アクション フィードを作成してアップロードする際は、必ず次の手順に従ってください。
- アクション データ ファイルの仕様は、アクション フィードに記載されている仕様に準拠してください。アップロード間で一意のアクション データファイル名を使用する必要があります。ファイル名にタイムスタンプを含めることをおすすめします(例:
action1_1633621547.json
)。 - ファイルセット記述子で、
name
フィールドをreservewithgoogle.action.v2
に設定します。記述子ファイルの例については、記述子ファイルの JSON サンプルをご覧ください。アップロード間では一意の記述子ファイル名を使用する必要があります。ファイル名にタイムスタンプを含めることをおすすめします(例:action1_1633621547.filesetdesc.json
)。記述子ファイルは汎用の SFTP ドロップボックスにアップロードする必要があります。 - フィードは、汎用の SFTP ドロップボックスに毎日フル更新としてアップロードする必要があります。
- フィードの SFTP ドロップボックスの汎用情報は、パートナー ポータルの [設定] > [フィード] セクションで確認できます。
- 一般的なフィードの取り込みステータスは、パートナー ポータルの [フィード] > [履歴] セクションで確認できます。
定義
ActionFeed の定義
message ActionFeed { repeated ActionDetail data = 1; }
ActionDetail の定義
message ActionDetail { string entity_id = 2; string link_id = 3; // Deep link for action detail string url = 4; repeated Action actions = 1; }
アクションの定義
// Information about an Action which could be performed. message Action { // Deprecated fields not to be reused. reserved 1; oneof action_info { FoodOrderingInfo food_ordering_info = 3; } }
FoodOrderingInfo の定義
message FoodOrderingInfo { // Service type for food ordering action. enum ServiceType { UNKNOWN = 0; DELIVERY = 1; TAKEOUT = 2; } ServiceType service_type = 1 [features.field_presence = IMPLICIT]; }
アクション フィードの例
宅配のみ
ファイル名 : actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "DELIVERY" } }], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
テイクアウトのみ
ファイル名 : actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "TAKEOUT" } }], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" } ] }
宅配とテイクアウト
ファイル名 : actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } }, { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "common_link/entity002", "url": "https://www.restaurant.com/commonlink/entity002" } ] }
デリバリーとテイクアウトの異なる URL
ファイル名 : actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" }, { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } } ], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
記述子ファイル
ファイル名 : actions1_1697754089.filesetdesc.json
{ "generation_timestamp": 1697754089, "name": "reservewithgoogle.action.v2", "data_file": ["actions1_1697754089.json"] }