アクション フィード

アクション フィードを作成してアップロードする

アクション フィードを作成してアップロードする際は、必ず以下の手順に沿ってください。

  • アクション フィード アクションデータファイルを指定しますアップロード間で一意のアクション データのファイル名を使用する必要があります。 ファイル名にタイムスタンプを含めることをおすすめします(例: action1_1633621547.json)。
  • ファイルセット記述子で、name フィールドを次のように設定します。 reservewithgoogle.action.v2。記述子ファイルの例については、記述子ファイルの JSON のサンプルをご覧ください。 アップロード間で一意の記述子ファイル名を使用する必要があります。 ファイル名にタイムスタンプを含めることをおすすめします(例: action1_1633621547.filesetdesc.json)。 記述子ファイルは汎用の SFTP ドロップボックスにアップロードする必要があります。
  • フィードは、汎用の SFTP ドロップボックスに毎日アップロードする必要があります。 更新されます
  • 一般的なフィードの SFTP ドロップボックスの情報は、 [設定] >フィード] セクションに表示されます。
  • フィードのドロップボックスを選択する

  • 一般的なフィードの取り込みステータスは、 フィード >パートナー ポータルの [History] セクションにあります。

定義

<ph type="x-smartling-placeholder">

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